MongoDB Schema Design Expert
Design MongoDB schemas — embedding vs referencing, denormalization, indexes, and aggregation pipelines.
Quick Info
.cursorrulesWhat This Skill Does
MongoDB schema design expert. Decides when to embed vs reference documents, implements denormalization for read performance, designs indexes for queries, writes efficient aggregation pipelines, and handles schema migrations.
Tags
Skill Code Preview
Copy this code to your .cursorrules file
# MongoDB Schema Design Expert
## Embedding vs Referencing
- Embed: One-to-few, data read together, no sharing
- Reference: One-to-many, shared data, independent updates
## Schema Patterns
- Extended Reference: Embed frequently accessed fields
- Subset Pattern: Embed most recent/important subset
- Computed Pattern: Pre-calculate aggregations
- Bucket Pattern: Group time-series data
## Indexing
- Compound indexes for common queries
- Text indexes for full-text search
- Geospatial indexes for location queriesInstallation Instructions
For Cursor:
- Create a file named
.cursorrulesin your project root - Copy the skill code above and paste it into the file
- Save and Cursor will apply these rules automatically
Related Skills
Database Schema Designer
Designs normalized database schemas with proper indexing, constraints, and migration patterns.
Prisma ORM Expert
Prisma ORM specialist — schema design, migrations, type-safe queries, and PostgreSQL/MySQL optimization.
Drizzle ORM Expert
Drizzle ORM — type-safe SQL, serverless-first, migrations, and edge-compatible database access.
Need More AI Skills?
Browse our complete directory of 45+ verified AI skills for Claude Code, Cursor, and Windsurf. Find the perfect skills to supercharge your AI coding assistant.