pre-commit-checks

pre-commit-checks is a skill for Claude Code, Codex from Azure/azure-sdk-for-net. It costs 48 tokens per session (1,603 once invoked), scanned A, original, MIT.

A set of checks to run before committing or pushing changes to Azure's .NET SDK packages. It validates formatting, public API listings, code snippets, and generated code when those files are affected.

In plain words
What is it for?
Use it after editing files under the SDK packages to determine affected services and packages, run the required checks, and include any generated changes.
Why use it?
It catches repository-specific validation and regeneration work before changes are committed. This reduces the chance of missing files or publishing inconsistent SDK output.

Skill for Claude CodeCodex

About the project

Azure SDK for .NET is a repository containing the actively developed C# libraries that applications use to work with Azure services. It is for .NET developers building software that connects to Azure storage, management, and other cloud services.

Azure/azure-sdk-for-net · 6,049 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.

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

Made for: Claude Code, Codex.

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 pre-commit-checks

README.md
[![agentmods](https://agentmods.dev/badge/skills/azure/azure-sdk-for-net/pre-commit-checks.svg)](https://agentmods.dev/skills/azure/azure-sdk-for-net/pre-commit-checks)
Your own site
<a href="https://agentmods.dev/skills/azure/azure-sdk-for-net/pre-commit-checks"><img src="https://agentmods.dev/badge/skills/azure/azure-sdk-for-net/pre-commit-checks.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,603 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00048 $0.01603
Opus 5 $0.00024 $0.00801
Sonnet 5 $0.00010 $0.00321
Haiku 4.5 $0.00005 $0.00160

Measured 5d ago against content hash 9dcc926ed2ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pre-commit-checks 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 5d 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.

.github/skills/pre-commit-checks/SKILL.md · 115 lines

How it starts

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

Pre-Commit Validation Checks

Run these checks after making changes to SDK packages under sdk/ and before staging, committing, or pushing. These steps may produce additional file changes that must be included in the commit.

General rule: Steps 3–5 are conditional to save time, but if you are unsure whether a step is needed, always run it. It is better to run an unnecessary script than to miss a required regeneration.

1. Determine scope from changed files

  • Derive the changed file list from git status --porcelain (or by combining git diff --name-only HEAD with git ls-files -o --exclude-standard) so that untracked (new) files are included.
  • From the changed file list, extract all unique ServiceDirectories — the first path segment after sdk/ (e.g., sdk/storage/...storage, sdk/ai/...ai).
  • For each ServiceDirectory, identify all affected packages = distinct sdk/{ServiceDirectory}/{PackageName}/ paths.
  • For each affected package, identify:
    • All csproj files that had changes beneath them (src, tests, samples, perf, stress, or any other project type).
    • The src csproj specifically = sdk/{service}/{package}/src/{Package}.csproj — this is used for GenerateCode.
  • The remaining steps must be run for each affected project/ServiceDirectory. If changes span multiple ServiceDirectories or packages, run for each one.

2. Run dotnet format (for every changed csproj)

For every csproj that had files change beneath it — src, tests, samples, perf, stress, or any other project type — run:

dotnet format <path-to-changed.csproj>

Identify affected csproj files by looking at the full changed file list: include any project where either (a) there is a changed .cs file with that .csproj as its nearest parent, or (b) the .csproj itself changed, or files such as .props, .targets, or .md changed under that project. This fixes style/formatting issues and may modify .cs files.

3. Conditionally run dotnet build /t:GenerateCode (per src csproj)

Read the full file on GitHub · 115 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. 5d ago First seen · 115 lines · 48 tokens per session scan A 9dcc926ed2ef

Subscribe to this mod's changes

pre-commit-checks is a skill published in the GitHub repository Azure/azure-sdk-for-net (6,049 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,603 once invoked, about $0.0002 per session on Opus 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.

Related

Other skills, from other repositories

release-readiness

Assesses ship-readiness for .NET MAUI release branches — Servicing Releases (SR) and Previews — and produces public-safe, copy-ready release handoffs or Loop-page drafts from the resulting evidence. Use for readiness verdicts, release blockers, Preview/SR status, release handoff pages, manual validation instructions…

dotnet/maui · 100 tokens

code-review

Deep code review of PR or materialized candidate-patch changes for correctness, safety, and MAUI conventions. Uses independence-first assessment (code before narrative) and delegates to the maui-expert-reviewer agent for per-dimension sub-agent evaluation. Triggers on: "review code for PR", "code review PR", "review…

dotnet/maui · 110 tokens

dependency-flow

MAUI-specific dependency flow rules, channel conventions, and feed lookup workflows. Use when asked about darc, BAR, Maestro, feeds for .NET MAUI, build promotion, asset lookup, channel mappings, or dependency flow for dotnet/maui. Wraps the maestro-cli skill and maestro MCP tools with MAUI-specific guardrails.

dotnet/maui · 71 tokens

review-test-failures

Classifies PR CI/test failures as likely PR-caused or unrelated, compares against base-branch baseline, and emits an overall merge-readiness verdict. Uses gathered GitHub/AzDO/Helix context and the shared MAUI CI facts.

dotnet/maui · 55 tokens

try-fix

Attempts ONE alternative fix for a bug, tests it empirically, and reports results. ALWAYS explores a DIFFERENT approach from existing PR fixes. Use when CI or an agent needs to try independent fix alternatives. Invoke with problem description, test command, target files, and optional hints.

dotnet/maui · 60 tokens

analyze-sessions

Analyzes your local Copilot CLI sessions for dotnet/maui to drive iterative improvements to the PR-review agent (and other agents, skills, and instruction files). Runs a select → extract → score → judge → cluster → propose → emit-eval loop: a deterministic core ranks your worst / most-expensive sessions, then the…

dotnet/maui · 181 tokens