Agent skill · software engineering · aiskillstore
azure-cosmos-py
Azure Cosmos DB SDK for Python (NoSQL API). Use for document CRUD, queries, containers, and globally distributed data.
Why this skill is useful
Provides specific commands and patterns for interacting with Azure Cosmos DB that the AI wouldn't reliably generate on its own.
What it needs
Requires azure-cosmos, azure-identity installed locally. Requires azure account access. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Azure Cosmos DB SDK for Python Client library for Azure Cosmos DB NoSQL API — globally distributed, multi-model database. Installation Environment Variables Authentication Client Hierarchy Client Purpose Get From -------- --------- ---------- CosmosClient Account-level operations Direct instantiation DatabaseProxy Database operations client.getdatabaseclient() ContainerProxy Container/item operations database.getcontainerclient() Core Workflow Setup Database and Container Create Item Read Item Update Item (Replace) Upsert Item Delete Item Queries Basic Query Cross-Partition Query Query with Projection Read All Items Partition Keys Critical: Always include partition key for efficient operations. Throughput Async Client Error Handling Best Practices 1. Always specify partition key for point reads and queries 2. Use parameterized queries to prevent injection and improve caching 3. Avoid cross-partition queries when possible 4. Use upsertitem for idempotent writes 5. Use async client for high-throughput scenarios 6. Design partition key for even data distribution 7. Use readitem instead of query for single document retrieval Reference Files File Contents ------ ---------- references/partitioning.md Partition key strategies, hierarchical keys, hot partition detection and mitigation references/query-patterns.md Query optimization, aggregations, pagination, transactions, change feed scripts/setupcosmoscontainer.py CLI tool for creating containers with partitioning, throughput, and indexing When to Use This skill is applicable to execute the workflow or actions described in the overview. Limitations Use this skill only when the task clearly matches the scope described above. Do not treat the output as a substitute for environment-specific validation, testing, or expert review. Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/azure-cosmos-py