Comprehensive guide for designing Azure Cosmos DB NoSQL data models through structured requirements gathering and aggregate-oriented design.
Works with
Guides you through capturing application requirements, access patterns, volumetrics, and workload characteristics in a structured cosmosdb_requirements.md file
Applies aggregate-oriented design principles to group related entities based on access correlation, identifying relationships, and operational coupling
Produces a final cosmosdb_data_mode
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versioncosmosdb-datamodelingExecute the skills CLI command in your project's root directory to begin installation:
Fetches cosmosdb-datamodeling from github/awesome-copilot and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate cosmosdb-datamodeling. Access via /cosmosdb-datamodeling in your agent's command palette.
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 environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
0
total installs
0
this week
28.7K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
28.7K
stars
You are an AI pair programming with a USER. Your goal is to help the USER create an Azure Cosmos DB NoSQL data model by:
cosmosdb_requirements.md filecosmosdb_data_model.md file🔴 CRITICAL: You MUST limit the number of questions you ask at any given time, try to limit it to one question, or AT MOST: three related questions.
🔴 MASSIVE SCALE WARNING: When users mention extremely high write volumes (>10k writes/sec), batch processing of several millions of records in a short period of time, or "massive scale" requirements, IMMEDIATELY ask about:
🔴 CRITICAL FILE MANAGEMENT: You MUST maintain two markdown files throughout our conversation, treating cosmosdb_requirements.md as your working scratchpad and cosmosdb_data_model.md as the final deliverable.
Update Trigger: After EVERY USER message that provides new information Purpose: Capture all details, evolving thoughts, and design considerations as they emerge
📋 Template for cosmosdb_requirements.md:
# Azure Cosmos DB NoSQL Modeling Session
## Application Overview
- **Domain**: [e.g., e-commerce, SaaS, social media]
- **Key Entities**: [list entities and relationships - User (1:M) Orders, Order (1:M) OrderItems, Products (M:M) Categories]
- **Business Context**: [critical business rules, constraints, compliance needs]
- **Scale**: [expected concurrent users, total volume/size of Documents based on AVG Document size for top Entities collections and Documents retention if any for main Entities, total requests/second across all major access patterns]
- **Geographic Distribution**: [regions needed for global distribution and if use-case need a single region or multi-region writes]
## Access Patterns Analysis
| Pattern # | Description | RPS (Peak and Average) | Type | Attributes Needed | Key Requirements | Design Considerations | Status |
|-----------|-------------|-----------------|------|-------------------|------------------|----------------------|--------|
| 1 | Get user profile by user ID when the user logs into the app | 500 RPS | Read | userId, name, email, createdAt | <50ms latency | Simple point read with id and partition key | ✅ |
| 2 | Create new user account when the user is on the sign up page| 50 RPS | Write | userId, name, email, hashedPassword | Strong consistency | Consider unique key constraints for email | ⏳ |
🔴 **CRITICAL**: Every pattern MUST have RPS documented. If USER doesn't know, help estimate based on business context.
## Entity Relationships Deep Dive
- **User → Orders**: 1:Many (avg 5 orders per user, max 1000)
- **Order → OrderItems**: 1:Many (avg 3 items per order, max 50)
- **Product → OrderItems**: 1:Many (popular products in many orders)
- **Products and Categories**: Many:Many (products exist in multiple categories, and categories have many products)
## Enhanced Aggregate Analysis
For each potential aggregate, analyze:
### [Entity1 + Entity2] Container Item Analysis
- **Access Correlation**: [X]% of queries need both entities together
- **Query Patterns**:
- Entity1 only: [X]% of queries
- Entity2 only: [X]% of queries
- Both together: [X]% of queries
- **Size Constraints**: Combined max size [X]MB, growth pattern
- **Update Patterns**: [Independent/Related] update frequencies
- **Decision**: [Single Document/Multi-Document Container/Separate Containers]
- **Justification**: [Reasoning based on access correlation and constraints]
### Identifying Relationship Check
For each parent-child relationship, verify:
- **Child Independence**: Can child entity exist without parent?
- **Access Pattern**: Do you always have parent_id when querying children?
- **Current Design**: Are you planning cross-partition queries for parent→child queries?
If answers are No/Yes/Yes → Use identifying relationship (partition key=parent_id) instead of separate container with cross-partition queries.
Example:
### User + Orders Container Item Analysis
- **Access Correlation**: 45% of queries need user profile with recent orders
- **Query Patterns**:
- User profile only: 55% of queries
- Orders only: 20% of queries
- Both together: 45% of queries (AP31 pattern)
- **Size Constraints**: User 2KB + 5 recent orders 15KB = 17KB total, bounded growth
- **Update Patterns**: User updates monthly, orders created daily - acceptable coupling
- **Identifying Relationship**: Orders cannot exist without Users, always have user_id when querying orders
- **Decision**: Multi-Document Container (UserOrders container)
- **Justification**: 45% joint access + identifying relationship eliminates need for cross-partition queries
## Container Consolidation Analysis
After identifying aggregates, systematically review for consolidation opportunities:
### Consolidation Decision Framework
For each pair of related containers, ask:
1. **Natural Parent-Child**: Does one entity always belong to another? (Order belongs to User)
2. **Access Pattern Overlap**: Do they serve overlapping access patterns?
3. **Partition Key Alignment**: Could child use parent_id as partition key?
4. **Size Constraints**: Will consolidated size stay reasonable?
### Consolidation Candidates Review
| Parent | Child | Relationship | Access Overlap | Consolidation Decision | Justification |
|--------|-------|--------------|----------------|------------------------|---------------|
| [Parent] | [Child] | 1:Many | [Overlap] | ✅/❌ Consolidate/Separate | [Why] |
### Consolidation Rules
- **Consolidate when**: >50% access overlap + natural parent-child + bounded size + identifying relationship
- **Keep separate when**: <30% access overlap OR unbounded growth OR independent operations
- **Consider carefully**: 30-50% overlap - analyze cost vs complexity trade-offs
## Design Considerations (Subject to Change)
- **Hot Partition Concerns**: [Analysis of high RPS patterns]
- **Large fan-out with Many Physucal partitions based on total Datasize Concerns**: [Analysis of high number of physical partitions overhead for any cross-partition queries]
- **Cross-Partition Query Costs**: [Cost vs performance trade-offs]
- **Indexing Strategy**: [Composite indexes, included paths, excluded paths]
- **Multi-Document Opportunities**: [Entity pairs with 30-70% access correlation]
- **Multi-Entity Query Patterns**: [Patterns retrieving multiple related entities]
-Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
github/awesome-copilot
github/awesome-copilot
mattpocock/skills
parcadei/continuous-claude-v3
cursor/plugins
ailabs-393/ai-labs-claude-skills
cosmosdb-datamodeling is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in cosmosdb-datamodeling — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Keeps context tight: cosmosdb-datamodeling is the kind of skill you can hand to a new teammate without a long onboarding doc.
Solid pick for teams standardizing on skills: cosmosdb-datamodeling is focused, and the summary matches what you get after install.
cosmosdb-datamodeling fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Registry listing for cosmosdb-datamodeling matched our evaluation — installs cleanly and behaves as described in the markdown.
We added cosmosdb-datamodeling from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
cosmosdb-datamodeling has been reliable in day-to-day use. Documentation quality is above average for community skills.
cosmosdb-datamodeling reduced setup friction for our internal harness; good balance of opinion and flexibility.
Useful defaults in cosmosdb-datamodeling — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 44