/azure-cosmosdb:cosmosdb-best-practicesfrom azure-cosmosdb
Provides 100+ prioritized rules for Azure Cosmos DB NoSQL performance optimization, covering partition key design, RU optimization, SDK patterns, indexing, vector search, and global distribution. Use when designing data models, writing queries, or reviewing Cosmos DB code.
Ships in azure-cosmosdb. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Data Modeling | CRITICAL | model- |
| 2 | Partition Key Design | CRITICAL | partition- |
| 3 | Query Optimization | HIGH | query- |
| 4 | SDK Best Practices | HIGH | sdk- |
| 5 | Indexing Strategies | MEDIUM-HIGH | index- |
| 6 | Throughput & Scaling | MEDIUM | throughput- |
| 7 | Global Distribution | MEDIUM | global- |
| 8 | Monitoring & Diagnostics | LOW-MEDIUM | monitoring- |
| 9 | Design Patterns | HIGH | pattern- |
| 10 | Developer Tooling | MEDIUM | tooling- |
| 11 | Vector Search | HIGH | vector- |
| 12 | Full-Text Search | HIGH | fts- |
| 13 | Security | HIGH | security- |
setIfNoneMatchETag("*") on createItem to reject duplicates atomically (409 on conflict)CosmosItemRequestOptions instances for deferred or concurrent createItem operations to avoid shared-state partition-key overridesCosmosPatchOperations.increment() for atomic counter increments — no read RU, no ETag conflict cyclebyPage() — pass null for first page, never ""Microsoft.Azure.Cosmos, not the abandoned Azure.Cosmos v4-preview packageMicrosoft.Azure.Cosmos namespace collisions with domain models (User, Database, Container, etc.)/?, /[], /*)EnableNoSQLFullTextSearch capability on the account — prerequisite for all FTS functionsfullTextPolicy on the container with correct language code (en-US, case-sensitive)fullTextIndexes entry in the indexing policy to build the inverted indexFullTextContains / FullTextContainsAll / FullTextContainsAny instead of CONTAINS(LOWER(...))ORDER BY RANK FullTextScore(path, term) for BM25 relevance rankingUse the linked rule files above for detailed explanations and code examples. The links give the agent direct paths to the relevant guidance instead of relying on folder scanning or inferred filenames.
Each rule file contains:
README.md (opens in a new tab)agents/openai.yaml (opens in a new tab)metadata.json (opens in a new tab)rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/fts-add-index.md (opens in a new tab)rules/fts-define-policy.md (opens in a new tab)rules/fts-enable-capability.md (opens in a new tab)rules/fts-hybrid-queries.md (opens in a new tab)rules/fts-keyword-matching.md (opens in a new tab)rules/fts-relevance-ranking.md (opens in a new tab)rules/fts-semantic-reranker-two-stage.md (opens in a new tab)rules/global-conflict-resolution.md (opens in a new tab)rules/global-consistency.md (opens in a new tab)rules/global-failover.md (opens in a new tab)rules/global-multi-region-write-antipattern.md (opens in a new tab)rules/global-multi-region.md (opens in a new tab)rules/global-read-regions.md (opens in a new tab)rules/global-zone-redundancy.md (opens in a new tab)rules/index-composite-direction.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub azurecosmosdb/cosmosdb-agent-kit --plugin azure-cosmosdbOther plugins' skills for the same job