From cosmosdb
Provides Azure Cosmos DB best practices for NoSQL performance optimization, data modeling, partitioning, queries, SDK usage, indexing, scaling, and vector search. Use when writing, reviewing, refactoring code or designing models.
npx claudepluginhub azurecosmosdb/cosmosdb-agent-kitThis skill uses the workspace's default tool permissions.
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.mdPerforms CRUD operations, queries, bulk operations, and container management on Azure Cosmos DB NoSQL API using @azure/cosmos TypeScript/JavaScript SDK.
Perform document CRUD, queries, bulk operations, and container management in Azure Cosmos DB using @azure/cosmos TypeScript/JavaScript SDK.
Optimizes Azure SQL Database performance via service tier comparisons, DTU/vCore guidance, automatic tuning, Hyperscale/serverless options, and monitoring queries.
Share bugs, ideas, or general feedback.
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.
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