What problem does it solve?
This Skill provides clear, production-oriented guidance and patterns to perform data-plane operations on Azure Cosmos DB using the @azure/cosmos TypeScript SDK, removing uncertainty and boilerplate for developers who need reliable CRUD, query, and bulk workflows.
Core Features & Use Cases
- Document CRUD & Patch: Examples and patterns for create, read, replace, upsert, delete, and patch operations with partition key usage.
- Queries & Pagination: Parameterized queries, continuation token pagination, cross-partition queries, projections, and aggregate patterns.
- Bulk & Chunked Workflows: Bulk create/upsert/replace/delete/patch patterns, chunking strategies, and retry-on-429 with exponential backoff.
- Auth, Concurrency & Error Handling: AAD and key-based authentication examples, ETag optimistic concurrency, and explicit error handling for 404/409/412/429.
- Use Case: Implement a TypeScript service layer that upserts product documents in batches and safely queries per-customer partitions with retries for rate limits.
Quick Start
Create a CosmosClient with DefaultAzureCredential, create-or-get database my-database and container my-container with partition key /category, then insert a sample product document and run a parameterized query to return it.