cosmos-db

cosmos-db is a skill for Claude Code, Codex from jnPiyush/AgentX. It costs 75 tokens per session (3,011 once invoked), scanned A, original, Apache-2.0.

A guide to designing and operating Azure Cosmos DB, a cloud database that supports document, graph, key-value, and other data models. It gives special attention to graph data and the Gremlin query language.

In plain words
What is it for?
Use it to model connected data such as fraud networks or recommendations, choose partition keys, configure multi-region writes, set data expiration, and process data changes.
Why use it?
It helps choose the right database model, divide data efficiently, control consistency and costs, and secure access across regions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to model connected data such as fraud networks or recommendations, choose partition keys, configure multi-region writes, set data expiration, and process data changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jnpiyush/agentx/cosmos-db
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 jnPiyush/AgentX --skill cosmos-db
Clone the repo
git clone --depth 1 https://github.com/jnPiyush/AgentX

Made for: Claude Code, Codex.

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 cosmos-db

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jnpiyush/agentx/cosmos-db"><img src="https://agentmods.dev/badge/skills/jnpiyush/agentx/cosmos-db.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,011 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.00075 $0.03011
Opus 5.5 $0.00030 $0.01204
Sonnet 5.5 $0.00015 $0.00602
Haiku 4.5 $0.00007 $0.00301

Measured 1mo ago against content hash 6fbdcb6bc989, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cosmos-db 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (assets/gremlin_python_client.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.github/skills/data/cosmos-db/SKILL.md · 212 lines

How it starts

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

Azure Cosmos DB

Globally distributed, multi-model database. This skill emphasizes the Gremlin (Graph) API and covers cross-API design rules: partitioning, request units, consistency, security, and change feed.

When to Use

  • Modeling highly connected data (social, fraud rings, recommendations, knowledge graphs, IT/asset topology) with the Gremlin API
  • Designing partition keys and estimating RU/s for a new container
  • Choosing a consistency level and multi-region write strategy
  • Securing accounts with Entra ID (RBAC) and disabling key-based auth
  • Implementing change feed processors, TTL-based purges, or analytical store (Synapse Link)
  • Migrating between APIs (e.g., adjacency-list NoSQL graph -> Gremlin)

Decision Tree

Pick the right Cosmos DB API
+-- Highly connected data, multi-hop traversals    -> Gremlin (Graph) API
+-- JSON documents, flexible schema, point reads   -> NoSQL (SQL) API
+-- Existing MongoDB driver / wire protocol         -> API for MongoDB (vCore or RU)
+-- Wide-column, time-series                       -> API for Cassandra
+-- Key-value with table semantics                  -> API for Table

Picked Gremlin? Then:
+-- Vertex count >> edge count, shallow traversals  -> NoSQL with adjacency list MAY be cheaper
+-- Deep multi-hop / pattern matching               -> Gremlin (this skill)
+-- Need ACID across many vertices                  -> Re-evaluate; Cosmos has scope limits

Core Concepts

Concept Summary
Account Top-level resource; pinned to one API family (Gremlin, NoSQL, Mongo, ...)
Database Logical grouping; can hold provisioned-throughput shared by graphs
Graph (container) Holds vertices and edges; analogous to a NoSQL container
Logical partition All vertices/edges sharing the same partition key value; 20 GB hard limit per logical partition
Physical partition Cosmos-managed shard; ~50 GB and ~10k RU/s soft cap per partition
RU/s Normalized cost unit; provisioned (manual/autoscale) or serverless
Consistency Strong, Bounded Staleness, Session (default), Consistent Prefix, Eventual
Change Feed Ordered log of inserts/updates per logical partition

Read the full file on GitHub · 212 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. 1mo ago Changed 6fbdcb6bc989
  2. 1mo ago First seen · 212 lines · 75 tokens per session scan A 27f7705f27de

Subscribe to this mod's changes

cosmos-db is a skill published in the GitHub repository jnPiyush/AgentX (16 stars, last pushed 3d ago), licensed Apache-2.0. It adds 75 tokens to every session and 3,011 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

dbx

Use the DBX CLI to inspect DBX-managed database connections, explore schemas, run bounded read-only queries, generate DBML or schema documentation, and open tables in DBX Desktop. Use when the user asks to work with a database configured in DBX from a shell-capable AI agent. Never enable writes unless the user…

t8y2/dbx · 74 tokens

azure-mgmt-mongodbatlas-dotnet

Manage MongoDB Atlas Organizations as Azure ARM resources using Azure.ResourceManager.MongoDBAtlas SDK. Use when creating, updating, listing, or deleting MongoDB Atlas organizations through Azure Marketplace integration. This SDK manages the Azure-side organization resource, not Atlas clusters/databases directly.

microsoft/skills · 64 tokens

nosqli

NoSQL injection — MongoDB operator injection ($ne, $gt, $where, $regex), CouchDB / Firebase / Redis attack patterns, auth bypass, blind extraction.

PurpleAILAB/Decepticon · 38 tokens

prisma-mongodb-upgrade

Decision and migration guide for Prisma ORM MongoDB projects on v6, which have no upgrade path to v7. Use when a MongoDB project asks about upgrading Prisma, when "upgrade to prisma 7" comes up in a project with provider = "mongodb", or when evaluating a move to Prisma Next. Triggers on "upgrade prisma mongodb"…

nitrocloudofficial/nitrostack · 95 tokens

byted-volcengine-mongodb

An operations tool for Volcengine MongoDB, a document database that stores data in flexible, JSON-like records. It can query managed MongoDB instances and return details for further explanation or diagnosis.

bytedance/agentkit-samples · 82 tokens

mongodb-connection

Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling connect()), configuring connection pools, troubleshooting connection errors…

fcakyon/claude-codex-settings · 122 tokens