Optimize Azure Cosmos DB NoSQL databases with expert guidance on data modeling, partition key design, query optimization, indexing, vector and full-text search, SDK best practices across .NET, Java, Python, Go, and Spring Boot, plus global distribution, throughput scaling, and security hardening.
Azure Cosmos DB for AI, RAG, and search: vector search (vector index types, embeddings container setup, similarity / nearest-neighbor queries), full-text search (enable FTS, BM25 relevance ranking, hybrid keyword + vector), LangChain and LangGraph integration (CosmosDB checkpoint saver, async checkpointer init, MCP persistent sessions, MCP tool content and filtering, LangChain JS vectorstore, chat history, embedding model, semantic cache), and AI-agent design patterns (multi-agent routing, chat-history separation, resume from checkpoint, grounding access, background-task writes). USE FOR: store embeddings and run similarity search, choose a vector index, enable full-text/BM25 search, hybrid search, build a RAG app, persist LangGraph checkpoints, multi-agent state, MCP tools, semantic cache. DO NOT USE FOR: core modeling/partition/index/query (use cosmosdb-data-and-queries); throughput/global/monitoring/security (use cosmosdb-operations); non-AI SDK client setup (use cosmosdb-sdk).
Azure Cosmos DB performance optimization and best practices guidelines for NoSQL, partitioning, queries, and SDK usage. Use when writing, reviewing, or refactoring code that interacts with Azure Cosmos DB, designing data models, optimizing queries, or implementing high-performance database operations. USE FOR: Cosmos DB NoSQL, partition key design, RU optimization, point reads, cross-partition queries, SDK singleton, CosmosClient, container modeling, change feed, bulk operations, vector search, full-text search, hierarchical partition keys, global distribution, autoscale throughput, indexing policy. DO NOT USE FOR: PostgreSQL, MySQL, MongoDB (non-Azure), DynamoDB, Cassandra, Azure SQL, Cosmos DB for PostgreSQL (vCore), Cosmos DB for MongoDB vCore, Azure DocumentDB, general SQL databases, Redis, Elasticsearch.
Azure Cosmos DB data design and querying: document modeling (embed vs reference, denormalization, schema versioning, 2MB limit, id constraints), partition key design (high cardinality, avoid hotspots, hierarchical, synthetic keys), indexing policy (composite, range vs hash, exclude unused paths, spatial), query optimization (point reads, avoid cross-partition scans, projections, pagination, parameterization, filter order), and data-access patterns (change-feed materialized views, ranking, service layer). USE FOR: choose partition key, embed vs reference, denormalize for reads, composite index for ORDER BY, cut write RU by excluding paths, point read by id and partition key, paginate with continuation tokens, avoid cross-partition queries, materialized views. DO NOT USE FOR: SDK client code (use cosmosdb-sdk); throughput, global distribution, monitoring, security (use cosmosdb-operations); vector or full-text search and LangChain/LangGraph agents (use cosmosdb-ai-and-search).
Azure Cosmos DB operations, scaling, and security: throughput provisioning (autoscale vs manual, serverless for dev, RU estimation, bursts), global distribution (multi-region writes, read regions, failover, consistency levels, conflict resolution, zone redundancy), monitoring and diagnostics (RU consumption, throttling/429 alerts, P99 latency, Azure Monitor, diagnostic logs), and security (managed identity, disable key auth, RBAC least privilege, network restriction, continuous backup / point-in-time restore). USE FOR: provision RU/s, autoscale, serverless, multi-region writes, region failover, choose consistency level, alert on throttling, track P99 latency, push metrics to Azure Monitor, authenticate with managed identity, lock down to a VNet, RBAC, restore. DO NOT USE FOR: modeling, partition keys, indexing, queries (use cosmosdb-data-and-queries); SDK client code (use cosmosdb-sdk); vector/full-text search and AI agents (use cosmosdb-ai-and-search).
Azure Cosmos DB SDK and developer tooling for .NET, Java, Python, Go, and Spring Boot: singleton CosmosClient, async APIs, Direct vs Gateway connection mode, retry/429 handling, preferred and excluded regions, availability strategy, circuit breaker, diagnostics, enum serialization, ETag optimistic concurrency, conditional create, patch counter increment, continuation-token guards, per-call request options, content response on write, Spring Data annotations and repositories, NuGet package setup, Python async deps, emulator SSL, and local development / VS Code tooling. USE FOR: reuse CosmosClient as singleton, Direct mode, handle 429 retries, preferred regions, ETag concurrency, atomic patch increment, Spring Boot config, .NET package setup, run the emulator locally, browse data in VS Code. DO NOT USE FOR: modeling/partition/index/query (use cosmosdb-data-and-queries); throughput, global, monitoring, security (use cosmosdb-operations); LangChain/LangGraph/vector/full-text search (use cosmosdb-ai-and-search).
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A collection of skills for AI coding agents working with Azure Cosmos DB. Skills are packaged instructions and scripts that extend agent capabilities.
Skills follow the Agent Skills format and the kit ships with plugin manifests for Claude Code, Codex, Cursor, Gemini CLI, and GitHub Copilot.
| Skill | Description | Status |
|---|---|---|
| cosmosdb-best-practices | Performance optimization (111 rules, 12 categories) | ✅ Stable |
| migration-capacity-planning | RU calculation, data sizing, pre-split partitions | 🚧 Planned |
Azure Cosmos DB performance optimization guidelines containing 111 rules across 12 categories, prioritized by impact.
Use when:
Categories covered:
apm install AzureCosmosDB/cosmosdb-agent-kit
Installs the skill across GitHub Copilot, Claude Code, Cursor, Codex, and Gemini in one command.
npx skills add AzureCosmosDB/cosmosdb-agent-kit
This drops the skill catalog into whichever agent you're using.
/plugin marketplace add AzureCosmosDB/cosmosdb-agent-kit
/plugin install cosmosdb@cosmosdb-agent-kit
/plugin install cosmosdb@claude-plugins-official
gemini extensions install https://github.com/AzureCosmosDB/cosmosdb-agent-kit
The repository includes ready-made plugin manifests:
| Agent | Manifest |
|---|---|
| Claude Code | .claude-plugin/plugin.json |
| OpenAI Codex | .codex-plugin/plugin.json |
| Cursor | .cursor-plugin/plugin.json |
| Gemini CLI | gemini-extension.json + GEMINI.md |
| GitHub Copilot | skills/cosmosdb-best-practices/SKILL.md (auto-detected) |
A project website is available in docs/ and is designed for GitHub Pages publishing.
docs/index.htmldocs/styles.cssdocs/app.jsThe website includes a feedback survey that opens a prefilled GitHub issue so users can share improvements for Agent Kit without requiring a backend service.
# Option 1: VS Code Live Server
# open docs/index.html with Live Server
# Option 2: Python static server
python -m http.server 8080 --directory docs
Then open http://localhost:8080.
In repository settings, set Pages source to Deploy from a branch, branch main, folder /docs.
Skills are automatically available once installed. The agent will use them when relevant tasks are detected.
Examples:
Review my Cosmos DB data model
Help me choose a partition key for my orders collection
Optimize this Cosmos DB query
Each skill contains:
SKILL.md - Instructions for the agent (triggers activation)AGENTS.md - Compiled rules (what agents read)rules/ - Individual rule filesmetadata.json - Version and metadataWorks with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, and other Agent Skills-compatible tools.
See CONTRIBUTING.md for contribution guidelines.
This project includes a Waza eval framework for local skill testing. Evals are not enforced in CI today (the mock executor cannot validate response content), but you can run them locally to sanity-check your changes:
npx claudepluginhub azurecosmosdb/cosmosdb-agent-kit --plugin azure-cosmosdbAzure Cosmos DB plugin for Claude Code. Includes 73 best-practice rules across 10 categories covering data modeling, partition key design, query optimization, SDK usage, indexing, throughput management, global distribution, monitoring, design patterns, and vector search. No external services or configuration required. Optional MCP Toolkit integration available for live database operations.
Database plugin for nosql-data-modeler
Use this agent when you need to optimize database performance for B2B applications at enterprise scale. This agent specializes in multi-tenant database optimization, query performance tuning, indexing strategies, connection pooling, and database scaling for SaaS platforms. Handles PostgreSQL, MySQL, MongoDB, and cloud database optimizations. Examples:
Comprehensive T-SQL and SQL Server expertise for query optimization, performance tuning, and Azure SQL Database. PROACTIVELY activate for: (1) T-SQL query optimization and SARGability analysis, (2) SQL Server performance tuning, (3) Index design and strategy, (4) Execution plan analysis, (5) Parameter sniffing solutions, (6) Azure SQL Database optimization, (7) Window functions and advanced patterns, (8) Columnstore and In-Memory OLTP, (9) Query Store and IQP features. Includes: tsql-expert agent, 5 progressive disclosure skills, 3 optimization commands, diagnostic scripts.
Create, connect, and interact with a Cloud SQL for PostgreSQL database and data.
Official MongoDB agent skills for schema design, query tuning, search, and connections.
Create, connect, and interact with an AlloyDB for PostgreSQL database and data.