api-contract-safety
Skill4 starsChanged 52 days agoMITView on GitHub
Use when changing or reviewing existing API routes, versions, verbs, headers, request/response DTOs, serialization, status codes, error shapes, authorization, or public interfaces.
In this repository37 other files it gives its agents.
- global-instructions/AGENTS.mdAGENTS.md
- api-endpoint-deprecationSkill
- aspnet-core-api-developmentSkill
- background-services-dotnetSkill
- bug-investigationSkill
- code-qualitySkill
- code-reviewSkill
- context-resetSkill
- dependency-managementSkill
- deployment-readiness-dotnetSkill
- diff-reviewSkill
- distributed-workflowsSkill
- dotnet-architectureSkill
- dotnet-implementationSkill
- dotnet-securitySkill
- ef-core-safetySkill
- exception-handlingSkill
- git-workflowSkill
- google-bigquery-dotnetSkill
- google-cloud-pubsub-dotnetSkill
- google-firestore-dotnetSkill
- http-client-integrationsSkill
- integration-testing-dotnetSkill
- observability-dotnetSkill
- performance-diagnostics-dotnetSkill
- poc-developmentSkill
- production-debuggingSkill
- production-hotfixSkill
- production-loggingSkill
- redis-dotnetSkill
- relational-database-dotnetSkill
- retry-resilienceSkill
- safe-terminalSkill
- shared-code-impactSkill
- targeted-validationSkill
- task-routerSkill
- unit-testingSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat routes, verbs, headers, query/path parameters, request and response schemas, JSON names, serialization rules, status codes, error …
- Distinctive: line 10
Before editing, locate controller/endpoint definitions, DTOs, serializers/converters, validators, OpenAPI generation, clients, …
- Distinctive: line 12
Prefer additive, backward-compatible changes.
- Very specific: line 14
When a breaking change is unavoidable, identify affected consumers and use the repository's versioning/migration/deprecation approach.
- Distinctive: line 16
When available, compare generated OpenAPI or serialized representative responses before and after the change.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API contract safety
Treat routes, verbs, headers, query/path parameters, request and response schemas, JSON names, serialization rules, status codes, error bodies, enums, auth requirements, and public interfaces as contracts.
Before editing, locate controller/endpoint definitions, DTOs, serializers/converters, validators, OpenAPI generation, clients, contract/integration tests, and known consumers. Record current observable behavior, including defaults, optionality, casing, null handling, and error responses.
Prefer additive, backward-compatible changes. Do not rename/remove fields, change type or meaning, make optional input required, alter enum wire values, change status/error behavior, or tighten auth unless required. Distinguish missing, null, empty, and default values when clients can observe the difference.
When a breaking change is unavoidable, identify affected consumers and use the repository's versioning/migration/deprecation approach. Test serialized wire behavior and representative failures, not only C# object equality. Update API documentation/generated clients only when part of the repository's established workflow.
When available, compare generated OpenAPI or serialized representative responses before and after the change. Include missing versus null fields, enum wire values, error payloads and a representative existing consumer in compatibility tests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

