azure-cosmosdb

azure-cosmosdb is a skill for Claude Code from alinaqi/maggy. It costs 19 tokens per session (4,439 once invoked), scanned A, original, MIT.

A guide to Azure Cosmos DB, Microsoft's globally distributed database service. It focuses on the NoSQL API, which stores JSON-like documents, and explains partitions, consistency choices, and request units, the service's measure of database work.

In plain words
What is it for?
It is for choosing partition keys, selecting consistency levels, using the change feed, and writing SDK-based applications for Cosmos DB's NoSQL API.
Why use it?
It helps prevent uneven data distribution, slow queries, and unexpected usage costs caused by poor partition-key choices. It also clarifies the differences between Cosmos DB's supported database interfaces.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit It is for choosing partition keys, selecting consistency levels, using the change feed, and writing SDK-based applications for Cosmos DB's NoSQL API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alinaqi/maggy/azure-cosmosdb
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 alinaqi/maggy --skill azure-cosmosdb
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

Made for: Claude Code.

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 azure-cosmosdb

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/azure-cosmosdb/github.svg)](https://agentmods.dev/skills/alinaqi/maggy/azure-cosmosdb)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/azure-cosmosdb"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/azure-cosmosdb/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 azure-cosmosdb

Your own site · 80×15
<a href="https://agentmods.dev/skills/alinaqi/maggy/azure-cosmosdb"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/azure-cosmosdb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,439 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
  • 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.00019 $0.04439
Opus 5 $0.00010 $0.02219
Sonnet 5 $0.00004 $0.00888
Haiku 4.5 $0.00002 $0.00444

Measured 12d ago against content hash 2ae48f349b44, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

azure-cosmosdb 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 12d 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/azure-cosmosdb/SKILL.md · 714 lines

How it starts

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

Core Principle

Choose partition key wisely, design for your access patterns, understand consistency tradeoffs.

Cosmos DB distributes data across partitions. Your partition key choice determines scalability, performance, and cost. Design for even distribution and query efficiency.


Cosmos DB APIs

API Use Case
NoSQL (Core) Document database, most flexible
MongoDB MongoDB wire protocol compatible
PostgreSQL Distributed PostgreSQL (Citus)
Apache Cassandra Wide-column store
Apache Gremlin Graph database
Table Key-value (Azure Table Storage compatible)

This skill focuses on NoSQL (Core) API - the most common choice.


Key Concepts

Concept Description
Container Collection of items (like a table)
Item Single document/record (JSON)
Partition Key Determines data distribution
Logical Partition Items with same partition key
Physical Partition Storage unit (max 50GB, 10K RU/s)
RU (Request Unit) Throughput currency

Partition Key Design

Good Partition Keys

// High cardinality, even distribution, used in queries

// E-commerce: userId for user data
{ "id": "order-123", "userId": "user-456", ... }  // PK: /userId

// Multi-tenant: tenantId
{ "id": "doc-1", "tenantId": "tenant-abc", ... }  // PK: /tenantId

// IoT: deviceId for telemetry
{ "id": "reading-1", "deviceId": "device-789", ... }  // PK: /deviceId

// Logs: synthetic key (date + category)
{ "id": "log-1", "partitionKey": "2024-01-15_errors", ... }  // PK: /partitionKey

Hierarchical Partition Keys

// For multi-level distribution (e.g., tenant → user)
// Container created with: /tenantId, /userId

{
  "id": "order-123",
  "tenantId": "acme-corp",
  "userId": "user-456",
  "items": [...]
}

// Query within tenant and user efficiently

Bad Partition Keys

// Avoid:
// - Low cardinality (status, type, boolean)
// - Monotonically increasing (timestamp, auto-increment)
// - Frequently updated fields
// - Fields not used in queries

// Bad: Only 3 values → hot partitions
{ "status": "pending" | "completed" | "cancelled" }

// Bad: All writes go to latest partition
{ "timestamp": "2024-01-15T10:30:00Z" }

Read the full file on GitHub · 714 lines

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. 12d ago First seen · 714 lines · 19 tokens per session scan A 2ae48f349b44

Subscribe to this mod's changes

azure-cosmosdb is a skill published in the GitHub repository alinaqi/maggy (707 stars, last pushed 3d ago), licensed MIT. It adds 19 tokens to every session and 4,439 once invoked, about $0.0001 per session on Opus 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

writing-python

Idiomatic Python 3.12+ development. Use when writing Python code, CLI tools, scripts, or services. Emphasizes stdlib, type hints, fast pytest feedback, uv/ruff/pyright toolchain, and minimal dependencies. NOT for Go, Rust, TypeScript, or shell-only tasks.

alexei-led/cc-thingz · 67 tokens

python-authoring

Write, edit, refactor, or review Python in easy-cheese with concise stdlib-first code, Python 3.12, Shiv .pyz packaging, and repository test and validation conventions. Use for Python changes under src/, scripts/, .github/scripts/, or tests/, especially when the user asks for Pythonic, succinct, de-slopped…

paulnsorensen/easy-cheese · 88 tokens

frappe-backend

Frappe backend guidance for Python and backend-adjacent JavaScript surfaces such as client interaction patterns, hooks, APIs, patches, scheduler logic, reports, and server-side review. Use when implementing or reviewing Frappe backend behavior.

Dkm0315/frappe-agent · 53 tokens

python-best-practices

Python/FastAPI coding standards including async patterns, Pydantic v2, SQLAlchemy 2.0, and project structure. Use when writing Python code, reviewing FastAPI projects, or learning FastAPI conventions.

KunanonJ/ai-skills-hub · 50 tokens

python-packaging

Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.

KunanonJ/ai-skills-hub · 33 tokens

python-type-annotator

Add missing type annotations to Python code. Generates mypy-compatible type hints for function signatures, variables, and class attributes. Triggers on "add types", "type annotate", "add type hints", "type this file".

luqiang-code/claude-code-skills · 51 tokens