One-click install
npx skills add https://github.com/MichaelFrieze/riffatlas --skill components-guide-michaelfrieze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: components-guide
Source: https://github.com/MichaelFrieze/riffatlas/tree/main/.agents/skills/components-guide
Command: npx skills add https://github.com/MichaelFrieze/riffatlas --skill components-guide-michaelfrieze

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convex apps often become hard to maintain when backend logic grows into a monolithic set of tightly coupled functions. This guide helps you organize backend features into isolated, reusable Convex components with clear boundaries.

Core Features & Use Cases

  • Understand component encapsulation: Learn how Convex components bundle their own schema, functions (queries/mutations/actions), and data tables behind an API boundary.
  • Adopt the sibling-components pattern: Use multiple components side-by-side for separate concerns like storage, billing, notifications, and analytics.
  • Create and document your own components: Follow a repeatable structure for installing, configuring in convex.config.ts, and using component APIs from the parent app.
  • Avoid coupling mistakes: Prevent illegal or fragile designs where a component tries to access parent app tables.

Quick Start

Use this guide to refactor one growing backend area (like uploads, rate limiting, or analytics) into its own Convex component and then call it from your main app through components.<name>.

Frequently Asked Questions about components-guide

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

FAQPage Schema
How do I separate concerns in a Convex backend that is becoming hard to maintain?

To separate concerns in a Convex backend, encapsulate features as reusable components with isolated schemas and APIs. This pattern prevents monolithic logic by bundling queries, mutations, and data tables behind clear boundaries.

How do I configure and call reusable Convex components from a parent app?

Configure reusable Convex components by registering them in convex.config.ts, then call their functions from the parent app using components.* calls. This setup ensures feature encapsulation and maintainability.

Can a Convex component access tables defined in the parent app?

No, a Convex component cannot access parent app tables. Component communication rules prevent this coupling to avoid fragile designs, ensuring components remain isolated and reusable across different projects.

What is the sibling-components pattern for structuring Convex backends?

The sibling-components pattern structures a Convex backend by placing multiple components side-by-side for separate concerns like storage, billing, and analytics. This approach maximizes reuse and maintains strict separation of concerns.

When should I refactor Convex backend logic into an isolated component?

Refactor Convex backend logic into an isolated component when a specific area like uploads, rate limiting, or analytics grows large enough to warrant its own schema, API boundary, and independent maintainability.