api-compat
Skill0 starsChanged 2 months agoMITView on GitHub
Use when changing a public or shared API (HTTP, SDK, CLI, events). Prefer additive changes; document breaks; provide versioning or migration paths before shipping incompatible updates.
In this repository9 other files it gives its agents.
- adversarial-reviewSkill
- flaky-test-triageSkill
- incident-hotfixSkill
- perf-measure-firstSkill
- repro-firstSkill
- secrets-hygieneSkill
- skill-authorSkill
- test-plan-firstSkill
- yagni-sliceSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 27
Do not delete or rename public endpoints/fields without confirmation and a migration note.
- Distinctive: line 28
Do not force-push release tags or rewrite published changelog history without confirmation.
- Distinctive: line 33
Prefer additive changes (new fields optional.
- Distinctive: line 34
If a break is required, design deprecation → dual-run → remove, or a versioned path.
- Distinctive: line 35
Document the change and migration steps in changelog/PR.
≈ “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 Compatibility
When to use
- Modifying request/response shapes, CLI flags, SDK exports, or event payloads consumers rely on.
- Deprecating a field, endpoint, or behavior.
- The user asks for a "breaking change", "v2", or "migrate callers".
When not to use
- Purely internal helpers with a single in-repo caller and no published contract.
- Bug fixes that restore documented behavior without changing the contract.
- Experimental endpoints explicitly marked unstable in docs and headers.
Assumptions
- You can identify the public surface (OpenAPI, exported types, CLI help, or docs).
- Semver or an explicit API versioning scheme may apply; follow the repo's convention.
- Do not delete or rename public endpoints/fields without confirmation and a migration note.
- Do not force-push release tags or rewrite published changelog history without confirmation.
Workflow
- Inventory the current public contract and known callers (in-repo first).
- Prefer additive changes (new fields optional; new endpoints; new flags).
- If a break is required, design deprecation → dual-run → remove, or a versioned path.
- Document the change and migration steps in changelog/PR.
- Ship with tests that lock both old (while supported) and new behavior.
Steps
- Classify the change — Additive, deprecating, or breaking. Default to additive.
- Preserve wire compatibility — New JSON fields optional; do not reuse field names for new meanings; avoid tightening validation unexpectedly.
- Deprecation path — Mark old fields/endpoints deprecated with a removal timeline; keep them working until then when feasible.
- Version or migrate — For hard breaks: new path (
/v2), negotiated version header, or coordinated caller PRs. State which. - Tests & examples — Update contract tests, golden files, and README/OpenAPI examples in the same change.
- Announce — PR summary includes impact, migration steps, and rollback (revert commit / previous version).
Success criteria
- Change type (additive / deprecating / breaking) is explicit in the PR.
- Breaks have a documented migration or version strategy.
- Existing supported clients keep working, or unsupported breakage is called out with confirmation.
- Contract tests/docs updated in the same diff.
- Destructive removals were confirmed or deferred.
Out of scope
- GraphQL schema federation strategy across many services.
- Marketing version numbering unrelated to API contracts.
- Database schema migrations without an external API impact (handle separately).
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.

