Official agent skill

.NET API Diff Validation

by dotnet in dotnet/core

Verifies that APIs listed in a generated .NET API diff exist in the shipped build and trace to real pull requests, before release notes are written.

OfficialMITAuto-check passedDevelopment

Install .NET API Diff Validation

skills CLI
$ npx skills add dotnet/core --skill api-diff-validation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install dotnet/core api-diff-validation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/dotnet/core.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/api-diff-validation .claude/skills/api-diff-validation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
api-diff-validation
GitHub stars
22k
Token cost
~992 tokens
SKILL.md length
409 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Verifies that APIs listed in a generated .NET API diff exist in the shipped build and trace to real pull requests, before release notes are written.

  • Works in 5 steps: Point at the right build (never the… → Verify APIs exist with dotnet-inspect → Cross-reference new APIs against… → …
  • Checking an API diff against the actual preview or release build before writing release notes
  • SKILL.md covers Inputs, 1. Point at the right build…, 2. Verify APIs exist with… and 3. Cross-reference new APIs…, plus 2 more sections
  • Calls gh

What it does

This is the verification layer above a skill that only produces API diff reports. It takes the generated diff, a `build-metadata.json` giving the NuGet feed and ref-pack versions of the exact build, and the milestone's candidate PRs. The agent points at that build rather than any locally installed SDK, then uses `dotnet-inspect` through `dnx` to look up each claimed type or member in the ref pack. An API missing from the build is flagged for exclusion because it may have been renamed, kept internal or reverted.

Each new API is then cross-referenced against candidate PRs from `changes.json`. If none matches, the agent searches merged PRs with `gh search prs`, and if no implementing PR is found and the inspection tool cannot confirm the API, it is not documented. A further step on detecting missed reverts is cut off in the excerpt.

When your agent uses it

  • Checking an API diff against the actual preview or release build before writing release notes
  • Finding APIs that were reverted, renamed or kept internal after the diff was captured
  • Tracing a suspicious new API back to the PR that implemented it

Example prompts

  • “Validate the API diff for this milestone against the build in build-metadata.json.”
  • “Does the new AnyNewLine option exist in the shipped ref pack, and which PR added it?”
  • “Check every new API in the diff has an implementing PR and flag the ones that do not.”

Requirements

  • `dotnet-inspect`, run through `dnx`
  • GitHub CLI (`gh`)
  • `build-metadata.json` and `changes.json` for the target milestone

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Point at the right build (never the locally-installed SDK)
  2. Verify APIs exist with dotnet-inspect
  3. Cross-reference new APIs against candidate PRs
  4. Detect missed reverts
  5. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 44927bc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

.NET API Diff Validation loads about 992 tokens when it runs. Until then it costs about 106 tokens; SKILL.md has 409 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~992

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from dotnet/core at commit 44927bc, republished under its MIT licence (© dotnet). 409 words, ~992 tokens.

Download SKILL.mdSave it as .claude/skills/api-diff-validation/SKILL.md (or your agent's skills folder).
name
api-diff-validation
description
Validate that a generated API diff matches the APIs actually shipped in a .NET build, and that every new API traces to a real change. Uses dotnet-inspect to query the build's ref packs and cross-references new APIs against candidate PRs to catch missed reverts, renames, and kept-internal APIs before they reach release notes. Distinct from the pure api-diff skill, which only generates the diff reports.

API Diff Validation

Confirm that the public APIs claimed by an API diff actually shipped in the target build, and that each new API traces to a real PR. This is the verification layer on top of the pure api-diff skill (which only produces the diff reports).

Use it to catch, before release notes are written:

  • APIs present in the diff but missing from the shipped build (a missed revert, a rename, or an API kept internal),
  • new APIs with no implementing PR (suspicious / mis-attributed).

Inputs

  • A generated API diff for the milestone (the api-diff/ reports), or the target release identity.
  • build-metadata.json — nuget.source (the dnceng dotnet<major> feed) and the ref-pack package versions for the exact build.
  • The milestone's changes.json / candidate PRs (for cross-referencing).

dotnet-inspect is used here as a tool, not a separate skill: it reflects over the real ref packs from the build's feed, so it answers "does this API exist in this build?" authoritatively.

1. Point at the right build (never the locally-installed SDK)

Read build-metadata.json for the target. Use its nuget.source as $FEED and the ref-pack versions (e.g. Microsoft.NETCore.App.Ref@<version>) as $VER. For behavior that requires the SDK (rare here), install it side-by-side and scoped — see the validate-code-samples skill. Do not trust a machine-wide SDK for preview work.

2. Verify APIs exist with dotnet-inspect

bash
# Does a new type/member exist in the build's ref pack?
dnx dotnet-inspect -y -- find "*AnyNewLine*" \
  --package "Microsoft.NETCore.App.Ref@${VER}" --source "$FEED"

# Enumerate a type's members to confirm a signature.
dnx dotnet-inspect -y -- member RegexOptions \
  --package "Microsoft.NETCore.App.Ref@${VER}" --source "$FEED" -k field

# Diff the public API between two builds (sanity-check the generated diff).
dnx dotnet-inspect -y -- diff \
  --package "Microsoft.NETCore.App.Ref@${PREV}..${VER}" --source "$FEED"

For each API the diff claims is new, confirm it is present. If an API is missing from the build, treat it as a serious signal: it may have been renamed, kept internal, or reverted after the diff was captured — flag it for exclusion.

Show full SKILL.md (149 more words)Show less

3. Cross-reference new APIs against candidate PRs

For each new API/namespace in the diff, verify at least one candidate PR (from changes.json) covers it. If an API has no matching PR, search for the implementing PR explicitly before trusting it:

bash
gh search prs --repo dotnet/<repo> --merged "<distinctive API name>" \
  --json number,title,mergedAt,url

If no implementing PR can be found and dotnet-inspect cannot confirm the API, do not document it.

4. Detect missed reverts

An API may appear in the diff yet have been backed out later. Confirm presence in the build with dotnet-inspect (step 2) and check for a follow-up revert PR:

bash
gh search prs --repo dotnet/<repo> --state merged \
  "\"This reverts\" <pr-number>" --json number,title,url

If the API is absent from the build or a merged revert exists, mark the feature as reverted (suppress it / score it down in features.json).

5. Report

Emit a concise verdict per checked API: present (with PR), missing (rename/internal/revert — exclude), or unverified (describe without naming the type). Scope the report to the documented/announced surface; do not surface undocumented deltas.

© dotnet, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/api-diff-validation of dotnet/core.

Open the folder on GitHubat commit 44927bc

Compare with similar skills

.NET API Diff Validation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

.NET API Diff Validation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
.NET API Diff Validation this skilldotnet/core22k—~992Automated safety check: PassMIT
Release Roslynatordotnet/roslynator3.5k—~1kAutomated safety check: PassCustom licence
Cutting A ReleaseTriliumNext/Trilium38k—~3.2kAutomated safety check: PassAGPL-3.0
Mole CLI Release Flowtw93/Mole69k—~2.5kAutomated safety check: PassGPL-3.0
Draft Release Notesjamiepine/voicebox57k—~941Automated safety check: PassMIT
Mole Release Notes Publishertw93/Mole69k—~1.9kAutomated safety check: PassGPL-3.0

Similar skills

  • Release Roslynator

    dotnet/roslynator

    Official

    A skill your agent uses when shipping a roslynator release, rolling CHANGELOG.md [Unreleased], updating the VS Code extension changelog, creating a GitHub v release, or optionally tagging cli-v.

    3.5k GitHub stars~1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Cutting A Release

    TriliumNext/Trilium

    A skill your agent uses when cutting, preparing, or debugging a Trilium release — bumping the monorepo version, tagging, or diagnosing a failed "Release" workflow run.

    38k GitHub stars~3.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Runbook for assessing and executing a Mole CLI release: distribution channels, pre-flight checks, capital-V tags, build artifacts and the handoff to curated release notes.

    69k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Draft Release Notes

    jamiepine/voicebox

    Writes or refreshes the Unreleased section of CHANGELOG.md as a themed narrative built from the commits, PRs and diff since the last version tag.

    57k GitHub stars~941 tokensUpdated today
    DevelopmentAuto-check passed
  • Publishes curated, bilingual release notes for an existing Mole version tag with gh release edit, including contributor thanks and reactions, after the release workflow finishes.

    69k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Release Bump

    jamiepine/voicebox

    Ends a release cycle by moving the Unreleased changelog notes under a dated version heading, bumping version files with bumpversion and tagging the commit.

    57k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed

More from dotnet/core

All 15 skills in this repo
  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Official

    Audits and updates the supported-os.json files for .NET releases, checking them against upstream lifecycle data and regenerating the markdown with the release-notes tool.

    22k GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Official

    Validates .NET release data with the release-notes CLI: download URL liveness, SHA512 hashes, CDN latest.version files and aka.ms redirects.

    22k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Produces the changes.json manifest for a .NET preview, RC or GA milestone by choosing the right VMR base and head refs and running release-notes generate changes.

    22k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Official

    Ranks the changes in a release manifest and writes a scored features file that release notes, docs and blog posts can each cut at their own threshold.

    22k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Official

    Audits a scored features.json file and its draft release notes against editorial examples to catch over-scored, under-scored, or missing entries.

    22k GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about .NET API Diff Validation

What does .NET API Diff Validation do?

Verifies that APIs listed in a generated .NET API diff exist in the shipped build and trace to real pull requests, before release notes are written. This is the verification layer above a skill that only produces API diff reports.json` giving the NuGet feed and ref-pack versions of the exact build, and the milestone's candidate PRs.

When should I use .NET API Diff Validation?

.NET API Diff Validation fits situations like: checking an API diff against the actual preview or release build before writing release notes; finding APIs that were reverted, renamed or kept internal after the diff was captured; tracing a suspicious new API back to the PR that implemented it.

How do I install .NET API Diff Validation in Claude Code?

Run `npx skills add dotnet/core --skill api-diff-validation -a claude-code`. Or copy the skill folder (.github/skills/api-diff-validation in dotnet/core) into .claude/skills/api-diff-validation in your project. Claude Code loads it when a task matches its description.

How do I install .NET API Diff Validation in Codex?

Run `npx skills add dotnet/core --skill api-diff-validation -a codex`. Or copy the skill folder (.github/skills/api-diff-validation in dotnet/core) into .agents/skills/api-diff-validation in your project. Codex loads it when a task matches its description.

Can I use .NET API Diff Validation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dotnet/core --skill api-diff-validation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/api-diff-validation, .gemini/skills/api-diff-validation, .github/skills/api-diff-validation and .opencode/skills/api-diff-validation in your project.

What does .NET API Diff Validation need to run?

Going by SKILL.md and its folder, .NET API Diff Validation needs the command-line tools its instructions call (gh). Our summary lists: `dotnet-inspect`, run through `dnx`; GitHub CLI (`gh`); `build-metadata.json` and `changes.json` for the target milestone.

Does .NET API Diff Validation access the network?

SKILL.md contains no URLs. Its commands use gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is .NET API Diff Validation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does .NET API Diff Validation use?

.NET API Diff Validation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does .NET API Diff Validation use?

About 992 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to .NET API Diff Validation?

Skills that share tags, products or a category with .NET API Diff Validation: Release Roslynator (dotnet/roslynator, 3.5k stars), Cutting A Release (TriliumNext/Trilium, 38k stars), Mole CLI Release Flow (tw93/Mole, 69k stars) and Draft Release Notes (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains .NET API Diff Validation?

dotnet (a GitHub organization, an official publisher) maintains it in dotnet/core, which has 22,038 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 5, 2026.

Source: dotnet/core on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.