cosmosdb-best-practices

cosmosdb-best-practices is a skill for Claude Code, Codex from AzureCosmosDB/cosmosdb-agent-kit. It costs 177 tokens per session (4,856 once invoked), scanned A, original, MIT.

A set of Azure Cosmos DB performance and design guidelines for NoSQL applications. It explains how data modeling, partition keys, queries, SDK use, indexing, scaling, distribution, and monitoring affect an application.

In plain words
What is it for?
Use it when designing or refactoring Cosmos DB code, reviewing queries and SDK usage, configuring throughput, using the local emulator, adding vector search or RAG, or building globally distributed applications.
Why use it?
It helps identify avoidable database performance problems and poor design choices before or during implementation. The rules are grouped by impact so higher-risk issues can be addressed first.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the azure-cosmosdb plugin — 1 skill, 1 MCP server shipped together

Good fit Use it when designing or refactoring Cosmos DB code, reviewing queries and SDK usage, configuring throughput, using the local emulator, adding vector search or RAG, or building globally distributed applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AzureCosmosDB/cosmosdb-agent-kit --skill cosmosdb-best-practices
Clone the repo
git clone --depth 1 https://github.com/AzureCosmosDB/cosmosdb-agent-kit

Made for: Claude Code, Codex.

Or install azure-cosmosdb, the plugin that ships this one along with the rest of its 1 skill, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cosmosdb-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices/github.svg)](https://agentmods.dev/skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices)
Your own site
<a href="https://agentmods.dev/skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices"><img src="https://agentmods.dev/badge/skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cosmosdb-best-practices

Your own site · 80×15
<a href="https://agentmods.dev/skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices"><img src="https://agentmods.dev/badge/skills/azurecosmosdb/cosmosdb-agent-kit/cosmosdb-best-practices.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 177 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,856 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 26 Oct 2026
  • Snyk pass 26 Oct 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00177 $0.04856
Opus 5.5 $0.00071 $0.01942
Sonnet 5.5 $0.00035 $0.00971
Haiku 4.5 $0.00018 $0.00486

Measured 3d ago against content hash 00e0c45a266c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cosmosdb-best-practices scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cosmosdb-best-practices/SKILL.md · 255 lines

How it starts

The opening of the file, as written. The whole thing — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Azure Cosmos DB Best Practices

Comprehensive performance optimization guide for Azure Cosmos DB applications, containing 100+ rules across 13 categories, prioritized by impact to guide automated refactoring and code generation.

Before answering, read the linked rule files relevant to the user's question. The quick reference below is an index, not the full guidance: SDK APIs, limits, configuration prerequisites, and caveats live in the rule bodies. Use the language-specific integration rule when one exists rather than substituting a generic pattern. Keep answers concise, but include the constraints that make the recommendation correct for the user's scenario.

When to Apply

Reference these guidelines when:

  • Designing data models for Cosmos DB
  • Choosing partition keys
  • Writing or optimizing queries
  • Implementing SDK patterns
  • Using the Cosmos DB Emulator for local development
  • Inspecting or managing Cosmos DB data with developer tooling
  • Implementing vector search or RAG features on Cosmos DB
  • Reviewing code for performance issues
  • Configuring throughput and scaling
  • Building globally distributed applications

Rule Categories by Priority

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-
12 Full-Text Search HIGH fts-
13 Security HIGH security-

Quick Reference

1. Data Modeling (CRITICAL)

Read the full file on GitHub · 255 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +35 lines 00e0c45a266c
  2. 1mo ago Changed 296e63816a70
  3. 2mo ago First seen · 220 lines · 177 tokens per session scan A c46a4a6ab5d2

Subscribe to this mod's changes

cosmosdb-best-practices is a skill published in the GitHub repository AzureCosmosDB/cosmosdb-agent-kit (61 stars, last pushed yesterday), licensed MIT. It adds 177 tokens to every session and 4,856 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

system-design-data-architecture

Design system data flows and data-layer ownership, consistency, and store choices from access patterns. Use for critical-flow design, DFD semantic review, data lineage, authority, replication, retention, or a data-tier bottleneck. Avoid unrelated framework stream/dataframe implementation questions.

HoangNguyen0403/agent-skills-standard · 60 tokens

pocketbase-best-practices

PocketBase development best practices covering collection design, API rules, authentication, SDK usage, query optimization, realtime subscriptions, file handling, deployment, and server-side extending (Go + JSVM). Current as of PocketBase v0.40 and JS SDK v0.28. Use when building PocketBase backends, designing…

greendesertsnow/pocketbase-skills · 87 tokens

api-design

A guide to designing application interfaces that other software can use, including REST, GraphQL, and gRPC APIs.

AsiaOstrich/universal-dev-standards · 116 tokens

database

A guide to database structure, data migrations, queries, and indexes. A database stores application data; a migration changes its structure, and an index helps it find data faster.

AsiaOstrich/universal-dev-standards · 111 tokens

domain-modeling

Use when introducing, reviewing, or renaming a top-level type, table, or domain concept; or choosing where state lives (in-memory vs persistent).

oribarilan/97 · 35 tokens

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

wshobson/agents · 33 tokens