convex-create-component

Design Convex components with isolated tables and app-facing wrappers.

Updated Dec 23, 2021
One-click install
npx skills add https://github.com/dvakatsiienko/bytes --skill convex-create-component-dvakatsiienko
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-create-component
Source: https://github.com/dvakatsiienko/bytes/tree/main/apps/x-com-chat/.agents/skills/convex-create-component
Command: npx skills add https://github.com/dvakatsiienko/bytes --skill convex-create-component-dvakatsiienko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex Create Component helps teams design and build reusable Convex components with clear boundaries, isolated tables, and a public app-facing API.

Core Features & Use Cases

  • Planning tables, API surface, and app wiring for new components.
  • Provides a clear skeleton with convex.config.ts, schema.ts, and component wrappers, plus guidance on auth/env boundaries.
  • Use cases include creating a new Convex component, extracting reusable backend logic, packaging functionality for reuse, or integrating with app-level patterns like defineComponent and app.use across component boundaries.

Quick Start

Follow the workflow steps to plan, implement, and wire a Convex component into your app.

Frequently Asked Questions about convex-create-component

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a reusable Convex component with isolated tables?▼

To create a reusable Convex component, you plan the isolated tables, define the public API surface, and generate a skeleton with convex.config.ts and schema.ts to establish clear module boundaries.

When should I extract backend logic into a Convex component?▼

Extract backend logic into a Convex component when you need to package functionality for reuse, build third-party integrations owning their own tables, or separate concerns into isolated modules.

How do you handle authentication and environment variables across Convex component boundaries?▼

Authentication and environment variables are handled at the app level, ensuring the component maintains clear boundaries while the parent app manages auth and env wiring through app-facing wrappers.

What is the best way to wire a Convex component into my app using app.use?▼

Wiring a Convex component involves using app.use to integrate the component, exposing its public API via app-facing wrappers while keeping its internal tables isolated from the main schema.

Can I use ctx.runQuery and ctx.runMutation across different Convex component boundaries?▼

Yes, you can use ctx.runQuery and ctx.runMutation across component boundaries by defining a clear public API through defineComponent, allowing controlled access to the isolated component logic.

What files are needed to structure a new Convex component?▼

Structuring a new Convex component requires a skeleton containing convex.config.ts for configuration, schema.ts for isolated table definitions, and component wrappers for the public API.