azure-cosmosdb

Design and optimize Azure Cosmos DB NoSQL data models and SDK integrations.

Updated Jun 19, 2026
One-click install
npx skills add https://github.com/lciacci/tessera --skill azure-cosmosdb-lciacci
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-cosmosdb
Source: https://github.com/lciacci/tessera/tree/main/skills/azure-cosmosdb
Command: npx skills add https://github.com/lciacci/tessera --skill azure-cosmosdb-lciacci

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers design and operate Azure Cosmos DB databases without common scalability, performance, consistency, and cost problems.

Core Features & Use Cases

  • Data Modeling: Choose effective partition keys, use hierarchical partitioning, and structure containers and items around access patterns.
  • SDK Operations: Implement TypeScript and Python patterns for CRUD operations, point reads, queries, pagination, optimistic concurrency, batch processing, and change feed handling.
  • Production Optimization: Configure consistency levels, indexing policies, throughput modes, TTL, retry handling, and Azure CLI workflows while avoiding cross-partition queries and hot partitions.
  • Use Case: Design a multi-tenant order service with tenant-aware partitioning, efficient order queries, transactional batches, ETag-based updates, and change-feed processing.

Quick Start

Ask the Azure Cosmos DB skill to design a partition key, container schema, SDK access layer, and indexing policy for your application's main access patterns.

Frequently Asked Questions about azure-cosmosdb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose the right partition keys for Azure Cosmos DB to avoid hot partitions?

Choosing effective partition keys requires analyzing your application's access patterns to distribute traffic evenly and avoid hot partitions. Structure containers around hierarchical partitioning to ensure scalable, cost-aware workloads.

How do I handle throttling and retry logic in the Cosmos DB TypeScript or Python SDK?

Handle throttling by implementing retry handling and concurrency controls in your TypeScript or Python SDK operations. Configure throughput modes appropriately to manage request units and prevent throttling during high-load scenarios.

What's the best way to process change feed events in Azure Cosmos DB?

Processing change feed events involves using the Azure Cosmos DB SDK to monitor item changes efficiently. Implement change feed handling in TypeScript or Python to capture modifications while optimizing throughput and avoiding expensive cross-partition queries.

How do I optimize Azure Cosmos DB queries and avoid expensive cross-partition scans?

Optimize queries by structuring items around access patterns, using efficient point reads, and configuring indexing policies. Avoid expensive cross-partition queries by designing containers that target specific access paths.

How do I implement transactional batches and optimistic concurrency in Cosmos DB?

Implement transactional batches and optimistic concurrency by using ETag-based updates within the same partition key. This ensures safe concurrent modifications and atomic operations across multiple items in your container.

How do I configure consistency levels and TTL in Azure Cosmos DB for production workloads?

Configure consistency levels and TTL to balance data staleness against performance and cost. Adjust indexing policies and throughput modes alongside these settings to optimize production workloads using Azure CLI workflows.