cosmos-pre-commit-validation

cosmos-pre-commit-validation is a skill for Claude Code from Azure/azure-sdk-for-rust. It costs 35 tokens per session (1,194 once invoked), scanned A, original, MIT.

A focused set of pre-commit checks for Rust files in the Azure Cosmos SDK. Pre-commit checks catch problems before code is committed or reviewed.

In plain words
What is it for?
Use it to validate all Cosmos SDK changes or a specific crate, scanning either changed Rust files or every Rust file in scope.
Why use it?
It limits validation to the relevant changed files or selected crate, while avoiding generated files that external tools produce.

Skill for Claude Code ✓ vendor

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions AGENTS.md.

Good fit Use it to validate all Cosmos SDK changes or a specific crate, scanning either changed Rust files or every Rust file in scope.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation
About the project

Azure SDK for Rust is a collection of Rust libraries, organized as separate crates, for interacting with Azure services. Rust developers use the crates and examples to build applications that work with Azure. The catalogue entries provide coding-agent skills, instructions, agents, and MCP integrations for working with the SDK.

Azure/azure-sdk-for-rust · 886 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Azure/azure-sdk-for-rust --skill cosmos-pre-commit-validation
Clone the repo
git clone --depth 1 https://github.com/Azure/azure-sdk-for-rust

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cosmos-pre-commit-validation

README.md
[![agentmods](https://agentmods.dev/badge/skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation/github.svg)](https://agentmods.dev/skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation)
Your own site
<a href="https://agentmods.dev/skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation"><img src="https://agentmods.dev/badge/skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cosmos-pre-commit-validation

Your own site · 80×15
<a href="https://agentmods.dev/skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation"><img src="https://agentmods.dev/badge/skills/azure/azure-sdk-for-rust/cosmos-pre-commit-validation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 74
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01194
Opus 5.5 $0.00014 $0.00478
Sonnet 5.5 $0.00007 $0.00239
Haiku 4.5 $0.00003 $0.00119

Measured 1mo ago against content hash 6882a7ad5ed0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cosmos-pre-commit-validation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

sdk/cosmos/.github/skills/cosmos-pre-commit-validation/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cosmos SDK Pre-Commit Checks

When to use this skill

Use this skill when:

  • Reviewing or validating changes in the Cosmos SDK
  • Running pre-commit checks locally before pushing
  • Performing focused code review on sdk/cosmos/**

Behavior

Follow these steps strictly:

  1. Determine the target path:

    • If the 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).
    • Otherwise, set the target path to sdk/cosmos.
  2. Determine file scope:

    • If 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.
    • If changed-only is false, scan all .rs files under the target path(s).
    • In both modes, skip files in generated/ subdirectories — these are produced by external tools and must never be modified.
  3. Validate using the Pre-Completion Validation Checklist in sdk/cosmos/AGENTS.md:

    • Formatting checks
    • Build succeeds for affected crates
    • Clippy lints pass for affected crates, with warnings treated as errors (-D warnings) to match CI behavior. Run clippy with RUSTFLAGS=-D warnings set:
      • Bash: RUSTFLAGS='-D warnings' cargo clippy -p <crate> --all-features --all-targets
      • PowerShell: $env:RUSTFLAGS='-D warnings'; cargo clippy -p <crate> --all-features --all-targets; $env:RUSTFLAGS=$null
    • Re-run formatting after any auto-fix: if auto-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).
    • Documentation builds successfully where applicable
    • Spell check (cspell): CI runs cspell on all changed files using the root config at .vscode/cspell.json; Cosmos-specific words are managed in ignoreWords in sdk/cosmos/.cspell.json. Run locally with: npx cspell lint --config sdk/cosmos/.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 ignoreWords in sdk/cosmos/.cspell.json.
    • Unit and emulator tests relevant to the touched modules and crates
    • CI-gated tests: Tests gated by 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 --tests
      • RUSTFLAGS='--cfg test_category="multi_write"' cargo test -p azure_data_cosmos --features fault_injection,key_auth --tests On 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.

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 96 lines · 35 tokens per session scan A 6882a7ad5ed0

Subscribe to this mod's changes

cosmos-pre-commit-validation is a skill published in the GitHub repository Azure/azure-sdk-for-rust (886 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 1,194 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.