跳到正文
cccskills
免费在 GitHub 公开

cosmosdb-best-practices

Azure Cosmos DB performance optimization and best practices guidelines for NoSQL, partitioning, queries, SDK usage, and vector search. Use when writing, reviewing, or refactoring code that interacts with Azure Cosmos DB, designing data models, optimizing queries, or implementing high-performance database operations.

中文简介正在准备中。当前显示原文说明。

集成工具Azure
查看安装方法

包含的文件(76)

  • SKILL.md10.1 KB
  • rules/_sections.md2.1 KB
  • rules/_template.md802 B
  • rules/global-conflict-resolution.md4.0 KB
  • rules/global-consistency.md3.7 KB
  • rules/global-failover.md3.7 KB
  • rules/global-multi-region.md3.2 KB
  • rules/global-read-regions.md3.9 KB
  • rules/global-zone-redundancy.md3.5 KB
  • rules/index-composite.md6.0 KB
  • rules/index-exclude-unused.md3.1 KB
  • rules/index-lazy-consistent.md3.1 KB
  • rules/index-range-vs-hash.md3.4 KB
  • rules/index-spatial.md3.1 KB
  • rules/model-avoid-2mb-limit.md2.0 KB
  • rules/model-denormalize-reads.md3.4 KB
  • rules/model-embed-related.md2.5 KB
  • rules/model-id-constraints.md2.9 KB
  • rules/model-json-serialization.md4.0 KB
  • rules/model-nesting-depth.md3.3 KB
  • rules/model-numeric-precision.md3.2 KB
  • rules/model-reference-large.md2.3 KB
  • rules/model-relationship-references.md3.6 KB
  • rules/model-schema-versioning.md2.4 KB
  • rules/model-type-discriminator.md3.5 KB
  • rules/monitoring-azure-monitor.md4.4 KB
  • rules/monitoring-diagnostic-logs.md5.1 KB
  • rules/monitoring-latency.md4.2 KB
  • rules/monitoring-ru-consumption.md4.2 KB
  • rules/monitoring-throttling.md4.4 KB
  • rules/partition-20gb-limit.md2.8 KB
  • rules/partition-avoid-hotspots.md3.4 KB
  • rules/partition-hierarchical.md2.7 KB
  • rules/partition-high-cardinality.md2.2 KB
  • rules/partition-key-length.md2.8 KB
  • rules/partition-query-patterns.md2.7 KB
  • rules/partition-synthetic-keys.md3.8 KB
  • rules/pattern-change-feed-materialized-views.md7.2 KB
  • rules/pattern-efficient-ranking.md5.8 KB
  • rules/pattern-service-layer-relationships.md4.8 KB
  • rules/query-avoid-cross-partition.md2.5 KB
  • rules/query-avoid-scans.md2.5 KB
  • rules/query-order-filters.md2.6 KB
  • rules/query-pagination.md6.2 KB
  • rules/query-parameterize.md2.9 KB
  • rules/query-use-projections.md2.7 KB
  • rules/sdk-async-api.md3.2 KB
  • rules/sdk-availability-strategy.md5.3 KB
  • rules/sdk-circuit-breaker.md8.4 KB
  • rules/sdk-connection-mode.md2.9 KB
  • rules/sdk-diagnostics.md3.6 KB
  • rules/sdk-emulator-ssl.md7.8 KB
  • rules/sdk-etag-concurrency.md8.1 KB
  • rules/sdk-excluded-regions.md4.9 KB
  • rules/sdk-java-content-response.md3.9 KB
  • rules/sdk-java-cosmos-config.md5.9 KB
  • rules/sdk-java-spring-boot-versions.md4.8 KB
  • rules/sdk-local-dev-config.md5.4 KB
  • rules/sdk-newtonsoft-dependency.md3.9 KB
  • rules/sdk-preferred-regions.md3.2 KB
  • rules/sdk-retry-429.md3.7 KB
  • rules/sdk-serialization-enums.md2.8 KB
  • rules/sdk-singleton-client.md3.7 KB
  • rules/sdk-spring-data-annotations.md3.4 KB
  • rules/sdk-spring-data-repository.md3.4 KB
  • rules/throughput-autoscale.md2.6 KB
  • rules/throughput-burst.md2.7 KB
  • rules/throughput-container-vs-database.md3.2 KB
  • rules/throughput-right-size.md3.1 KB
  • rules/throughput-serverless.md2.7 KB
  • rules/vector-distance-query.md4.8 KB
  • rules/vector-embedding-policy.md3.8 KB
  • rules/vector-enable-feature.md3.0 KB
  • rules/vector-index-type.md4.7 KB
  • rules/vector-normalize-embeddings.md8.6 KB
  • rules/vector-repository-pattern.md12.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Azure Cosmos DB Best Practices

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

