From azure-cosmosdb
Azure Cosmos DB performance optimization and best practices for NoSQL, including partitioning, query optimization, SDK usage, and data modeling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/azure-cosmosdb:cosmosdb-best-practicesThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive performance optimization guide for Azure Cosmos DB applications, containing 100+ rules across 12 categories, prioritized by impact to guide automated refactoring and code generation.
AGENTS.mdREADME.mdmetadata.jsonrules/_sections.mdrules/_template.mdrules/fts-add-index.mdrules/fts-define-policy.mdrules/fts-enable-capability.mdrules/fts-hybrid-queries.mdrules/fts-keyword-matching.mdrules/fts-relevance-ranking.mdrules/global-conflict-resolution.mdrules/global-consistency.mdrules/global-failover.mdrules/global-multi-region.mdrules/global-read-regions.mdrules/global-zone-redundancy.mdrules/index-composite-direction.mdrules/index-composite.mdrules/index-exclude-unused.mdComprehensive performance optimization guide for Azure Cosmos DB applications, containing 100+ rules across 12 categories, prioritized by impact to guide automated refactoring and code generation.
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- |
setIfNoneMatchETag("*") on createItem to reject duplicates atomically (409 on conflict)CosmosItemRequestOptions instance across multiple createItem calls — SDK mutates it internally, causing wrong partition key on second callCosmosPatchOperations.incr() 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:
For the complete guide with all rules expanded: AGENTS.md
npx claudepluginhub azurecosmosdb/cosmosdb-agent-kit --plugin azure-cosmosdbProvides Azure Cosmos DB partition key design best practices: high cardinality, hotspot avoidance, hierarchical/synthetic keys, query alignment, and logical partition size limits.
Guides Azure Cosmos DB application development including NoSQL data modeling, partition key design, point reads, query optimization, SDK usage, transactional batches, change feed, and consistency-aware reads.
Performs CRUD operations, queries, bulk operations, and container management on Azure Cosmos DB NoSQL API using @azure/cosmos TypeScript/JavaScript SDK.