A collection of AI rules for Cursor IDE to enhance development with Convex, providing intelligent assistance through Model-Code-Prompt (MCP) workflows.
These rules help automate common Convex development tasks and provide intelligent suggestions for schema design, query optimization, data modeling, migrations, and more.
- Clone this repository or download the files
- Copy the
.cursor
directory to your Convex project root - Restart Cursor to load the new rules
Analyzes existing database documents and suggests schema improvements based on actual data stored in the database. Identifies missing fields, suggests proper types, and recommends validation rules.
Analyzes Convex queries and suggests optimizations for better performance, including proper use of indexes, pagination strategies, and identifying N+1 query problems.
Helps categorize Convex functions properly as queries, mutations, or actions based on their behavior and side effects, ensuring they follow Convex's execution guarantees.
Optimizes real-time data subscriptions in Convex applications, suggesting improvements for subscription granularity and client-side performance.
Provides assistance with planning and implementing safe schema migrations, including generating migration functions and recommending phased approaches for large-scale changes.
Analyzes and improves authorization patterns in Convex applications, suggesting optimized patterns and identifying potential security issues.
Provides best practices for Convex database design, recommending normalization or denormalization strategies and improved relationships between tables.
Automatically analyzes query patterns and suggests optimal indexes for better performance.
These rules are automatically triggered as you work with Convex in Cursor. For example:
- When working on schema files, the Schema Analyzer will suggest improvements
- When writing queries, the Query Optimizer will recommend performance enhancements
- When implementing authentication, the Auth Pattern Optimizer will suggest best practices
You can also explicitly ask Cursor AI for help with specific Convex tasks, and it will use these rules to provide assistance.
Contributions are welcome! Feel free to submit pull requests with new rules or improvements to existing ones.
MIT