Back to Skills

convex-create-component

Designs and builds Convex components with isolated tables, clear boundaries, and app-facing wrappers. Use this skill when creating a new Convex component, extracting reusable backend logic into a component, building a third-party integration that owns its own tables, packaging Convex functionality for reuse, or when the user mentions defineComponent, app.use, ComponentApi, ctx.runQuery/runMutation across component boundaries, or wants to separate concerns into isolated Convex modules.

22stars3forksUpdated 4/12/2026

Security Assessment

Low Risk(80/100)

Detected risks:

Sensitive File Access([SKILL.md] .env)
Security Score80/100

About convex-create-component

The `convex-create-component` skill is designed to help developers design and build reusable Convex components with clear boundaries and isolated tables. It solves the challenge of organizing backend logic in a way that separates concerns, allowing functionality to be packaged into distinct modules while maintaining a clean interface with the main application. This skill is particularly useful when developers want to extract reusable backend functionality, integrate third-party services, or create components that maintain their own persistent state independently of the main app. By providing structured guidance, it ensures components are modular, maintainable, and easy to integrate without disrupting the primary app logic.

Key features of this skill include defining a component structure with its own `convex.config.ts`, `schema.ts`, and function files, as well as generating the component's own server-side `_generated/` imports. It supports multiple component shapes, such as local components for single-app use, packaged components for reuse across apps, and hybrid approaches for shared library code. The skill outlines a step-by-step workflow, including planning tables, functions, and data dependencies, integrating components via `app.use(...)`, and creating app-facing wrappers for clients or public APIs. It emphasizes maintaining boundaries and leveraging Convex's development tools like `npx convex dev` to ensure type safety and correct code generation.

This skill is intended for developers working with Convex who need to structure complex backend logic into reusable, isolated modules. Common use cases include building new components within an existing app, extracting reusable backend functions, creating third-party integrations with dedicated tables, or packaging functionality for reuse across multiple apps. Target users are full-stack developers, backend engineers, and teams using Convex who want to improve modularity, maintainability, and clarity in their app architecture.

FAQ

When should I use the `convex-create-component` skill?

Use this skill when creating new Convex components, extracting reusable backend logic, building third-party integrations with dedicated tables, or packaging functionality for reuse across multiple apps.

Can I use this skill for one-off business logic?

No, one-off business logic that belongs in the main app or thin utilities without Convex tables or functions are not suitable use cases.

What types of components can I create with this skill?

You can create local components for single-app use, packaged components for reuse across apps, or hybrid components combining local and shared library code.

How do I integrate a component into my app?

Components are integrated via `app.use(...)` in the app's `convex.config.ts`. App-facing wrappers should be created for React clients, HTTP callers, or public APIs instead of exposing component functions directly.

What are the requirements for using this skill?

You need an existing Convex app structure, and the skill assumes familiarity with Convex functions, tables, `defineComponent`, and `ctx.runQuery`/`ctx.runMutation` calls.

All Files

6 files
references/advanced-patterns.md3.6 KB
View
agents/openai.yaml0.5 KB
View
SKILL.md10.2 KB
View
references/hybrid-components.md1.0 KB
View
references/local-components.md1.1 KB
View
references/packaged-components.md1.8 KB
View

Install convex-create-component

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill