What problem does it solve?
This Skill provides standardized Convex development patterns to ensure consistent, secure, and maintainable code when building queries, mutations, and actions.
Core Features & Use Cases
- Function Syntax (REQUIRED): Use the new function syntax with explicit validators to enforce type-safety.
- Return Validators: Always declare returns validators for all mutations and queries.
- Query with Index: Prefer indexed queries over broad filters to optimize performance.
- Authentication & Authorization: Use getCurrentUser pattern and role checks for protected mutations.
- Computed Fields & Activity Tracking: Extend query results with computed fields and record user activity.
- Anti-Patterns & Best Practices: Avoid common mistakes such as missing returns or ad-hoc casting.
Quick Start
Use the Convex development patterns in this skill to start implementing a new protected endpoint, e.g., a mutation adding an item with proper validators and an index-based query.