components-guide▌
get-convex/agent-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Self-contained mini-backends that bundle schema, functions, and data with clear API boundaries.
- ›Components encapsulate features like storage, payments, and notifications as reusable backend modules, reducing monolithic code and improving maintainability
- ›Sibling components pattern allows multiple components to work together at the same level, with the main app orchestrating calls across them
- ›Official component library includes authentication, storage, payments, AI, and utility compone
Convex Components Guide
Use components to encapsulate features and build maintainable, reusable backends.
What Are Convex Components?
Components are self-contained mini-backends that bundle:
- Their own database schema
- Their own functions (queries, mutations, actions)
- Their own data (isolated tables)
- Clear API boundaries
Think of them as: npm packages for your backend, or microservices without the deployment complexity.
Why Use Components?
Traditional Approach (Monolithic)
convex/
users.ts (500 lines)
files.ts (600 lines - upload, storage, permissions, rate limiting)
payments.ts (400 lines - Stripe, webhooks, billing)
notifications.ts (300 lines)
analytics.ts (200 lines)
Total: One big codebase, everything mixed together
Component Approach (Encapsulated)
convex/
components/
storage/ (File uploads - reusable)
billing/ (Payments - reusable)
notifications/ (Alerts - reusable)
analytics/ (Tracking - reusable)
convex.config.ts (Wire components together)
domain/ (Your actual business logic)
users.ts (50 lines - uses components)
projects.ts (75 lines - uses components)
Total: Clean, focused, reusable
Quick Start
1. Install a Component
# Official components from npm
npm install @convex-dev/ratelimiter
2. Configure in convex.config.ts
import { defineApp } from "convex/server";
import ratelimiter from "@convex-dev/ratelimiter/convex.config";
export default defineApp({
components: {
ratelimiter,
},
});
3. Use in Your Code
import { components } from "./_generated/api";
export const createPost = mutation({
handler: async (ctx, args) => {
// Use the component
await components.ratelimiter.check(ctx, {
key: `user:${ctx.user._id}`,
limit: 10,
period: 60000, // 10 requests per minute
});
return await ctx.db.insert("posts", args);
},
});
Sibling Components Pattern
Multiple components working together at the same level:
// convex.config.ts
export default defineApp({
components: {
// Sibling components - each handles one concern
auth: authComponent,
storage: storageComponent,
payments: paymentsComponent,
emails: emailComponent,
analytics: analyticsComponent,
},
});
Example: Complete Feature Using Siblings
// convex/subscriptions.ts
import { components } from "./_generated/api";
export const subscribe = mutation({
args: { plan: v.string() },
handler: async (ctx, args) => {
// 1. Verify authentication (auth component)
const user = await components.auth.getCurrentUser(ctx);
// 2. Create payment (payments component)
const subscription = await components.payments.createSubscription(ctx, {
userId: user._id,
plan: args.plan,
amount: getPlanAmount(args.plan),
});
// 3. Track conversion (analytics component)
await components.analytics.track(ctx, {
event: "subscription_created",
userId: user._id,
plan: args.plan,
});
// 4. Send confirmation (emails component)
await components.emails.send(ctx, {
to: user.email,
template: "subscription_welcome",
data: { plan: args.plan },
});
// 5. Store subscription in main app
await ctx.db.insert("subscriptions", {
userId: user._id,
paymentId: subscription.id,
plan: args.plan,
status: "active",
});
return subscription;
},
});
Official Components
Browse Component Directory:
Authentication
- @convex-dev/better-auth - Better Auth integration
Storage
- @convex-dev/r2 - Cloudflare R2 file storage
- @convex-dev/storage - File upload/download
Payments
- @convex-dev/polar - Polar billing & subscriptions
AI
- @convex-dev/agent - AI agent workflows
- @convex-dev/embeddings - Vector storage & search
Backend Utilities
- @convex-dev/ratelimiter - Rate limiting
- @convex-dev/aggregate - Data aggregations
- @convex-dev/action-cache - Cache action results
- @convex-dev/sharded-counter - Distributed counters
- @convex-dev/migrations - Schema migrations
- @convex-dev/workflow - Workflow orchestration
Creating Your Own Component
When to Create a Component
Good reasons:
- Feature is self-contained
- You'll reuse it across projects
- Want to share with team/community
- Complex feature with its own data model
- Third-party integration wrapper
Not good reasons:
- One-off business logic
- Tightly coupled to main app
- Simple utility functions
Structure
mkdir -p convex/components/notifications
// convex/components/notifications/convex.config.ts
import { defineComponent } from "convex/server";
export default defineComponent("notifications");
// convex/components/notifications/schema.ts
import { defineSchema, defineTable } from "convex/server";
import { v } from "convex/values";
export default defineSchema({
notifications: defineTable({
userId: v.id("users"),
message: v.string(),
read: v.boolean(),
createdAt: v.number(),
})
.index("by_user", ["userId"])
.index("by_user_and_read", ["userId", "read"]),
});
// convex/components/notifications/send.ts
import { mutation } from "./_generated/server";
import { v } from how to use components-guideHow to use components-guide on Cursor
AI-first code editor with Composer
1Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add components-guide
2Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
$npx skills add https://github.com/get-convex/agent-skills --skill components-guideThe skills CLI fetches components-guide from GitHub repository get-convex/agent-skills and configures it for Cursor.
3Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
◆ Which agents do you want to install to?││ ── Universal (.agents/skills) ── always included ────│ • Amp│ • Antigravity│ • Cline│ • Codex│ ●Cursor(selected)│ • Cursor│ • Windsurf4Verify installation
Confirm successful installation by checking the skill directory location:
.cursor/skills/components-guideReload or restart Cursor to activate components-guide. Access the skill through slash commands (e.g., /components-guide) or your agent's skill management interface.
⚠Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
Additional Resources
List & Monetize Your Skill
Submit your Claude Code skill and start earning
GET_STARTED →Use Cases▌
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
✓Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
✓Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
✓Improve work quality by 30-40% with less effort
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Installation Steps
- 1.Install skill using provided installation command
- 2.Test with simple use case relevant to your work
- 3.Evaluate output quality and relevance
- 4.Iterate on prompts to improve results
- 5.Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices▌
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This▌
✓ Use When
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid When
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path▌
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
general reviewsRatings
4.7★★★★★65 reviews- ★★★★★Henry Thompson· Dec 28, 2024
Useful defaults in components-guide — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Advait Nasser· Dec 24, 2024
Solid pick for teams standardizing on skills: components-guide is focused, and the summary matches what you get after install.
- ★★★★★Henry Bhatia· Dec 16, 2024
components-guide is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Olivia Johnson· Dec 8, 2024
Keeps context tight: components-guide is the kind of skill you can hand to a new teammate without a long onboarding doc.
- ★★★★★Charlotte Sethi· Nov 27, 2024
I recommend components-guide for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Layla Ndlovu· Nov 19, 2024
components-guide is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★James Iyer· Nov 7, 2024
Useful defaults in components-guide — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★James Robinson· Oct 26, 2024
I recommend components-guide for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Charlotte Taylor· Oct 18, 2024
Useful defaults in components-guide — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kofi Shah· Oct 10, 2024
Keeps context tight: components-guide is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 65
1 / 7