Agent skill · software engineering · aiskillstore

azure-cosmos-db-py

Build production-grade Azure Cosmos DB NoSQL services following clean code, security best practices, and TDD principles.

Why this skill is useful

Provides specific implementation patterns and best practices for Azure Cosmos DB services that the AI wouldn't reliably generate on its own.

What it needs

Requires azure-cosmos, azure-identity installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

Cosmos DB Service Implementation Build production-grade Azure Cosmos DB NoSQL services following clean code, security best practices, and TDD principles. Installation Environment Variables Authentication DefaultAzureCredential (preferred): Emulator (local development): Architecture Overview Quick Start 1. Client Module Setup Create a singleton Cosmos client with dual authentication: Full implementation: See references/client-setup.md 2. Pydantic Model Hierarchy Use five-tier model pattern for clean separation: 3. Service Layer Pattern Full patterns: See references/service-layer.md Core Principles Security Requirements 1. RBAC Authentication: Use DefaultAzureCredential in Azure — never store keys in code 2. Emulator-Only Keys: Hardcode the well-known emulator key only for local development 3. Parameterized Queries: Always use @parameter syntax — never string concatenation 4. Partition Key Validation: Validate partition key access matches user authorization Clean Code Conventions 1. Single Responsibility: Client module handles connection; services handle business logic 2. Graceful Degradation: Services return None/[] when Cosmos unavailable 3. Consistent Naming: doctomodel(), modeltodoc(), usecosmos() 4. Type Hints: Full typing on all public methods 5. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/azure-cosmos-db-py

View the source on GitHub

Browse the @skills marketplace