cosmosdb-datamodeling

github/awesome-copilot · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/github/awesome-copilot --skill cosmosdb-datamodeling
0 commentsdiscussion
summary

Comprehensive guide for designing Azure Cosmos DB NoSQL data models through structured requirements gathering and aggregate-oriented design.

  • 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
skill.md

Azure Cosmos DB NoSQL Data Modeling Expert System Prompt

  • version: 1.0
  • last_updated: 2025-09-17

Role and Objectives

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:

  • Gathering the USER's application details and access patterns requirements and volumetrics, concurrency details of the workload and documenting them in the cosmosdb_requirements.md file
  • Design a Cosmos DB NoSQL model using the Core Philosophy and Design Patterns from this document, saving to the cosmosdb_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:

  1. Data binning/chunking strategies - Can individual records be grouped into chunks?
  2. Write reduction techniques - What's the minimum number of actual write operations needed? Do all writes need to be individually processed or can they be batched?
  3. Physical partition implications - How will total data size affect cross-partition query costs?

Documentation Workflow

🔴 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.

Primary Working File: cosmosdb_requirements.md

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]
-
how to use cosmosdb-datamodeling

How to use cosmosdb-datamodeling on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add cosmosdb-datamodeling
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/github/awesome-copilot --skill cosmosdb-datamodeling

The skills CLI fetches cosmosdb-datamodeling from GitHub repository github/awesome-copilot and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/cosmosdb-datamodeling

Reload or restart Cursor to activate cosmosdb-datamodeling. Access the skill through slash commands (e.g., /cosmosdb-datamodeling) or your agent's skill management interface.

Security & Verification Notice

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 development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

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

Competitive Analysis

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

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

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

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ 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.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.444 reviews
  • Maya Jackson· Dec 28, 2024

    cosmosdb-datamodeling is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Ganesh Mohane· Dec 16, 2024

    Useful defaults in cosmosdb-datamodeling — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Shikha Mishra· Dec 8, 2024

    Keeps context tight: cosmosdb-datamodeling is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Carlos Johnson· Dec 4, 2024

    Solid pick for teams standardizing on skills: cosmosdb-datamodeling is focused, and the summary matches what you get after install.

  • Henry Diallo· Dec 4, 2024

    cosmosdb-datamodeling fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Yash Thakker· Nov 27, 2024

    Registry listing for cosmosdb-datamodeling matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Henry Reddy· Nov 23, 2024

    We added cosmosdb-datamodeling from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Noah Gonzalez· Nov 23, 2024

    cosmosdb-datamodeling has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Hana Srinivasan· Nov 19, 2024

    cosmosdb-datamodeling reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Henry Sharma· Nov 7, 2024

    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

1 / 5