Vergleicht C# Web API Controller und DTOs mit TypeScript/JavaScript-Consumern, um Contract Drift und Breaking Changes zu erkennen.
- GitHub Stars
- 41.038
- Dateien
- 1
- Letzter Commit
- 11. Nov. 2026
- Lizenz
- MIT
- Erlaubte Tools
- —
Was macht der api-breaking-change-detector Skill?
Vergleicht C# Web API Controller und DTOs mit TypeScript/JavaScript-Consumern, um Contract Drift und Breaking Changes zu erkennen.
Zusammenfassung erzeugt aus der SKILL.md des Skills.
Über den api-breaking-change-detector skill
Dieser Skill ermöglicht es, Contract Drift zwischen C# Web API Controllern und TypeScript- oder JavaScript-Consumern aufzuspüren. Er hilft Entwicklern zu identifizieren, wann Backend-Änderungen – wie umbenannte JSON-Keys oder neue Pflichtparameter – Client-Anwendungen wie React, Angular oder Vue unterbrechen könnten. Zudem erkennt er, wenn Frontend-Code Felder sendet, die das Backend nicht mehr verarbeitet, wodurch stille Runtime-Bugs abgefangen werden, bevor sie in die Produktion gelangen.
Ein Agent sollte dieses Tool laden, wenn ein User eine DTO- oder Controller-Änderung gegen die entsprechenden Consumer prüfen muss, bevor der Code gemergt wird. Im Gegensatz zu Tools, die OpenAPI-Spezifikationsdateien vergleichen, arbeitet dieser Skill direkt auf dem tatsächlichen Quellcode. Er analysiert Program.cs auf JSON-Naming-Policies, prüft C# 11 required-Modifier und nutzt normalized URL Matching, um handgeschriebene HTTP-Calls via Fetch oder Axios zu finden. Der Prozess erstellt einen detaillierten Audit-Report, anstatt Dateien zu modifizieren.
Was ein agent damit machen kann
- 1DTO-Änderungen auf Breaking Impacts prüfenPrüfen, ob die Modifikation eines C# Data Transfer Objects bestehende Frontend-Interfaces unterbricht.
- 2API-Contract-Synchronisation verifizierenSicherstellen, dass die Backend-Controller und die TypeScript-Client-Models synchron bleiben.
- 3Endpoint-Audits vor dem Release durchführenDie gesamte API-Surface auf potenzielle Breaking Changes vor einem Production-Release auditieren.
Geschrieben basierend auf dem SKILL.md des skills. Jeder use case wurde gegen ein zitat daraus geprüft.
So installierst du den api-breaking-change-detector Skill
Jeder Befehl kopiert den Skill-Ordner in das Skills-Verzeichnis des Clients. Starte den Client neu oder beginne eine neue Session, um ihn zu laden.Den api-breaking-change-detector Skill in Claude Code installieren
~/.claude/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.claude/skills/api-breaking-change-detectorDen api-breaking-change-detector Skill in Claude Code (project) installieren
.claude/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector .claude/skills/api-breaking-change-detectorDen api-breaking-change-detector Skill in Codex installieren
~/.agents/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.agents/skills/api-breaking-change-detectorDen api-breaking-change-detector Skill in Gemini CLI installieren
~/.gemini/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.gemini/skills/api-breaking-change-detectorDen api-breaking-change-detector Skill in Claude.ai installieren
npx degit github/awesome-copilot/skills/api-breaking-change-detector api-breaking-change-detector && zip -r api-breaking-change-detector.zip api-breaking-change-detector # claude.ai → Customize → Skills → + → Create skill → Upload a skill → api-breaking-change-detector.zip
Automatisierte Checks
Geluften am 15. Nov. 2026Vollständiger Bericht →Hat unsere automatischen Prüfungen bestanden. Das ist kein Sicherheitsaudit: Lesen Sie die Skripte, bevor ein Agent sie ausführt. Wie die Checks funktionieren
- Source Repository verknüpft und erreichbargithub/awesome-copilot/skills/api-breaking-change-detector is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/api-break ↗Bestanden
- Open Source Lizenz (OSI)MITspdx.org/licenses/MIT.html ↗Bestanden
- Commit oder Release im letzten JahrLast commit 2026-11-11github.com/github/awesome-copilot/commits ↗Bestanden
- Keine Download-und-Ausführen-Muster oder Zugangsdatendiebstahl in SkriptenNo scripts in the skill folderBestanden
- Keine versteckten Anweisungen in SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗Bestanden
- Vorab erlaubte Tools sind eingeschränktNo pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗Bestanden
- SKILL.md folgt dem Agent-Skills-FormatValid name and description; says when to use it; 73 linesgithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗Bestanden
SKILL.md
Auf GitHub ansehenAPI Breaking Change Detector
You are cross-referencing a C# Web API's actual contract (controllers, DTOs, route definitions) against its TypeScript/JavaScript consumers to find contract drift — in both directions — before it reaches production.
When to use this
Trigger when the user asks to:
- Check whether a DTO/controller change will break frontend or client applications
- Verify the client and backend API contract are still in sync
- Audit a specific endpoint, or the whole API surface, for breaking changes before a release
Do not use this for:
- Generating new API code from an OpenAPI spec (see
openapi-to-application-code) - Scaffolding new endpoints with OpenAPI docs (see
aspnet-minimal-api-openapi) - Comparing two OpenAPI spec files directly — this skill reads source code, not exported specs
Process
-
Discover Global JSON & Naming Policies:
- Check
Program.csorStartup.csfor active JSON options (e.g.JsonNamingPolicy.CamelCase,PropertyNamingPolicy, or NewtonsoftCamelCasePropertyNamesContractResolver). - Default to
camelCasefor TypeScript/JavaScript field mapping if global camelCase is configured, unless overridden by an explicit[JsonPropertyName("...")]attribute on the C# property. - Ignore C# properties annotated with
[JsonIgnore].
- Check
-
Identify the C# contract surface. For each Controller action in scope:
- Route: Base
[Route("...")]+ action[HttpGet("...")]/[HttpPost("...")]. Normalize route parameters (e.g.{id:int}or{id:guid}$\rightarrow${id}). - Request DTO: Extract property names, types, and requirement rules:
- Required if: annotated with
[Required],[BindRequired], has the C# 11requiredmodifier (public required string X), or is a non-nullable value type (int,Guid,bool) without a default value. - Optional if: nullable (
string?,int?), or has a default initializer.
- Required if: annotated with
- Response DTO: Property names, types, and nullability.
- Explicit Status Codes:
[ProducesResponseType(statusCode)]attributes and explicitStatusCode(...)return paths.
- Route: Base
-
Find the matching TypeScript/JavaScript consumer (with Normalized URL Matching):
- Auto-generated client match (high confidence): look for generated client files (NSwag/OpenAPI Generator output) and match by generated method/interface name directly.
- Hand-written service/client match (medium confidence):
- Search TypeScript/JavaScript files for HTTP client calls (
fetch,axios, AngularHttpClient,ky, etc.) whose normalized URL pattern matches the controller's route. - Normalize template strings and concatenations (e.g.,
${this.apiUrl}/users/${id}orbaseUrl + '/users/' + userId$\rightarrow$/users/{id}). - Match normalized routes against C# routes regardless of variable naming in TypeScript/JS.
- Search TypeScript/JavaScript files for HTTP client calls (
- No match found: report as "no client consumer located" rather than guessing — do not assume an endpoint is unused just because a match wasn't found statically.
- Label every finding with which of these three methods was used to locate it.
-
Compare backend → frontend/client (breaks the client):
- A DTO property renamed or removed that the TypeScript/JS interface or object model still expects
- A new required request field the client never sends
- A response status code the client doesn't handle (e.g. controller now returns 409 Conflict, but client error handler only handles 400/500)
- A response field's type changed (e.g.
long$\rightarrow$string, or non-nullable $\rightarrow$ nullable) in a way the client type assumes differently
-
Compare frontend/client → backend (stale/dead client code vs. silent bugs):
- Harmless dead field: Client sends a payload property the backend ignores without error.
- Silently broken bug (High Severity): Client logic reads a response property that the backend no longer returns (resulting in
undefinedat runtime and potential application failures).
-
Produce the report (see Output Format). This skill does not modify code.
Output Format
- Scope Audited — Controllers, DTOs, and TypeScript/JavaScript files audited, along with detected JSON naming policies (e.g.
camelCaseenabled viaProgram.cs). - Backend → Client Breaks — Grouped by endpoint: what changed, match method used (Auto-generated / Normalized Route Match), exact impact on the client, and severity (Compilation Error vs. Silent Runtime Failure).
- Client → Backend Drift — Stale fields sent or expected, explicitly distinguishing harmless dead fields from silently broken client UI logic.
- No Consumer Found — Unmatched backend DTOs/endpoints requiring manual confirmation.
- Match Confidence Summary — Breakdown of findings derived from auto-generated clients vs. normalized hand-written routes vs. unmatched routes.
Guidelines
- URL Normalization: Always strip query parameters (
?status=active) and normalize path parameters (${id}/:id/{id}) before comparing routes. - Naming Policies: Never assume a C# property name matches a TypeScript/JS property verbatim without checking for
[JsonPropertyName("...")]or globalJsonNamingPolicy.CamelCasesettings. - Modern C# Nuances: Check for C# 11
requiredkeyword and#nullable enableannotations (string?vsstring) when assessing required properties. - Framework Agnostic: Apply contract matching across any TypeScript or JavaScript client (Fetch, Axios, Angular, React, Vue, Svelte, Node.js).
- Never Fabricate: If no matching client service or DTO is found, report "No consumer located via static search" — never guess a pairing based purely on loose class names.
- Reporting Only: Do not modify code; output a scannable, actionable audit report.
Dateien in diesem Skill
1api-breaking-change-detector Skill-Fragen
Wie installiere ich den api-breaking-change-detector Skill in Claude Code?
Führe npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.claude/skills/api-breaking-change-detector aus. Claude Code lädt Skills aus ~/.claude/skills (alle Projekte) oder .claude/skills (ein Projekt) und nutzt einen Skill, wenn seine Beschreibung zur Aufgabe passt.
Welche Clients können den api-breaking-change-detector Skill nutzen?
Jeder Client, der das Agent Skills-Format liest: Claude Code, Codex, Gemini CLI und claude.ai (als ZIP hochladen). Skripte im Skill laufen nur dort, wo der Client Codeausführung erlaubt.
Nutzt dieses Tool OpenAPI-Spec-Dateien für den Vergleich?
Nein, dieser Skill arbeitet direkt auf dem Quellcode statt auf exportierten OpenAPI-Spec-Dateien.
Welche Arten von Frontend-Clients können auditiert werden?
Er unterstützt verschiedene TypeScript/JavaScript-Consumer wie React, Angular, Vue, Svelte, Node.js sowie Clients, die Fetch, Axios oder NSwag nutzen.
Wie geht das Tool mit C# Naming-Policies um?
Es prüft Program.cs oder Startup.cs auf JSON-Naming-Policies wie camelCase und respektiert explizite [JsonPropertyName]-Attribute.
Wird dieses Tool meinen Quellcode verändern?
Nein, das Tool ist darauf ausgelegt, lediglich einen Audit-Report zu erstellen und nimmt keine Code-Änderungen vor.