api-contract
Skill0 starsChanged 7 months agoMITView on GitHub
Distill an OpenAPI 3.x spec (JSON or YAML) into a compact CONTRACT.md with endpoints, methods, brief descriptions, schema references, and auth scheme summary. Read once instead of paging through a multi-MB spec file. Use when you need to understand or work against an API whose spec is too large for direct reading.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- zdanovichnick/dotnet-pilottheir own version, first seen Nov 29, 2026
- Vacayy/explorertheir own version, first seen Nov 29, 2026
- Reactive-Skills/skillstheir own version, first seen Nov 29, 2026
- AmirAzy/HoNspottheir own version, first seen Nov 29, 2026
- TomorrowLM/lm-skilltheir own version, first seen Nov 22, 2026
- chatquill/claude-code-websitestheir own version, first seen Nov 22, 2026
Used with
Projects with it also use design-system, release-notes and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkilldesign-system
Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.
Also in 4 projects that use this
Microsoft AzureSkillrelease-notes
Author and update release notes for Azure App Configuration libraries and providers. USE FOR: write release notes, add release note entry, update release notes, draft release notes, new version release notes, format release notes. DO NOT USE FOR: generating changelogs from git history, writing internal engineering notes.
Also in 4 projects that use this
OpenAISkillsystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 5 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- ChenyCHENYU/Robot_Admin★ 1ksame name
- zdanovichnick/dotnet-pilot★ 5same name
- Eliahhango/nullbyte-security★ 4same name
- gonimar/claude-web-studio★ 4same name
- digitaldreams/tuhin★ 3same name
- PatriotAgenticLLC/better_claude_skillz★ 3same name
- vndee/engineering-skills★ 3same name
- 1398281322-a11y/java-backend-guardrails★ 2same name
- AmirAzy/HoNspot★ 2same name
- Echo-Scion/orioncortex★ 2same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- answer-cacheSkill
- codemapSkill
- diff-summarySkill
- file-summarySkill
- git-digestSkill
- log-extractSkill
- run-quietSkill
- session-handoffSkill
- test-failures-onlySkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Do NOT invoke when:
- Distinctive: line 41
If under ~1500 lines: use the Read tool to read the whole file.
- Very specific: line 88
If type: object with properties, summarize as { key1: <type>, key2: <type>, … }.
- Very specific: line 90
If type: array, summarize as <item-type>[].
- Very specific: line 92
If $ref only, summarize as → <target>.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
api-contract
A Markdown-only skill — no Python, no scripts. You (Claude) read the
OpenAPI spec with the Read tool (or extract sections via grep when the
spec is too large), parse it in-context, and write CONTRACT.md.
When to invoke
Invoke api-contract when ANY of these apply:
- The user points you at an OpenAPI / Swagger spec file (
openapi.json,swagger.yaml, …) and asks about endpoints / shapes / auth. - You're about to read a spec file > 1000 lines.
- You need to call an API documented by a spec and want to know which endpoints exist before drilling into one.
Do NOT invoke when:
- The spec is small (< 200 lines) — just read it.
- The user wants details of a specific endpoint already in context.
- The input is GraphQL SDL — only OpenAPI is supported in v1.
How to run
Step 1 — measure the spec
wc -l "<path>"- If under ~1500 lines: use the Read tool to read the whole file.
- Otherwise: use
grep+ Read with offsets to extract only the sections you need (see Step 2 below).
Step 2 — extract the sections you need
For both JSON and YAML specs, you only need four top-level sections:
| Section | YAML key | JSON key |
| Metadata | info: | "info": |
| Servers | servers: | "servers": |
| Endpoints | paths: | "paths": |
| Schemas | components.schemas: or definitions: (Swagger 2) | "components"."schemas" or "definitions" |
| Auth | components.securitySchemes: or securityDefinitions: (Swagger 2) | same |
For huge specs, locate the line ranges of these sections with:
grep -nE '^(info|servers|paths|components|definitions|securityDefinitions):' "<path>"(JSON: look for top-level keys at indent 2 — grep -nE '^\s{2}"(info|servers|paths|components|definitions)"\s*:' "<path>".)
Then use the Read tool with offset and limit to read each section
individually.
Step 3 — parse and summarize
Endpoints
For each path in paths:
- For each HTTP method (
get,post,put,patch,delete,head,options):- Extract
summary(first line) ordescription(first sentence) as the one-line description. - Extract
tags(first tag is used for grouping). - Extract request body schema name if present (
requestBody.content.*.schema.$ref→ last segment after/). - Extract
parametersof typequery(list the names, comma-separated). - Extract success response status + schema name if present
(
responses.2xx.content.*.schema.$ref→ last segment).
- Extract
Group endpoints by tag (or (untagged)).
Schemas
For each entry in components.schemas (or definitions):
- If
type: objectwithproperties, summarize as{ key1: <type>, key2: <type>, … }. Mark required keys with(required). - If
type: array, summarize as<item-type>[]. - If
enum, summarize asenum (<comma-list>). - If
$refonly, summarize as→ <target>. - Cap at the first ~5 keys; append
…if more.
Auth
For each entry in securitySchemes:
- Print
<name>+<type>+ key transport (header / query / cookie) + scheme/format if relevant.
Step 4 — render CONTRACT.md
# API contract — <title> (v<version>)
Servers: <comma-list of server URLs>
Base URL: <basePath if Swagger 2, else first server.url path>
## Auth
- <name> (<type>, header: <Authorization|X-API-Key|…>)
- …
## Endpoints (<total>)
### <tag>
- <METHOD> <path> — <one-line summary> (<body: SchemaName, query: a, b, → 200 ResponseSchema>)
- …
(Repeat per tag, alphabetized.)
## Schemas (<total>)
- <Name> <inlined shape>
- …By default, write to <repo-root>/CONTRACT.md (use output=<path> to
override). If the file already exists, overwrite it.
Supported arguments
| Argument | Default | Purpose |
path (first positional) | required | Path to an OpenAPI 3.x JSON or YAML spec. |
output=<path> | CONTRACT.md at repo root | Where to write the distilled contract. |
tag=<name> | none | Filter endpoints whose tag contains <name> (case-insensitive). |
maxschemas=N | 40 | Cap on schemas in the Schemas section. |
noschemas=true | off | Skip the Schemas section entirely. |
Notes
- v1 supports OpenAPI 3.x and Swagger 2.0 (the section keys differ, but the shapes are similar enough). GraphQL SDL is out of scope.
- For YAML specs, you read them with the Read tool the same as JSON — no parser library is needed because YAML keys are line-oriented and shallow enough for visual parsing.
- Schemas with deep nesting are summarized to top-level shape only. Drill into the spec directly when you need full detail on one.
- The result is small and stable — commit
CONTRACT.mdto the repo so future sessions skip the distill step.
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.

