← Plugin catalog
Data & Analytics

Azure Cosmos DB

Azure Cosmos DB v1.2.0

Azure Cosmos DB plugin

Create a free account to save this plugin.

From the developer

Declared capabilities

  • Read

Not specified in the available declarations: limitations, pricing & account requirements.

Onboarding example

Review my Cosmos DB data model for best practices.
Sources & dates

Developer declarations; not independently tested. Listing last checked Nov 10, 2026. Package observed Nov 10, 2026.

View package source →

Description

From the marketplace listing

The official Azure Cosmos DB plugin bundles a curated set of agent skills covering data modeling, partition key design, query optimization, SDK best practices (singleton client, bulk operations, direct mode), indexing strategies (composite, spatial, exclude unused), vector search (DiskANN, flat, quantized flat), full-text search (BM25, hybrid queries), global distribution (multi-region writes, conflict resolution), security (Entra ID, managed identity, RBAC, network restrictions), throughput and scaling (autoscale, serverless), monitoring and diagnostics, and design patterns (change feed, transactional batch). It gives your agent the knowledge to generate reliable Cosmos DB code and apply best practices end to end.

Language: English · Automatically detected from descriptions.

Matches for “write code”

Exact text from the indicated source. A mention alone does not establish support for your task.

Publisher full description

The official Azure Cosmos DB plugin bundles a curated set of agent skills covering data modeling, partition key design, query optimization, SDK best practices (singleton client, bulk operations, direct mode), indexing strategies (composite, spatial, exclude unused), vector search (DiskANN, flat, quantized flat), full-text search (BM25, hybrid queries), global distribution (multi-region writes, conflict resolution), security (Entra ID, managed identity, RBAC, network restrictions), throughput and scaling (autoscale, serverless), monitoring and diagnostics, and design patterns (change feed, transactional batch). It gives your agent the knowledge to generate reliable Cosmos DB code and apply best practices end to end.

Publisher description

Official Codex plugin for Azure Cosmos DB (NoSQL). Best practice skills for data modeling, queries, indexing, vector search, security, and more.

What changed

Keywords

Files & skills

File archives

Plugin package147 files · 169 KBBrowse files →
Skill instructions
cosmosdb-best-practices16.4 KB

View saved version →

---
name: cosmosdb-best-practices
description: "Azure Cosmos DB performance optimization and best practices for NoSQL data modeling, partitioning, queries, indexing, throughput, vector search, full-text search, global distribution, and SDK usage. Use when writing, reviewing, or refactoring applications that interact with Azure Cosmos DB for NoSQL. Do not use for relational databases, Redis, Elasticsearch, DynamoDB, Cassandra, Azure DocumentDB, or Cosmos DB APIs for PostgreSQL or MongoDB."
---

# Azure Cosmos DB Best Practices

Comprehensive performance optimization guide for Azure Cosmos DB applications, containing 100+ rules across 12 categories, prioritized by impact to guide automated refactoring and code generation.

## When to Apply

Reference these guidelines when:
- Designing data models for Cosmos DB
- Choosing partition keys
- Writing or optimizing queries
- Implementing SDK patterns
- Using the Cosmos DB Emulator for local development
- Inspecting or managing Cosmos DB data with developer tooling
- Implementing vector search or RAG features on Cosmos DB
- Reviewing code for performance issues
- Configuring throughput and scaling
- Building globally distributed applications

## Rule Categories by Priority

| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Data Modeling | CRITICAL | `model-` |
| 2 | Partition Key Design | CRITICAL | `partition-` |
| 3 | Query Optimization | HIGH | `query-` |
| 4 | SDK Best Practices | HIGH | `sdk-` |
| 5 | Indexing Strategies | MEDIUM-HIGH | `index-` |
| 6 | Throughput & Scaling | MEDIUM | `throughput-` |
| 7 | Global Distribution | MEDIUM | `global-` |
| 8 | Monitoring & Diagnostics | LOW-MEDIUM | `monitoring-` |
| 9 | Design Patterns | HIGH | `pattern-` |
| 10 | Developer Tooling | MEDIUM | `tooling-` |
| 11 | Vector Search | HIGH | `vector-` |

## Quick Reference

### 1. Data Modeling (CRITICAL)

- [model-embed-related](rules/model-embed-related.md) - Embed related data retrieved together
- [model-reference-large](rules/model-reference-large.md) - Reference data when items get too large
- [model-avoid-2mb-limit](rules/model-avoid-2mb-limit.md) - Keep items well under 2MB limit
- [model-id-constraints](rules/model-id-constraints.md) - Follow ID value length and character constraints
- [model-nesting-depth](rules/model-nesting-depth.md) - Stay within 128-level nesting depth limit
- [model-numeric-precision](rules/model-numeric-precision.md) - Understand IEEE 754 numeric precision limits
- [model-denormalize-reads](rules/model-denormalize-reads.md) - Denormalize for read-heavy workloads including pre-computed aggregates
- [model-schema-versioning](rules/model-schema-versioning.md) - Version your document schemas
- [model-type-discriminator](rules/model-type-discriminator.md) - Use type discriminators for polymorphic data
- [model-json-serialization](rules/model-json-serialization.md) - Handle JSON serialization correctly for Cosmos DB documents
- [model-relationship-references](rules/model-relationship-references.md) - Use ID references with transient hydration for document relationships

### 2. Partition Key Design (CRITICAL)

- [partition-high-cardinality](rules/partition-high-cardinality.md) - Choose high-cardinality partition keys
- [partition-avoid-hotspots](rules/partition-avoid-hotspots.md) - Distribute writes evenly
- [partition-hierarchical](rules/partition-hierarchical.md) - Use hierarchical partition keys for flexibility; order levels broad→narrow
- [partition-query-patterns](rules/partition-query-patterns.md) - Align partition key with query patterns
- [partition-synthetic-keys](rules/partition-synthetic-keys.md) - Create synthetic keys when needed
- [partition-key-length](rules/partition-key-length.md) - Respect partition key value length limits
- [partition-immutable-key](rules/partition-immutable-key.md) - Choose immutable properties as partition keys
- [partition-20gb

Preview of the first 4,000 characters. Read full instructions →

Referenced files: 141 — file references are metadata, not package contents.

Package details

Publisher declarations from the archived package. These are separate from our research and the live service's terms.

Package license
MIT
Package author
Azure Cosmos DB
Keywords
See keywords

Declared capabilities

  • Read

Package observed Nov 10, 2026.

Technical details
First seen
Sep 30, 2026 · 22:02 UTC
Last seen
Nov 10, 2026 · 12:00 UTC
Collection status
Collected

plugins_6a7bec8e2dc881919fc93f62e4329ee2

Download plugin data (JSON)

Plugin details: freshly prepared. Prepared . Refreshed when plugin data changes or after 6 hours. Your account and Follow status are live.