api-contractlisted
Install: claude install-skill viettdann/arclight-kit
# API Contract
Cross-reference the C# API's actual contract (routes, DTOs, status codes) against its TypeScript/JavaScript consumers and report contract drift in both directions before it reaches production. This skill does not modify code.
## Scope
- **After a change** (default when the working tree or branch has changes): audit only the endpoints and DTOs the diff touches, plus every endpoint that uses a touched DTO. Get the diff with `git diff HEAD` for uncommitted work or `git diff <base>...HEAD` for a branch.
- **Whole surface**: when the user asks for a full audit, or there is no diff to scope by.
## Process
1. **Find the JSON serialization rules.** Check `Program.cs` or `Startup.cs`:
- Controllers and Minimal APIs have separate option sets: `AddControllers().AddJsonOptions(...)` for controllers, `ConfigureHttpJsonOptions(...)` for Minimal APIs. A setting in one doesn't apply to the other, so resolve the rules per endpoint kind.
- ASP.NET Core with System.Text.Json uses camelCase property names by default. Names stay PascalCase only when `PropertyNamingPolicy = null` is set; Newtonsoft (`AddNewtonsoftJson`) follows its contract resolver.
- An explicit `[JsonPropertyName("...")]` or `[JsonProperty("...")]` wins over the policy. Skip properties with `[JsonIgnore]`; `[JsonIgnore(Condition = WhenWritingNull)]` makes only that property optional in the response.
- Request binding is case-insensitive by default, so casing alone rarely breaks a request. `Proper