/db-cosmosdb:cosmosdb-codingfrom db-cosmosdb
Use when writing or reviewing Azure Cosmos DB code — enforces partition key design, document modeling, RU estimation, TTL, change feed patterns, stored procedures (JavaScript), and cross-partition query avoidance
Ships in db-cosmosdb. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
// Multiple entity types in one container, discriminated by "type"
{ "id": "order-001", "type": "order", "customerId": "c1", "total": 100.00 }
{ "id": "item-001", "type": "orderItem", "orderId": "order-001", "customerId": "c1", "productName": "Widget" }
| Operation | Approximate RU Cost |
|---|---|
| Point read (1KB doc) | ~1 RU |
| Point read (10KB doc) | ~10 RU |
| Query (single partition, 10 results) | ~5-10 RU |
| Query (cross-partition, 10 results) | ~50-100 RU |
| Create (1KB doc) | ~5 RU |
| Replace (1KB doc) | ~10 RU |
| Delete (1KB doc) | ~5 RU |
// Container-level TTL (seconds)
{ "defaultTtl": 86400 }
// Document-level TTL override
{ "id": "session-001", "ttl": 3600 }
// Disable TTL for specific document
{ "id": "important-001", "ttl": -1 }
// Use change feed for:
// - Materialized views (denormalized read models)
// - Event-driven processing
// - Real-time analytics
// - Cross-container data synchronization
function bulkCreateItems(items) {
var context = getContext();
var container = context.getCollection();
var response = context.getResponse();
var created = 0;
if (!items || items.length === 0) {
response.setBody({ created: 0 });
return;
}
createNext(0);
function createNext(index) {
if (index >= items.length) {
response.setBody({ created: created });
return;
}
var accepted = container.createDocument(
container.getSelfLink(), items[index],
function(err, doc) {
if (err) throw new Error("Error: " + err.message);
created++;
createNext(index + 1);
});
if (!accepted) {
response.setBody({ created: created, continuation: true });
}
}
}
// Multi-level partition key for multi-tenant scenarios
var containerProperties = new ContainerProperties
{
Id = "orders",
PartitionKeyPaths = new Collection<string> { "/tenantId", "/customerId" }
};
try
{
var response = await container.ReplaceItemAsync(
order, order.Id,
new PartitionKey(order.CustomerId),
new ItemRequestOptions { IfMatchEtag = order.ETag });
}
catch (CosmosException ex) when (ex.StatusCode == HttpStatusCode.PreconditionFailed)
{
// Document was modified by another process — handle conflict
}
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/cosmosdb-frameworksUse when implementing Azure Cosmos DB code with SDKs — enforces patterns for .NET SDK (CosmosClient, LINQ, bulk), Node.js SDK (@azure/cosmos), Python SDK (azure-cosmos), and custom versioned migration scripts/cosmosdb-project-structureUse when scaffolding or reviewing Azure Cosmos DB project layout — container definition files, custom migration layout, model organization, and partition key documentation/cosmosdb-testingUse when writing tests for Azure Cosmos DB code — Cosmos DB Emulator for integration tests, xUnit/.NET patterns, Jest/Node.js patterns, mock strategies, and RU budget validationnpx claudepluginhub gagandeepp/software-agent-teams --plugin db-cosmosdb