cosmosdb-best-practices

azurecosmosdb/cosmosdb-agent-kit · updated Apr 8, 2026

$npx skills add https://github.com/azurecosmosdb/cosmosdb-agent-kit --skill cosmosdb-best-practices
0 commentsdiscussion
summary

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

skill.md

Azure Cosmos DB Best Practices

Comprehensive performance optimization guide for Azure Cosmos DB applications, containing 75+ rules across 11 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)

2. Partition Key Design (CRITICAL)

3. Query Optimization (HIGH)

4. SDK Best Practices (HIGH)

5. Indexing Strategies (MEDIUM-HIGH)

6. Throughput & Scaling (MEDIUM)

7. Global Distribution (MEDIUM)

8. Monitoring & Diagnostics (LOW-MEDIUM)

9. Design Patterns (HIGH)

10. Developer Tooling (MEDIUM)

11. Vector Search (HIGH)

12. Full-Text Search (HIGH)

  • fts-enable-capability - Enable EnableNoSQLFullTextSearch capability on the account — prerequisite for all FTS functions
  • fts-full-text-policy - Define fullTextPolicy on the container with correct language code (en-US, case-sensitive)
  • fts-index-policy - Add fullTextIndexes entry in the indexing policy to build the inverted index
  • fts-contains-query - Use FullTextContains / FullTextContainsAll / FullTextContainsAny instead of CONTAINS(LOWER(...))
  • fts-score-ranking - Use ORDER BY RANK FullTextScore(path, term) for BM25 relevance ranking
  • fts-hybrid-query - Combine FTS predicates with range/equality filters; put most selective filter first

How to Use

Use the linked rule files above for detailed explanations and code examples. The links give the agent direct paths to the relevant guidance instead of relying on folder scanning or inferred filenames.

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.473 reviews
  • Aisha Reddy· Dec 24, 2024

    Useful defaults in cosmosdb-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Tariq Thomas· Dec 24, 2024

    Keeps context tight: cosmosdb-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Tariq Taylor· Dec 20, 2024

    cosmosdb-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Hiroshi Gupta· Dec 12, 2024

    cosmosdb-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Tariq Anderson· Dec 8, 2024

    Solid pick for teams standardizing on skills: cosmosdb-best-practices is focused, and the summary matches what you get after install.

  • Aisha Kapoor· Nov 27, 2024

    I recommend cosmosdb-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Rahul Santra· Nov 19, 2024

    We added cosmosdb-best-practices from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Aisha Jain· Nov 15, 2024

    cosmosdb-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Zara Choi· Nov 15, 2024

    Registry listing for cosmosdb-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Chen Gonzalez· Nov 11, 2024

    cosmosdb-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 73

1 / 8