Azure Cosmos DB Pattern
| Always-on contract |
Required behavior |
| API scope |
Default Azure Cosmos DB for NoSQL only. MongoDB/vCore, Cassandra, Table, Gremlin, PostgreSQL and Fabric aren't interchangeable; route to their own verified docs/skill. |
| Safety |
Loading/selection never executes Azure work. Confirm tenant/subscription/principal, account/database/container, region and permitted evidence before live reads. Exact approval separately covers every mutation, restore, deployment, backfill or load run. |
| Preserve |
Keep existing IaC ownership and data. No reset, implicit createIfNotExists/adoption, broad item export, credentials inspection, key listing, feature activation or hidden scans. |
| Evidence |
Separate sourced facts, assumptions, local checks, metadata readback and runtime proof. Return proportionate PASS/MISS/UNVERIFIED; no universal SDK or performance claims. |
| Lazy loading |
Read the selected command and selected feature paths only. Links are indexes, not recursive preload instructions. Never bulk-read siblings, examples, source ledger or evals on load. |
Commands
When supported by the host, ask /azure-cosmosdb-pattern <command>; $azure-cosmosdb-pattern
or plain language may be used instead. This package registers no host command.
Real local selector: python3 scripts/select_mode.py <command> emits JSON paths only.
| Command |
Load selected procedure |
| help |
Help; show commands and stop |
| select |
Feature selection |
| design |
Design |
| refactor |
Refactor |
| audit |
Audit, then only offline or authorized live variant |
| performance-test |
Bounded performance plan |
| feature-plan |
Feature lifecycle plan |
| backup |
Protection plan, then continuous or periodic |
| restore |
Recovery plan, then selected native recovery method |
Audit defaults offline; features default core except recovery defaults backup.
Help stops without source/environment inspection. Unknown inputs fail closed.
No combo command or automatic command chaining; each manual step retains its gates.
Domain routes
| Selected task / feature |
Read only when relevant |
| End-to-end implementation sequence |
Workflow |
| core: partition/id, tenant/access-pattern model |
Modeling, runtime |
| indexes / capacity: range/composite/spatial, RUs/hot keys |
Indexing and capacity |
| iam: control/data plane, Entra identities, keys |
Access control |
| encryption: service-managed vs Key Vault CMK |
Encryption |
| ttl: expiry, concurrency, migration |
Runtime |
| backup: protection overview |
Recovery, then only chosen method |
| replication: regional/consistency resilience |
Replication |
| change-feed: consumers, Functions, deletion limits |
Change feed |
| vectors: JSON types/native policy/search |
Types and vectors |
| embeddings: model/precision, source refs, Azure integrations |
Embeddings |
| monitoring: selected-domain observability |
Metrics |
| provisioning: ARM and az CLI assets |
Provisioning, selected asset only |
| Existing language/SDK or REST |
Adapters, matching section only |
| CLI cookbook |
Azure CLI |
| Time-sensitive claims / research |
Dated sources |
| Due review / edits |
Maintenance / eval contract |
At substantive use (not help), run scripts/review_due.py --as-of YYYY-MM-DD
using the actual client-local date. Review every June/December, initially due
2026-12-01. If due/overdue, load Maintenance and remind the user. Never advance
the ledger on load or from a partial update. No calendar/background notification.
1---2name: azure-cosmosdb-pattern3description: "Design, implement, refactor, audit and debug Azure Cosmos DB for NoSQL access patterns in any language: partition/id routing, indexing/RUs, consistency/session tokens, transactions/ETags, TTL/change feed, Entra RBAC, service/customer-managed encryption, vectors/embeddings, ARM/CLI provisioning and continuous/periodic backup/restore. Select lazy command/feature routes and bounded performance plans. Other Cosmos APIs require their own workflow. Not authorization to access Azure, deploy, restore or run load."4allowed-tools: Read Grep Glob Bash(python3 scripts/select_mode.py:*) Bash(python3 scripts/review_due.py:*)5metadata:6 source: https://skillmd.com/skills/vincentchuwaichow/azure-cosmosdb-pattern7 author: "github: VincentChuWaiChow"8 version: "1.0.0"9 updated: "2026-11-09"10 category: data11---1213# Azure Cosmos DB Pattern1415| Always-on contract | Required behavior |16|---|---|17| API scope | Default **Azure Cosmos DB for NoSQL** only. MongoDB/vCore, Cassandra, Table, Gremlin, PostgreSQL and Fabric aren't interchangeable; route to their own verified docs/skill. |18| Safety | Loading/selection never executes Azure work. Confirm tenant/subscription/principal, account/database/container, region and permitted evidence before live reads. Exact approval separately covers every mutation, restore, deployment, backfill or load run. |19| Preserve | Keep existing IaC ownership and data. No reset, implicit createIfNotExists/adoption, broad item export, credentials inspection, key listing, feature activation or hidden scans. |20| Evidence | Separate sourced facts, assumptions, local checks, metadata readback and runtime proof. Return proportionate PASS/MISS/UNVERIFIED; no universal SDK or performance claims. |21| Lazy loading | Read the selected command and selected feature paths only. Links are indexes, not recursive preload instructions. Never bulk-read siblings, examples, source ledger or evals on load. |2223## Commands2425When supported by the host, ask `/azure-cosmosdb-pattern <command>`; `$azure-cosmosdb-pattern`26or plain language may be used instead. This package registers no host command.27Real local selector: `python3 scripts/select_mode.py <command>` emits JSON paths only.2829| Command | Load selected procedure |30|---|---|31| help | [Help](references/commands/help.md); show commands and stop |32| select | [Feature selection](references/commands/select.md) |33| design | [Design](references/commands/design.md) |34| refactor | [Refactor](references/commands/refactor.md) |35| audit | [Audit](references/commands/audit.md), then only offline or authorized live variant |36| performance-test | [Bounded performance plan](references/commands/performance-test.md) |37| feature-plan | [Feature lifecycle plan](references/commands/feature-plan.md) |38| backup | [Protection plan](references/commands/backup.md), then continuous or periodic |39| restore | [Recovery plan](references/commands/restore.md), then selected native recovery method |4041Audit defaults offline; features default core except recovery defaults backup.42Help stops without source/environment inspection. Unknown inputs fail closed.43No combo command or automatic command chaining; each manual step retains its gates.4445## Domain routes4647| Selected task / feature | Read only when relevant |48|---|---|49| End-to-end implementation sequence | [Workflow](references/workflow.md) |50| core: partition/id, tenant/access-pattern model | [Modeling](references/modeling.md), [runtime](references/runtime-contract.md) |51| indexes / capacity: range/composite/spatial, RUs/hot keys | [Indexing and capacity](references/indexing-and-capacity.md) |52| iam: control/data plane, Entra identities, keys | [Access control](references/access-control.md) |53| encryption: service-managed vs Key Vault CMK | [Encryption](references/encryption.md) |54| ttl: expiry, concurrency, migration | [Runtime](references/runtime-contract.md) |55| backup: protection overview | [Recovery](references/recovery.md), then only chosen method |56| replication: regional/consistency resilience | [Replication](references/replication.md) |57| change-feed: consumers, Functions, deletion limits | [Change feed](references/change-feed-and-integrations.md) |58| vectors: JSON types/native policy/search | [Types and vectors](references/data-types-and-vectors.md) |59| embeddings: model/precision, source refs, Azure integrations | [Embeddings](references/embedding-integrations.md) |60| monitoring: selected-domain observability | [Metrics](references/monitoring.md) |61| provisioning: ARM and az CLI assets | [Provisioning](references/provisioning.md), selected asset only |62| Existing language/SDK or REST | [Adapters](references/language-adapters.md), matching section only |63| CLI cookbook | [Azure CLI](references/commands/azure-cli.md) |64| Time-sensitive claims / research | [Dated sources](references/sources.md) |65| Due review / edits | [Maintenance](references/maintenance.md) / [eval contract](evals/eval.md) |6667At substantive use (not help), run `scripts/review_due.py --as-of YYYY-MM-DD`68using the actual client-local date. Review every June/December, initially due69**2026-12-01**. If due/overdue, load Maintenance and remind the user. Never advance70the ledger on load or from a partial update. No calendar/background notification.