73 individual rule files are in the rules/ directory, one file per rule, synced from the AzureCosmosDB/cosmosdb-agent-kit. Load only the relevant rule file(s) when answering a question — do NOT load all files at once.

When to Apply

Reference these guidelines when:

  • Designing data models for Cosmos DB
  • Choosing partition keys
  • Writing or optimizing queries
  • Implementing SDK patterns
  • Reviewing code for performance issues
  • Configuring throughput and scaling
  • Building globally distributed applications
  • Implementing vector search and RAG patterns

Rule Index

Rules are grouped by category prefix. For a given question, load files matching the relevant prefix (e.g., model-*.md for data modeling, sdk-*.md for SDK usage). See rules/_sections.md for category descriptions.

1. Data Modeling — CRITICAL (prefix: model-)

2. Partition Key Design — CRITICAL (prefix: partition-)

3. Query Optimization — HIGH (prefix: query-)

4. SDK Best Practices — HIGH (prefix: sdk-)

5. Indexing Strategies — MEDIUM-HIGH (prefix: index-)

6. Throughput & Scaling — MEDIUM (prefix: throughput-)

7. Global Distribution — MEDIUM (prefix: global-)

8. Monitoring & Diagnostics — LOW-MEDIUM (prefix: monitoring-)

9. Design Patterns — HIGH (prefix: pattern-)

10. Vector Search — HIGH (prefix: vector-)

How to Use

Each rule is a separate file under rules/. When answering a Cosmos DB question, read only the relevant rule file(s) based on the prefix matching the topic:

  • Data modeling question → read rules/model-*.md files
  • Partition key question → read rules/partition-*.md files
  • SDK/client question → read rules/sdk-*.md files
  • etc.

Each rule file contains:

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

Source: AzureCosmosDB/cosmosdb-agent-kit

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Integrates Amazon Location Service APIs for AWS applications. Use this skill when users want to add maps (interactive MapLibre or static images); geocode addresses to coordinates or reverse geocode coordinates to addresses; calculate routes, travel times, or service areas; find places and businesses through text search, nearby search, or autocomplete suggestions; retrieve detailed place information including hours, contacts, and addresses; monitor geographical boundaries with geofences; or track device locations. Covers authentication, SDK integration, and all Amazon Location Service capabilities.

中文简介正在准备中。当前显示原文说明。

cline/skills372026年7月21日 更新

Build and deploy full-stack web and mobile apps with AWS Amplify Gen2 (TypeScript code-first). Covers auth (Cognito), data (AppSync/DynamoDB including schema modeling, enum types, relationships, authorization rules), storage (S3), functions, APIs, and AI (Amplify AI Kit with Bedrock). Supports React, Next.js, Vue, Angular, React Native, Flutter, Swift, and Android. Always use this skill for Amplify Gen2 topics — even for questions you think you know — it contains validated, version-specific patterns that prevent common mistakes. TRIGGER when: user mentions Amplify Gen2; project has amplify/ directory or amplify_outputs; code imports @aws-amplify packages; user asks about defineBackend, defineAuth, defineData, defineStorage, or npx ampx. SKIP: Amplify Gen1 (amplify CLI v6), standalone SAM/CDK without Amplify (use aws-serverless), direct Bedrock without Amplify AI Kit (use bedrock).

中文简介正在准备中。当前显示原文说明。

cline/skills372026年7月21日 更新

analyzer

免费

Analyze queried data for trends, week-over-week comparisons, distributions, funnels, cohorts, top-N lists, anomalies, sanity checks, and report-ready findings. Use after or alongside ClickHouse queries when the user wants insight rather than raw rows.

中文简介正在准备中。当前显示原文说明。

cline/skills372026年7月21日 更新

Save, organize, and describe reusable analysis artifacts such as SQL, result snapshots, CSV exports, summaries, caveats, plots, and report-ready files. Use when users ask to save, export, share, cite, reproduce, or organize data-analysis outputs.

中文简介正在准备中。当前显示原文说明。

cline/skills372026年7月21日 更新

Connects the user with a LegalZoom attorney for legal consultation. Use when a user asks about attorneys, lawyers, or legal help, or when contract review reveals high risks or low-confidence findings.

中文简介正在准备中。当前显示原文说明。

cline/skills372026年7月21日 更新

Build AI agents with Pydantic AI — tools, capabilities (including on-demand loading), structured output, streaming, testing, and multi-agent patterns. Use when the user mentions Pydantic AI, imports pydantic_ai, or asks to build an AI agent, add tools/capabilities, defer capability loading, stream output, define agents from YAML, or test agent behavior.

中文简介正在准备中。当前显示原文说明。

cline/skills372026年7月21日 更新

查看 cline 的全部技能

报告此技能的问题