convex-create-component

Create reusable Convex components with isolated tables and app-facing APIs.

Updated Jun 8, 2024
One-click install
npx skills add https://github.com/shadeiskndr/portfolio --skill convex-create-component-shadeiskndr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-create-component
Source: https://github.com/shadeiskndr/portfolio/tree/main/.agents/skills/convex-create-component
Command: npx skills add https://github.com/shadeiskndr/portfolio --skill convex-create-component-shadeiskndr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you extract backend logic into reusable Convex components with isolated tables and a clear app-facing API, so features stay maintainable as your codebase grows.

Core Features & Use Cases

  • Reusable component boundaries: Design components that own their tables and expose an intentionally small public surface for the app to call.
  • Correct wiring and access patterns: Keep authentication and environment access in the app while using explicit args/returns validators at the component boundary.
  • Scalable workflows: Support local component extraction by default, with guidance for packaged or hybrid component shapes when reuse across apps is required.
  • Implementation workflow: Plan tables and function contracts, implement functions using component-local generated imports, then install and call the component from the app via app wrappers.

Quick Start

Tell the AI what you want to build in your Convex app and confirm whether you need a local component, a shareable package, or a hybrid approach.

Frequently Asked Questions about convex-create-component

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

FAQPage Schema
How do I call a Convex component from my main application?

You call a Convex component from your main application by wiring it with app.use, then invoking its functions through ctx.runQuery or ctx.runMutation. Use wrapper functions to manage client access, authentication, and environment handling.

When should I build a reusable component in Convex instead of standard backend modules?

Build a reusable component in Convex when packaging functionality for reuse across apps or creating third-party integrations. This isolates tables and enforces boundary-safe function contracts to keep your growing codebase maintainable.

How does authentication work with Convex component boundaries?

Authentication stays in the app while the component uses explicit args and returns validators for type-safe boundaries. The app manages auth and environment access, while the component handles its isolated workflows through wrapper functions.

What is the best way to structure schema ownership for Convex components?

Structure schema ownership by having the component own its tables completely. This maintains isolated data boundaries while exposing an intentionally small public API surface for the app to call safely.