dotnet-api-surface-validation

Validate .NET public API surface changes with PublicApiAnalyzers, Verify, and ApiCompat.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-api-surface-validation-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-api-surface-validation
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-api-surface-validation
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-api-surface-validation-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps .NET developers detect and manage changes to their public API surface, preventing accidental breaking changes and ensuring library stability across releases.

Core Features & Use Cases

  • Public API Tracking: Uses PublicApiAnalyzers to track shipped and unshipped APIs, flagging undeclared or removed members.
  • Snapshot Testing: Employs the Verify library to create and compare API surface snapshots, catching changes from a consumer's perspective.
  • CI Enforcement: Integrates ApiCompat tooling to gate PRs on breaking API changes and validates tracking files in CI.
  • Use Case: When developing a new version of a popular .NET library, use this Skill to automatically verify that no public methods or properties have been unintentionally altered or removed before merging changes.

Quick Start

Use the dotnet-api-surface-validation skill to set up PublicApiAnalyzers in your .NET project.

Frequently Asked Questions about dotnet-api-surface-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental breaking changes in a .NET library's public API surface?

Yes, you can gate PRs on breaking API changes by integrating ApiCompat tooling into your CI pipeline. This Skill validates tracking files and enforces API compatibility to ensure library stability across releases.

Can I use snapshot testing to catch .NET API surface changes from a consumer's perspective?

Yes, you can use the Verify library to create and compare API surface snapshots. This Skill employs snapshot testing to catch public API changes from a consumer's perspective, ensuring tracked APIs remain consistent.

Do I need the .NET 8.0 SDK to enforce API compatibility tracking?

Yes, you need the .NET 8.0+ SDK and specific NuGet packages to use this Skill for full functionality. These prerequisites enable PublicApiAnalyzers, Verify, and ApiCompat tooling to validate and enforce public API surface changes.

What is the best way to track shipped and unshipped APIs in a .NET library?

The best way to track shipped and unshipped APIs is using PublicApiAnalyzers to declare and monitor public members. This Skill flags undeclared or removed members, preventing accidental API exposure and managing library evolution.

How does PublicApiAnalyzers validate public API surface changes in CI?

PublicApiAnalyzers validates public API surface changes in CI by tracking shipped and unshipped APIs and validating tracking files. This Skill integrates ApiCompat tooling to gate PRs on breaking API changes, ensuring library stability.