documentdb-agent-kit
AGENTS.md6 starsChanged 7 months agoMITView on GitHub
This repository is an Agent Skills pack for Azure DocumentDB (with MongoDB compatibility) — the managed Azure service built on the open-source DocumentDB project. Every skill targets Azure DocumentDB specifically; rules call out DocumentDB features that differ from community MongoDB (cosmosSearch vector indexes, createSearchIndexes full-text search, cluster M-tiers, Entra RBAC, CMK, etc.). Status: Public Preview. This kit and its upstream MCP server are pre-GA; rule contents, skill shapes, installer behavior, and the MCP tool surface may change in breaking ways.…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- documentdb-azure-deploymentSkill
- documentdb-connectionSkill
- documentdb-data-modelingSkill
- documentdb-driverSkill
- documentdb-full-text-searchSkill
- documentdb-high-availabilitySkill
- documentdb-indexingSkill
- documentdb-local-deploymentSkill
- documentdb-mcp-setupSkill
- documentdb-monitoringSkill
- documentdb-natural-language-queryingSkill
- documentdb-query-optimizationSkill
- documentdb-query-optimizerSkill
- documentdb-securitySkill
- documentdb-shardingSkill
- documentdb-storageSkill
- documentdb-vector-searchSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Default to Route B: Only take Route A when the user explicitly says *"use toolbox"* (or unambiguously asks to run the diagnostic scripts / …
- Very specific: line 46
Read the skill front matter (skills/*/SKILL.md) and the Skills in this kit table below to decide which skill applies.
- Very specific: line 121
All paths share the same skills/ tree.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This repository is an Agent Skills pack for Azure DocumentDB (with MongoDB compatibility) — the managed Azure service built on the open-source DocumentDB project. Every skill targets Azure DocumentDB specifically; rules call out DocumentDB features that differ from community MongoDB (cosmosSearch vector indexes, createSearchIndexes full-text search, cluster M-tiers, Entra RBAC, CMK, etc.).
Status: Public Preview. This kit and its upstream MCP server are pre-GA; rule contents, skill shapes, installer behavior, and the MCP tool surface may change in breaking ways. No SLA. See the Azure Preview Supplemental Terms. When acting on the kit, agents should call out this status to the user if they're about to commit kit-installed configs into anything that looks production-shaped.
How agents should use this kit
This kit has two routes. Decide the route first, from what the user said:
| The user says… | Route | What the agent does |
| "use toolbox" (explicit), or clearly asks to run the diagnostic scripts against a live database | Route A — Diagnostic toolbox | Use the knowledge-base router to pick and run a read-only diagnostic script against the user's local DocumentDB container, then report the findings. |
| anything else (the default) | Route B — Text skills | Route to the best skills/*/SKILL.md and answer from guidance. |
Default to Route B. Only take Route A when the user explicitly says "use toolbox" (or unambiguously asks to run the diagnostic scripts / inspect a live local database). Do not run any script on Route B.
Route A — Diagnostic toolbox (only when the user says "use toolbox")
Deterministic, read-only scripts that inspect a local DocumentDB container (both the MongoDB API and the PostgreSQL engine underneath) and emit findings. They never modify data; no cloud, no API keys. Steps:
- Prerequisites: a running container (default name
documentdb-local) and a password exported asDB_PASSWORD(or passed via--password);db-config-advisoris PG-only and needs no password. Seedocs/DIAGNOSTICS.mdfor the one-linedocker runand seeding. - Route the question to the exact script with the knowledge-base router — deterministic keyword scoring, needs no LLM and no container:
It prints the matching tool and the exact command (appendbash knowledge-base/kb-route.sh --db <db> "<the user's question>"--jsonfor machine-readable output). Seeknowledge-base/README.md. - Run the recommended command (all scripts are read-only) and interpret the findings/insights for the user. Present the fix as a recommendation — applying it (e.g. a schema split or dropping an index) is the user's decision.
- If the router is not confident (no match / low score), fall back to Route B.
Tools available on this route: document-bloat-advisor, index-redundancy-finder, db-config-advisor, perf-advisor, data-integrity-check — catalog in README.md. Regression-guarded by testing/.
Route B — Text skills (default): skill routing (do this first)
This kit ships 17+ skills, which is too many to reliably pick from a flat table. Agents should route in this order:
- Prefer the
find-skillshelper if installed. Check for~/.agents/skills/find-skills/(or the equivalent symlinked location for the current agent). If present, callfind-skillswith the user's task to get the right DocumentDB skill, then open that skill'sSKILL.md. Do not scan the table below in this case. - If
find-skillsis not installed, ask the user once whether to install it before falling back. Suggest the install command (npx skills add find-skills) and explain it is a one-time, ~zero-cost helper that improves routing across this kit's 17+ skills. Wait for an answer. - If the user declines (or the environment cannot install it), fall back to the manual routing flow:
- Read the skill front matter (
skills/*/SKILL.md) and the Skills in this kit table below to decide which skill applies. - Open that skill's
SKILL.mdfor full instructions and the list of rule files / references. - Open individual rule files or
references/docs only as needed — don't pre-load the whole repo.
- Read the skill front matter (
Every skill folder has a SKILL.md with YAML front matter containing name and description (the fields Agent Skills–compatible tools use for discovery). Rule file names are prefixed by category (model-, vector-, fts-, local-, etc.) so an agent can match a task to a rule by keyword.
Skills in this kit
Best-practice rule collections
These skills each describe a feature area and link to short rule files with incorrect/correct examples.
| Skill | Folder | When to use |
documentdb-data-modeling | skills/data-modeling/ | Designing schemas, embed vs reference, 16 MB limit, denormalization, schema versioning |
documentdb-query-optimization | skills/query-optimization/ | Writing queries that use indexes; reading explain("executionStats") |
documentdb-indexing | skills/indexing/ | Choosing the right index type (single / compound / multikey / wildcard / hashed / 2dsphere / TTL); ESR ordering; query-pattern → index-shape cookbook; safe index lifecycle (hideIndex → dropIndex) |
documentdb-driver | skills/driver/ | Singleton MongoClient, connection reuse fundamentals |
documentdb-vector-search | skills/vector-search/ | cosmosSearch with DiskANN / HNSW / IVF, PQ, fp16, cosine normalization |
documentdb-full-text-search | skills/full-text-search/ | $search with createSearchIndexes, custom analyzers (edgeGram, pathHierarchy), fuzzy / phrase / prefix, multi-field indexes, BM25 + vector hybrid |
documentdb-high-availability | skills/high-availability/ | HA, cross-region replica, 99.99% / 99.995% SLAs |
documentdb-security | skills/security/ | TLS, Private Endpoint, Entra RBAC, CMK |
documentdb-monitoring | skills/monitoring/ | Diagnostic settings, slow-query logs, metrics & alerts |
documentdb-local-deployment | skills/local-deployment/ | Docker image choice, Compose, TLS, env-driven config, dev/prod parity |
Interactive / workflow skills
These skills walk the user (or another agent) through a task end-to-end.
| Skill | Folder | When to use |
documentdb-mcp-setup | skills/mcp-setup/ | Installing / configuring the DocumentDB MCP server in an agentic client (Claude Code, Claude Desktop, Cursor, Copilot CLI, Gemini CLI, VS Code); defining CONNECTION_PROFILES |
documentdb-azure-deployment | skills/azure-deployment/ | Provisioning an Azure DocumentDB cluster (Microsoft.DocumentDB/mongoClusters) via Bicep, Azure CLI, Terraform, or portal; firewall rules; connection string retrieval |
documentdb-natural-language-querying | skills/natural-language-querying/ | "How do I query…", "filter / group / aggregate…", SQL → MQL translation (read-only queries only) |
documentdb-query-optimizer | skills/query-optimizer/ | "Why is this slow?", index review, explain()-driven tuning; loads references/core-indexing-principles.md |
documentdb-connection | skills/connection/ | Pool-size / timeout / retry tuning for serverless, OLTP, OLAP, or bursty workloads |
Routing hints for agents
These map a task to the best Route B (text) skill. (On Route A — when the
user said "use toolbox" — route the same task through knowledge-base/kb-route.sh
to a diagnostic script instead.)
- Writing / generating a query →
documentdb-natural-language-querying - "Why is this query slow / how do I index this?" →
documentdb-query-optimizer - "Which index type should I use / design this index" →
documentdb-indexing - Designing a schema / data model →
documentdb-data-modeling - Adding vector search to a RAG app →
documentdb-vector-search - Adding keyword / BM25 search →
documentdb-full-text-search - Configuring
MongoClient/ connection string →documentdb-connection(pool tuning) ordocumentdb-driver(basic patterns) - Setting up the DocumentDB MCP server →
documentdb-mcp-setup - Provisioning / deploying an Azure DocumentDB cluster (Bicep / CLI / Terraform) →
documentdb-azure-deployment - Running DocumentDB locally →
documentdb-local-deployment - HA / DR / SLA questions →
documentdb-high-availability - TLS / RBAC / encryption / networking →
documentdb-security - Observability / alerts / slow queries log →
documentdb-monitoring
Cross-tool compatibility
This kit is distributed as an installable plugin/extension for every major coding agent. The plugin bundles the DocumentDB MCP server (documentdb-mcp-server on npm) together with the skills/ tree.
| Agent | Install command | Update command | Manifest |
| Skills only (any agent) | npx skills add Azure/documentdb-agent-kit | re-run npx skills add Azure/documentdb-agent-kit (preferred) or npx skills update | walks skills/ directly (no MCP server) |
⚠️ Per-agent plugin install paths are not yet published — see the commented-out rows below for the planned commands.
<!--
| Claude Code | `/plugin marketplace add Azure/documentdb-agent-kit` then `/plugin install documentdb` | `/plugin update documentdb@azure-documentdb` | [`.claude-plugin/`](.claude-plugin/) |
| Cursor | `/add-plugin azure/documentdb-agent-kit` | re-run `/add-plugin azure/documentdb-agent-kit` | [`.cursor-plugin/`](.cursor-plugin/) |
| Codex | `codex plugin marketplace add azure/documentdb-agent-kit` | `codex plugin update documentdb` | [`.codex-plugin/`](.codex-plugin/) + [`.agents/plugins/marketplace.json`](.agents/plugins/marketplace.json) |
| Gemini CLI | `gemini extensions install https://github.com/Azure/documentdb-agent-kit` | `gemini extensions update documentdb-agent-kit` | [`gemini-extension.json`](gemini-extension.json) + [`GEMINI.md`](GEMINI.md) |
| GitHub Copilot CLI | `/plugin install https://github.com/Azure/documentdb-agent-kit.git` | `/plugin update https://github.com/Azure/documentdb-agent-kit.git` | this `AGENTS.md` + [`mcp.json`](mcp.json) |
-->All paths share the same skills/ tree. Claude / Cursor / Codex / Copilot also share the root mcp.json; Gemini inlines the same MCP config in its own manifest.
Skills are snapshotted at install time and do not auto-update — re-run the relevant update command above to pull new skills or fixes from main. The bundled MCP server runs via npx -y documentdb-mcp-server and refreshes on every agent restart (subject to npm cache).
See README.md for the full per-tool install + configuration walkthrough and docs/SKILLS.md for the capability catalog.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

