Teaching AI coding agents Cosmos DB best practices —
so every line of generated code is production-ready.
github.com/AzureCosmosDB/cosmosdb-agent-kit | MIT License
SELECT TOP @top — doesn't work (must be literal)aiohttp for Python async SDKA collection of skills that plug into AI coding agents — giving them expert-level Cosmos DB knowledge at code-generation time.
Follows the open Agent Skills standard (agentskills.io) — install once, works across Copilot, Claude Code, Gemini CLI, and more.
| # | Category | Impact | Example Rule |
|---|---|---|---|
| 1 | Data Modeling | Critical | Embed related data retrieved together |
| 2 | Partition Key Design | Critical | Choose high-cardinality, immutable keys |
| 3 | Query Optimization | High | Use point reads when id + PK are known |
| 4 | SDK Best Practices | High | Singleton CosmosClient, async APIs |
| 5 | Indexing Strategies | Medium-High | Composite indexes matching ORDER BY |
| 6 | Throughput & Scaling | Medium | Autoscale for variable workloads |
| 7 | Global Distribution | Medium | Multi-region writes, failover config |
| 8 | Monitoring | Low-Med | Track RU consumption, P99 latency |
| 9 | Design Patterns | High | Change Feed materialized views |
| 10 | Vector Search | High | Embedding policy + distance queries |
| 11 | Full-Text Search | High | FullTextContains, BM25 ranking |
Contract-first testing that measures and improves agent quality over time
Key insight: Tests are written against a fixed API contract, not against the generated code. The agent is told exactly which endpoints, field names, and status codes to implement — making testing deterministic regardless of what the agent produces.
Real-world application patterns that exercise different Cosmos DB features
One install, every major AI coding agent
npx skills add AzureCosmosDB/cosmosdb-agent-kitrules/_template.mdnpm run build to recompile
75+ rules. 11 categories. One install.
Every AI agent becomes a Cosmos DB expert.
github.com/AzureCosmosDB/cosmosdb-agent-kit