convex-components-guide

Use Convex components for encapsulation, reuse, and feature isolation. Use when deciding between local code, helpers, and components.

SKILL.md

GitHub

Convex Components Guide

Use this when the task involves reusable backend capabilities or when a feature is growing too monolithic.

Prefer components for

  • feature encapsulation,
  • reusable infrastructure-like backend capabilities,
  • isolated integrations,
  • sibling services such as storage, billing, analytics, notifications, or AI-support utilities.

Do not overuse components for

  • trivial one-off helpers,
  • tightly coupled core domain logic that is simpler as local app code.

Decision rule

  • If the capability should be reusable or independently maintained, consider a component.
  • If the capability is just a few local helpers, keep it in app code or use convex-helpers.

References