convex
Convex backend development patterns, validators, indexes, actions, queries, mutations, file storage, scheduling, React hooks, and components. Use when writing Convex code, debugging Convex issues, or planning Convex architecture.
When & Why to Use This Skill
This Claude skill provides comprehensive guidance for Convex backend development, offering optimized patterns for queries, mutations, and serverless actions. It helps developers implement high-performance database indexing, manage complex scheduling, and integrate React hooks seamlessly while ensuring code quality and architectural best practices within the Convex ecosystem.
Use Cases
- Backend Logic Development: Writing type-safe queries and mutations using the correct syntax and server-side imports to ensure code compiles on the first try.
- Database Performance Optimization: Replacing inefficient .filter() methods with .withIndex() patterns to optimize query speed and resource usage.
- Serverless Action Implementation: Correctly configuring Node.js actions with 'use node' and managing internal function calls for secure scheduling and authentication.
- React Integration: Implementing robust frontend-to-backend connections using the 'skip' pattern for conditional hooks and real-time data synchronization.
- Architectural Planning: Designing scalable backend structures including file storage, validators, and complex data schemas based on Convex best practices.
| name | convex |
|---|---|
| description | Convex backend development patterns, validators, indexes, actions, queries, mutations, file storage, scheduling, React hooks, and components. Use when writing Convex code, debugging Convex issues, or planning Convex architecture. |
Functions: Import from ./_generated/server, use query({ args, handler }) syntax
Indexes: Never use .filter() - use .withIndex(). Never define by_creation_time index
Actions: Add "use node"; at top, never use ctx.db - use ctx.runQuery/ctx.runMutation
Scheduler: Auth does NOT propagate - use internal functions
React: Never call hooks conditionally - use "skip" pattern