> Run pre-commit checks for a specific set of crates. Use this when validating changes under sdk/cosmos before committing or during code review.
npx skills add https://github.com/Azure/azure-sdk-for-rust --skill cosmos-pre-commit-validation
Use this skill when:
sdk/cosmos/**Follow these steps strictly:
scope argument is specified and is not equal (case-insensitive) to all or *, set the target path to sdk/cosmos/<scope> (for example, if scope is azure_data_cosmos, use sdk/cosmos/azure_data_cosmos as the target path).sdk/cosmos.changed-only is true (the default), restrict scanning to .rs files that differ between the current local branch and main. Use git diff --name-only main -- <target path> (and include per-crate tests/ directories) to obtain the list. Only .rs files in the result set are scanned; all other files are skipped.changed-only is false, scan all .rs files under the target path(s).generated/ subdirectories — these are produced by external tools and must never be modified.sdk/cosmos/AGENTS.md:-D warnings) to match CI behavior.Run clippy with RUSTFLAGS=-D warnings set:
RUSTFLAGS='-D warnings' cargo clippy -p <crate> --all-features --all-targets$env:RUSTFLAGS='-D warnings'; cargo clippy -p <crate> --all-features --all-targets; $env:RUSTFLAGS=$nullauto-fix is true and clippy or other tools modified files,re-run cargo fmt to ensure the auto-fixed code is properly formatted (e.g., cargo clippy --fix can
leave trailing blank lines when removing unused imports).
.vscode/cspell.jsonwith the Cosmos-specific dictionary at sdk/cosmos/.dict.txt. Run locally with:
npx cspell lint --config .vscode/cspell.json --no-must-find-files <target path>/**
If auto-fix is true and unknown words are legitimate (e.g., API type names, technical terms),
add them to sdk/cosmos/.dict.txt.
test_category (e.g., emulator, multi-write) are always compiled but are ignored at runtime unless the corresponding cfg is set via RUSTFLAGS.This means cargo check --tests and cargo test will compile these tests without any special flags, so build errors are caught locally.
RUSTFLAGS is only needed when you want to actually run the tests:
RUSTFLAGS='--cfg test_category="emulator"' cargo test -p azure_data_cosmos --features fault_injection,key_auth --testsRUSTFLAGS='--cfg test_category="multi_write"' cargo test -p azure_data_cosmos --features fault_injection,key_auth --testsOn Windows (PowerShell), set the env var first: $env:RUSTFLAGS='--cfg test_category="emulator"' then run the cargo test command, and clear it afterwards with $env:RUSTFLAGS=$null.
These tests require a live Cosmos DB emulator or multi-region account to run.
If scope targets a specific crate other than azure_data_cosmos, skip these checks.
auto-fix argument is truesdk/cosmosExecute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping
Comprehensive GitHub code review with AI-powered swarm coordination
Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.
GitHub CLI (gh) comprehensive reference for repositories, issues, pull requests, Actions, projects, releases, gists, codespaces, organizations, extensions, and all GitHub operations from the command line.
GitHub CLI - manage repositories, issues, pull requests, actions, releases, and more from the command line.
You are a code refactoring expert specializing in clean code principles, SOLID design patterns, and modern software engineering best practices. Analyze and refactor the provided code to improve its quality, maintainability, and performance.
You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti
Take azure/cosmos-pre-commit-validation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npx.
Without those the skill loads but fails at the first command.