C# Web APIのコントローラーとDTOをTypeScript/JavaScriptのコンシューマーと照合し、コントラクトの乖離や破壊的変更を検出します。
- GitHubスター
- 41,038
- ファイル
- 1
- 最終コミット
- 2026年11月11日
- ライセンス
- MIT
- 許可されたツール
- —
api-breaking-change-detector skillは何をしますか
C# Web APIのコントローラーとDTOをTypeScript/JavaScriptのコンシューマーと照合し、コントラクトの乖離や破壊的変更を検出します。
skillのSKILL.mdから生成された要約。
api-breaking-change-detector skill について
このSKILLは、C# Web APIのコントローラーとTypeScriptまたはJavaScriptのコンシューマー間のコントラクトの乖離を検出することを可能にします。JSONキーの名称変更や新しい必須パラメータの追加といったバックエンドの変更が、React、Angular、Vueなどのクライアントアプリケーションにどのような影響を与えるかを開発者が特定するのに役立ちます。また、フロントエンドのコードがバックエンドで処理されなくなったフィールドを送信している場合も特定できるため、本番環境に到達する前にサイレントなランタイムバグをキャッチできます。
ユーザーがコードをマージする前に、DTOやコントローラーの変更をコンシューマーに対して監査する必要がある場合、エージェントはこのツールをロードすべきです。OpenAPI仕様ファイルを比較するツールとは異なり、このSKILLは実際のソースコードに対して直接動作します。Program.csを分析してJSON命名ポリシーを確認し、C# 11のrequired修飾子を検査し、正規化されたURLマッチングを使用してFetchやAxiosを用いた手書きのHTTPコールを特定します。このプロセスは、ファイルを変更するのではなく、詳細な監査レポートを生成します。
エージェントができること
- 1DTO変更による破壊的影響の監査C#のData Transfer Objectの変更が、既存のフロントエンドインターフェースに影響を与えないか確認します。
- 2APIコントラクトの同期確認バックエンドのコントローラーとTypeScriptのクライアントモデルが同期されていることを保証します。
- 3リリース前のエンドポイント監査本番リリース前に、潜在的な破壊的変更がないかAPIの全サーフェスを監査します。
skill の SKILL.md から作成されています。すべてのユースケースは、その引用と照合されています。
api-breaking-change-detector skillのインストール方法
各コマンドはskillフォルダをクライアントのskillsディレクトリにコピーします。読み込むには、クライアントを再起動するか新しいセッションを開始してください。Claude Codeにapi-breaking-change-detector skillをインストールする
~/.claude/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.claude/skills/api-breaking-change-detectorClaude Code (project)にapi-breaking-change-detector skillをインストールする
.claude/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector .claude/skills/api-breaking-change-detectorCodexにapi-breaking-change-detector skillをインストールする
~/.agents/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.agents/skills/api-breaking-change-detectorGemini CLIにapi-breaking-change-detector skillをインストールする
~/.gemini/skills/api-breaking-change-detector/SKILL.md
$ npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.gemini/skills/api-breaking-change-detectorClaude.aiにapi-breaking-change-detector skillをインストールする
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
自動チェック
実行日 2026年11月15日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。エージェントに実行させる前にスクリプトを読んでください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能github/awesome-copilot/skills/api-breaking-change-detector is public and reachablegithub.com/github/awesome-copilot/tree/HEAD/skills/api-break ↗合格
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit 2026-11-11github.com/github/awesome-copilot/commits ↗合格
- スクリプトにダウンロード実行や認証情報の窃取がないNo scripts in the skill folder合格
- SKILL.md に隠れた指示がないNo override phrases, safeguard switches, credential requests or hidden charactersgithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗合格
- 事前許可ツールが限定されているNo pre-approved tools; the agent asks before using onegithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗合格
- SKILL.md が Agent Skills の形式に従っているValid name and description; says when to use it; 73 linesgithub.com/github/awesome-copilot/blob/HEAD/skills/api-break ↗合格
SKILL.md
GitHubで表示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].
- 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.
このスキルのファイル
1api-breaking-change-detector skillに関する質問
Claude Codeにapi-breaking-change-detector skillをインストールするには
npx degit github/awesome-copilot/skills/api-breaking-change-detector ~/.claude/skills/api-breaking-change-detectorを実行してください。Claude Codeは~/.claude/skills(すべてのプロジェクト)または.claude/skills(単一プロジェクト)からskillsを読み込み、説明がタスクに一致する場合にskillを使用します。
api-breaking-change-detector skillはどのクライアントで使用できますか
Agent Skills形式を読み込むすべてのクライアントで使用できます: Claude Code、Codex、Gemini CLI、claude.ai(ZIPとしてアップロード)。skill内のスクリプトは、クライアントがコード実行を許可した場合にのみ実行されます。
このツールは比較にOpenAPIのスペックファイルを使用しますか?
いいえ、このSKILLはエクスポートされたOpenAPIスペックファイルを使用するのではなく、ソースコードに対して直接動作します。
どのようなフロントエンドクライアントを監査できますか?
React、Angular、Vue、Svelte、Node.js、およびFetch、Axios、NSwagを使用しているクライアントを含む、さまざまなTypeScript/JavaScriptコンシューマーをサポートしています。
C#の命名ポリシーにはどのように対応していますか?
Program.csまたはStartup.csを確認してcamelCaseなどのJSON命名ポリシーをチェックし、明示的な[JsonPropertyName]属性を尊重します。
このツールはソースコードを書き換えますか?
いいえ、このツールは監査レポートを作成することのみを目的として設計されており、コードの変更は一切行いません。