azurecosmosdb avatar

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-code

Installs 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
1vtex avatarpayment-pci-securityvtex/skillsApply when handling credit card data, implementing secureProxyUrl flows, or working with payment security and proxy code. Covers PCI DSS compliance, Secure Prox1.1Kskills.sh installs
2tencentcloudbase avatarai-model-wechattencentcloudbase/skillsUse this skill for WeChat Mini Program AI via wx.cloud.extend.AI (小程序, 企业微信小程序, wx.cloud apps). Features generateText and streamText with callbacks (onText, onE1.1Kskills.sh installs
3xquik-dev avatarx-twitter-scraperxquik-dev/x-twitter-scraperUse Xquik for X/Twitter REST, MCP, SDKs, search, filtered exports, monitoring & approved publishing. Not affiliated with X Corp. Trigger for X API alternatives,1.1Kskills.sh installs
4binance avatarsimple-earnbinance/binance-skills-hubBinance Simple-earn request using the Binance API. Authentication requires API key and secret key.1.1Kskills.sh installs
5github avatarintegrate-context-maticgithub/awesome-copilotDiscovers and integrates third-party APIs using the context-matic MCP server. Uses `fetch_api` to find available API SDKs, `ask` for integration guidance, `mode1.1Kskills.sh installs
6vtex avatarpayment-provider-protocolvtex/skillsApply when implementing a VTEX Payment Provider Protocol (PPP) connector or working with payment/connector endpoint files. Covers all nine required endpoints: M1.1Kskills.sh installs