मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)40k · #7051

api-breaking-change-detector

यह क्या करती है

यह agent आपके 'backend' कोड (जहाँ डेटा बनता और मैनेज होता है) और 'frontend' कोड (प्रोग्राम का वह हिस्सा जिसे यूज़र देखते और इस्तेमाल करते हैं) की तुलना करता है, ताकि एरर आने से पहले ही समस्याएँ पकड़ी जा सकें।

कब इस्तेमाल करें

  • ✓जब आप अपने 'backend' में कुछ बदलते हैं और जानना चाहते हैं कि कहीं वह 'frontend' को तोड़ तो नहीं देगा।
  • ✓जब आप पक्का करना चाहते हैं कि 'frontend' और 'backend' एक ही भाषा में बात कर रहे हैं।
  • ✓नया वर्ज़न रिलीज़ करने से पहले, यह देखने के लिए कि सब कुछ साथ में ठीक चल रहा है या नहीं।

Skill का लिंक

https://github.com/github/awesome-copilot/blob/main/skills/api-breaking-change-detector/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/github/awesome-copilot/blob/main/skills/api-breaking-change-detector/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“जाँचो कि मेरे C# controller में किए गए बदलाव frontend को तोड़ेंगे या नहीं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह backend में डेटा भेजने और लेने के तरीके का विश्लेषण करता है और frontend कोड में उससे जुड़े इस्तेमाल खोजता है। अगर कोई अंतर मिलता है, तो यह आपको चेतावनी देता है।

तकनीकी सामग्री (मूल 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

  1. Discover Global JSON & Naming Policies:

    • Check Program.cs or Startup.cs for active JSON options (e.g. JsonNamingPolicy.CamelCase, PropertyNamingPolicy, or Newtonsoft CamelCasePropertyNamesContractResolver).
    • Default to camelCase for 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].
  2. 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# 11 required modifier (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 explicit StatusCode(...) return paths.
  3. 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, Angular HttpClient, ky, etc.) whose normalized URL pattern matches the controller's route.
      • Normalize template strings and concatenations (e.g., ${this.apiUrl}/users/${id} or baseUrl + '/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.
  4. 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
  5. 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 undefined at runtime and potential application failures).
  6. Produce the report (see Output Format). This skill does not modify code.

Output Format

  1. Scope Audited — Controllers, DTOs, and TypeScript/JavaScript files audited, along with detected JSON naming policies (e.g. camelCase enabled via Program.cs).

…

अक्सर पूछे जाने वाले सवाल

'breaking changes' क्या होते हैं?

ये ऐसे बदलाव हैं जो backend और frontend के बीच की बातचीत को तोड़ देते हैं, जिससे प्रोग्राम ठीक से काम करना बंद कर देता है।

API 'contract' क्या है?

यह उस समझौते को कहते हैं कि backend और frontend आपस में जानकारी कैसे लेंगे-देंगे। इसमें तय होता है कि कौन सा डेटा अपेक्षित है और क्या भेजा जाएगा।

क्या यह किसी भी तरह के 'frontend' में एरर खोज सकता है?

हाँ, यह JavaScript और TypeScript जैसी लोकप्रिय frontend भाषाओं और libraries में बातचीत के आम पैटर्न खोजता है।

जानकारी

लेखक का मूल विवरण

Cross-references C# Web API controllers/DTOs against their TypeScript/JavaScript consumers (React, Angular, Vue, Svelte, Node.js, or hand-written/auto-generated HTTP clients like Fetch, Axios, NSwag) to catch contract drift in both directions: backend changes that break client applications (renamed/removed JSON keys, new required parameters, status code shifts) and frontend code sending fields the

repo: github/awesome-copilot

लोकप्रियता

GitHub स्टार
40k
रैंकिंग में स्थान
#7051
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

acquire-codebase-knowledge

40k

आपके एजेंट को किसी मौजूदा code प्रोजेक्ट को समझने और उसका documentation बनाने में मदद करता है। यह नए लोगों को प्रोजेक्ट से जोड़ने या architecture का सार जानने में उपयोगी है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-assess

40k

आपके एजेंट को किसी प्रोजेक्ट की AI के लिए तैयारी जाँचने और रिपोर्ट बनाने देता है। यह समझने में उपयोगी है कि प्रोजेक्ट AI tools इस्तेमाल करने के लिए कितना तैयार है।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-generate-instructions

40k

आपके एजेंट को assessment के आधार पर AI tools के लिए निर्देश बनाने में मदद करता है। यह बताता है कि AI कोड के साथ बेहतर कैसे काम करे और पहचानी गई कमियाँ कैसे दूर हों।

लेखन और डॉक्यूमेंटडॉक्यूमेंटेशन

acreadiness-policy

40k

आपके एजेंट को AI प्रोजेक्ट assessment के लिए नीतियाँ तय करने या लागू करने में मदद करता है। यह प्रोजेक्ट्स के मूल्यांकन को मानक बनाने और compliance सुनिश्चित करने में उपयोगी है।

AI और एजेंटएजेंट

मिलती-जुलती skills