Melakukan cross-reference antara controller C# Web API dan DTO terhadap consumer TypeScript/JavaScript untuk mendeteksi contract drift dan breaking changes.
- Bintang GitHub
- 41.038
- File
- 1
- Commit terakhir
- 11 Nov 2026
- Lisensi
- MIT
- Tool yang diizinkan
- —
Apa fungsi skill api-breaking-change-detector?
Melakukan cross-reference antara controller C# Web API dan DTO terhadap consumer TypeScript/JavaScript untuk mendeteksi contract drift dan breaking changes.
Ringkasan dibuat dari SKILL.md skill ini.
Tentang skill api-breaking-change-detector
Skill ini memungkinkan Anda untuk mendeteksi contract drift antara controller C# Web API dengan consumer TypeScript atau JavaScript. Ini membantu developer mengidentifikasi kapan perubahan backend, seperti perubahan nama JSON key atau parameter wajib yang baru, akan merusak aplikasi client seperti React, Angular, atau Vue. Tool ini juga mengidentifikasi kapan kode frontend mengirimkan field yang tidak lagi diproses oleh backend, sehingga membantu menangkap bug runtime yang tidak terlihat sebelum mencapai tahap produksi.
Agent harus memuat tool ini saat user perlu mengaudit perubahan DTO atau controller terhadap consumer-nya sebelum melakukan merge code. Berbeda dengan tool yang membandingkan file spesifikasi OpenAPI, skill ini bekerja langsung terhadap source code yang sebenarnya. Tool ini menganalisis Program.cs untuk kebijakan penamaan JSON, memeriksa modifier required pada C# 11, dan menggunakan normalized URL matching untuk menemukan HTTP call yang ditulis manual menggunakan Fetch atau Axios. Proses ini menghasilkan laporan audit yang mendetail alih-alih memodifikasi file apa pun.
Apa yang bisa dilakukan agent dengannya
- 1Audit perubahan DTO untuk dampak breaking changesPeriksa apakah modifikasi pada C# Data Transfer Object akan merusak interface frontend yang sudah ada.
- 2Verifikasi sinkronisasi kontrak APIPastikan controller backend dan model client TypeScript tetap sinkron.
- 3Melakukan audit endpoint sebelum rilisAudit seluruh permukaan API untuk potensi breaking changes sebelum rilis ke produksi.
Ditulis dari SKILL.md milik skill tersebut. Setiap use case diverifikasi dengan kutipan darinya.
Cara install skill api-breaking-change-detector
Setiap perintah menyalin folder skill ke direktori skills client. Restart client atau mulai sesi baru untuk memuatnya.Install skill api-breaking-change-detector di Claude Code
~/.claude/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.claude/skills/api-breaking-change-detectorInstall skill api-breaking-change-detector di Claude Code (project)
.claude/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector .claude/skills/api-breaking-change-detectorInstall skill api-breaking-change-detector di Codex
~/.agents/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.agents/skills/api-breaking-change-detectorInstall skill api-breaking-change-detector di Gemini CLI
~/.gemini/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.gemini/skills/api-breaking-change-detectorInstall skill api-breaking-change-detector di Claude.ai
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
Pengecekan otomatis
Berjalan 15 Nov 2026Laporan lengkap →Lolos cek otomatis kami. Ini bukan audit keamanan: baca skripnya sebelum membiarkan agent menjalankannya. Cara kerja checks
- Source repository terhubung dan dapat dijangkaugithub/awesome-copilot/skills/api-breaking-change-detector is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/api-break ↗Lolos
- Lisensi open source (OSI)MITspdx.org/licenses/MIT.html ↗Lolos
- Ada commit atau release dalam satu tahun terakhirLast commit 2026-11-11github.com/github/awesome-copilot/commits ↗Lolos
- Skrip tanpa unduh-lalu-jalankan atau pencurian kredensialNo scripts in the skill folderLolos
- Tidak ada instruksi tersembunyi di SKILL.mdNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗Lolos
- Tool yang diizinkan otomatis dibatasiNo pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗Lolos
- SKILL.md mengikuti format Agent SkillsValid name and description; says when to use it; 73 linesgithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗Lolos
SKILL.md
Lihat di GitHubAPI 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.
Berkas dalam skill ini
1Pertanyaan seputar skill api-breaking-change-detector
Bagaimana cara install skill api-breaking-change-detector di Claude Code?
Jalankan npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.claude/skills/api-breaking-change-detector. Claude Code memuat skill dari ~/.claude/skills (semua proyek) atau .claude/skills (satu proyek) dan menggunakan skill saat deskripsinya cocok dengan tugas.
Client mana saja yang bisa menggunakan skill api-breaking-change-detector?
Client apa pun yang membaca format Agent Skills: Claude Code, Codex, Gemini CLI, dan claude.ai (unggah sebagai ZIP). Script dalam skill hanya berjalan di client yang mengizinkan eksekusi kode.
Apakah tool ini menggunakan file spec OpenAPI untuk perbandingan?
Tidak, skill ini bekerja langsung terhadap source code alih-alih menggunakan file spec OpenAPI yang diekspor.
Jenis frontend client apa saja yang bisa diaudit?
Tool ini mendukung berbagai consumer TypeScript/JavaScript termasuk React, Angular, Vue, Svelte, Node.js, serta client yang menggunakan Fetch, Axios, atau NSwag.
Bagaimana tool ini menangani kebijakan penamaan C#?
Tool ini memeriksa Program.cs atau Startup.cs untuk kebijakan penamaan JSON seperti camelCase dan menghormati atribut [JsonPropertyName] yang eksplisit.
Apakah tool ini akan mengubah source code saya?
Tidak, tool ini dirancang hanya untuk menghasilkan laporan audit dan tidak melakukan modifikasi kode apa pun.