
Cosmosdb Best Practices
If you're building on Azure Cosmos DB, this is a comprehensive rulebook covering data modeling, partition key design, query optimization, and SDK patterns across 100+ specific guidelines. It's built for code review and refactoring, with rules prioritized by performance impact and organized into 11 categories from critical (partition keys, data modeling) to medium priority (monitoring, tooling). The guidelines are concrete: use hierarchical partition keys ordered broad to narrow, avoid cross-partition queries, never reuse request options objects in the Java SDK, serialize enums as strings. It covers vector search and RAG patterns too. Think of it as the distilled wisdom from running Cosmos DB at scale, formatted for Claude to apply during code generation or review.
- skills.sh installs
- 1.1K
- GitHub stars
- 62
- last updated
- Aug 21, 2026
Install
$ npx -y skills add azurecosmosdb/cosmosdb-agent-kit --skill cosmosdb-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Azure Cosmos DB Best Practices
Comprehensive performance optimization guide for Azure Cosmos DB applications, containing 100+ rules across 13 categories, prioritized by impact to guide automated refactoring and code generation.
Before answering, read the linked rule files relevant to the user's question. The quick reference below is an index, not the full guidance: SDK APIs, limits, configuration prerequisites, and caveats live in the rule bodies. Use the language-specific integration rule when one exists rather than substituting a generic pattern. Keep answers concise, but include the constraints that make the recommendation correct for the user's scenario.
When to Apply
Reference these guidelines when:
- Designing data models for Cosmos DB
- Choosing partition keys
- Writing or optimizing queries
- Implementing SDK patterns
- Using the Cosmos DB Emulator for local development
- Inspecting or managing Cosmos DB data with developer tooling
- Implementing vector search or RAG features on Cosmos DB
- Reviewing code for performance issues
- Configuring throughput and scaling
- Building globally distributed applications
Rule Categories by Priority
Sponsors
Details
- Repository
- github.com/azurecosmosdb/cosmosdb-agent-kit
- Categories
- Backend & APIs, Documentation, Code Review & Quality, AI & Agent Building, Debugging, Cloud & Infrastructure, Design & UI/UX, Databases
- First seen
- Jun 3, 2026