api-review

Review .NET API surface changes in Aspire PR diffs for design guideline violations.

6.2k|952|Updated Sep 25, 2023
One-click install
npx skills add https://github.com/microsoft/aspire --skill api-review-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-review
Source: https://github.com/microsoft/aspire/tree/main/.agents/skills/api-review
Command: npx skills add https://github.com/microsoft/aspire --skill api-review-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces the risk of shipping inconsistent or guideline-violating public .NET APIs by reviewing changes to Aspire’s auto-generated public API surface files and translating issues into actionable design feedback.

Core Features & Use Cases

  • Diff-focused API review: Compares PR diffs for api/*.cs files under src/*/api/*.cs and src/Components/*/api/*.cs to identify added/removed or newly introduced public surface.
  • Rule-based design checking: Applies .NET Framework Design Guidelines and Aspire-specific conventions around visibility, naming, namespaces, parameters, types, breaking changes, preview/experimental attributes, and pattern consistency.
  • Developer attribution ready: Uses git blame on the originating (non-generated) source to attribute each finding to the likely author.

Quick Start

Use the api-review skill to review the API surface changes in a pull request by telling the AI: “Review PR <number> for Aspire API design guideline violations and breakages.”

Frequently Asked Questions about api-review

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

FAQPage Schema
How do I review .NET public API surface changes in a pull request?

Review .NET public API surface changes by analyzing PR diffs for auto-generated api/*.cs files to identify design guideline violations, naming inconsistencies, and breaking changes. The review groups changes by package and attributes findings to authors using git blame.

What .NET API design guidelines are checked during an API review?

A .NET API review checks visibility, naming consistency, namespace placement, parameter and type rules, experimental or preview tagging, and pattern consistency. It applies the .NET Framework Design Guidelines alongside Aspire-specific conventions to evaluate public types and members.

How does git blame attribute API design violations to the correct author?

Git blame attributes API design violations by tracing auto-generated api/*.cs file changes back to the originating non-generated source code. This identifies the likely author of the public surface change, ensuring feedback is directed to the responsible developer.

Can I check for breaking changes in Aspire distributed application APIs before merge?

Yes, you can check for breaking changes in Aspire distributed application APIs before merge by reviewing PR diffs. The review detects added, removed, or newly introduced public surface under src/*/api and src/Components/*/api to prevent guideline violations from shipping.

When do I need to review auto-generated api/*.cs files for public API changes?

You need to review auto-generated api/*.cs files for public API changes when a pull request modifies or introduces public types and members under src/*/api or src/Components/*/api. This ensures new public surface adheres to design guidelines before integration.

Does the API review process group findings by package?

Yes, the API review process groups findings by package. It applies the specified rule set with severities to each package's public API surface changes, providing organized and actionable design feedback for each modified component.