cosmosdb-datamodeling
Helps your agent plan how to organize data in a NoSQL database. It creates a data model that follows best practices for Azure Cosmos DB.
What it does
This guide helps you plan how to store data in Azure Cosmos DB, a type of NoSQL database. It gathers information about your application and creates an optimized data model design.
When to use it
- ✓When starting a new application that will use Azure Cosmos DB.
- ✓When needing to redesign how data is stored in an existing application.
- ✓When wanting to ensure your NoSQL database is efficient and follows best practices.
Example of what to ask your AI
“I want to create a database for an online store. Users place orders, and orders contain products. How should I structure this data in Cosmos DB?”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The AI asks questions about your application, such as what it does, who uses it, and how data is accessed. Based on your answers, it suggests a structure for your data in Cosmos DB and documents everything.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add github/awesome-copilot --skill cosmosdb-datamodelingOr download just the file:
curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/cosmosdb-datamodeling/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.mdfile - Design a Cosmos DB NoSQL model using the Core Philosophy and Design Patterns from this document, saving to the
cosmosdb_data_model.mdfile
🔴 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:
- Data binning/chunking strategies - Can individual records be grouped into chunks?
- 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?
- 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?
…
FAQ
What is a 'NoSQL data model'?
It's how you organize information (data) in a NoSQL database so that it works as efficiently as possible.
What are 'access patterns'?
These are the different ways your application needs to read or write information from the database. For example, fetching a user's profile or creating a new order.
What files are produced?
Two files: one detailing your application's requirements (`cosmosdb_requirements.md`) and another with the suggested data model (`cosmosdb_data_model.md`).
Details
Original description by the author
Step-by-step guide for capturing key application requirements for NoSQL use-case and produce Azure Cosmos DB Data NoSQL Model design using best practices and common patterns, artifacts_produced: "cosmosdb_requirements.md" file and "cosmosdb_data_model.md" file
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #5075
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
Helps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
github/awesome-copilot
acreadiness-assess
Enables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
github/awesome-copilot
acreadiness-generate-instructions
Helps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
github/awesome-copilot
acreadiness-policy
Enables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
github/awesome-copilot
Similar skills
pytorch-patterns
Helps your agent use PyTorch for machine learning models. It applies best practices for efficient model training and ensures reproducible results.
affaan-m/ECC
evm-token-decimals
Helps your agent avoid errors with decimal numbers across different blockchain networks. It ensures token values are accurate in transactions and calculations.
affaan-m/ECC
knowledge-agent
Creates and queries knowledge bases using AI. It allows asking questions about past work or compiling expertise on a topic.
thedotmack/claude-mem