API Breaking Change Detector
GitHubOfficialFirst committed by sudhirp25Distributed by GitHub
- Skill
- Review and audit
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The API Breaking Change Detector performs static analysis to identify inconsistencies between C# Web API controllers/DTOs and their corresponding TypeScript or JavaScript client-side consumers. By analyzing source code directly—rather than relying on exported OpenAPI specifications—it identifies potential breaking changes, such as renamed JSON keys, modified status codes, or mismatched nullability, before they reach production. It supports both auto-generated clients and hand-written HTTP requests, providing a detailed audit report that distinguishes between compilation-level breaks and silent runtime failures.
What it does
- Analyzes C# controller routes, DTOs, and JSON naming policies directly from source code.
- Matches backend endpoints to frontend consumers using normalized URL patterns and auto-generated client definitions.
- Identifies breaking changes like removed properties, new required fields, or altered status codes.
- Detects stale frontend code that expects fields no longer provided by the backend.
- Provides a structured audit report categorizing findings by severity and match confidence.
- Respects modern C# features like the required keyword and nullable reference types.
When to use it
- Before merging changes to API controllers or DTOs to ensure frontend compatibility.
- When verifying that client-side applications remain in sync with backend API updates.
- During release preparation to audit the entire API surface for potential breaking changes.
- When investigating runtime errors caused by unexpected API response structures.
Advantages
- Operates on source code for higher accuracy than spec-based comparisons.
- Detects both backend-to-frontend breaks and frontend-to-backend stale code.
- Supports a wide range of client implementations including Fetch, Axios, and framework-specific services.
- Distinguishes between harmless dead fields and critical silent runtime failures.
- Provides clear visibility into endpoints that lack identified consumers.
Usage examples
- “Check if my recent changes to the UserProfile DTO will break the React frontend.”
- The agent scans the C# DTO and the React source code, reporting any missing properties or type mismatches that would cause runtime errors.
- “Audit the entire API surface for breaking changes before we deploy the next version.”
- The agent generates a comprehensive report listing all detected contract drifts, grouped by endpoint, with severity levels for each identified issue.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/github/api-breaking-change-detector/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip api-breaking-change-detector.zip -d .agents/skills
Documentation by sudhirp25
API 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].
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.
Response DTO: Property names, types, and nullability.
Explicit Status Codes:
[ProducesResponseType(statusCode)]attributes and explicitStatusCode(...)return paths.
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.
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer891 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md6.6 KiB
LICENSE
MIT License Copyright GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
sudhirp25
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · skills/api-breaking-change-detector · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- sudhirp25
AutoGineer is not affiliated with or endorsed by sudhirp25 or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download api-breaking-change-detector.zip