api-design
Skill1 starsChanged 3 months agoMITView on GitHub
Pin an interface contract before anything builds against it — typed input and output, one error envelope, what a consumer may depend on. Use it for a Spec variant, to land signatures in `plan.md`, or code-cold over a diff that moves a surface. Module internals stay with `codebase-design`, components and edges with `architecture-design`.
125 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- SkillMedev/api-integration-engineeringtheir own version, first seen Oct 5, 2026
- SkillMedev/full-stack-web-devtheir own version, first seen Oct 5, 2026
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- mnzralee/claude-multi-agent-architecturetheir own version, first seen Oct 3, 2026
Used with
Projects with it also use data-modeling, ci-pipeline and 9 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.
mmondoraSkilldata-modeling
Schema design, multi-tenant data isolation, and migration management. Firestore and PostgreSQL patterns, RLS, UUID v7 conventions. Use when designing database schemas, writing migrations, or implementing multi-tenant data access.
Also in 7 projects that use this
vndeeSkillci-pipeline
Use when creating or updating CI/CD pipelines with GitHub Actions or GitLab CI for Go, Python, or React projects
Also in 4 projects that use this
pluginagentmarketplaceSkillmicroservices
Microservices architecture patterns and best practices. Service decomposition, inter-service communication, and distributed data management.
Also in 4 projects that use this
kevinaimonsterSkilltypescript-strict
TypeScript strict mode and advanced type system assistant. Helps write strictly-typed TypeScript code with generics, type guards, utility types, conditional types, mapped types, and template literal types. Trigger when user says 'TypeScript types' 'type gymnastics' 'TypeScript generics' 'strict TypeScript' 'type guard' 'TS类型' 'TypeScript严格模式' '类型体操' '泛型怎么写' 'TS type help'. Keywords: TypeScript, strict mode, generics, type guard, utility types, conditional types, mapped types, template literal types, infer, extends, keyof, typeof, type narrowing, discriminated unions, type assertion, type predicate, type gymnastics, TS, 类型体操, 泛型, 类型守卫, 严格类型
Also in 4 projects that use this
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 10 projects that use this
DatabricksSkillload-testing
Load test a Databricks App to find its maximum QPS. Use when: (1) User says 'load test', 'benchmark', 'QPS', 'throughput', or 'performance test', (2) User wants to find how many queries per second their app can handle, (3) User wants to set up load testing scripts for their agent, (4) User wants to view load test results/dashboard, (5) User wants to validate results or observe latency/error rate with MLflow tracing.
Also in 4 projects that use this
Other versions125 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 125
- xu-xiang/everything-claude-code-zh★ 2ksame name
- Aaronontheweb/dotnet-skills★ 1.2ksame name
- nth5693/gemini-kit★ 373same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 206same name
- margelo/react-native-skills★ 173same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- cohen-liel/hivemind★ 110same name
- microsoft/haste★ 106same name
115 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 repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- acceptance-criteriaSkill
- architecture-designSkill
- browser-testing-with-devtoolsSkill
- ci-cdSkill
- codebase-designSkill
- codebase-researchSkill
- code-reviewSkill
- code-simplificationSkill
- comprehension-quizSkill
- debugging-and-error-recoverySkill
- deprecation-and-migrationSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environment-manifestSkill
- gauntlet-loopSkill
- git-workflowSkill
- handoffSkill
- idea-refineSkill
- incremental-implementationSkill
- interview-meSkill
- literate-explainerSkill
- observability-and-instrumentationSkill
- orchestratorSkill
- performance-optimizationSkill
- plan-breakdownSkill
- preflight-readinessSkill
- project-setupSkill
- pull-requestSkill
- quality-verificationSkill
- security-and-hardeningSkill
- shipping-and-launchSkill
- source-driven-developmentSkill
- spec-grillingSkill
- spec-reviewSkill
- test-driven-developmentSkill
- to-prdSkill
- using-agent-skillsSkill
- worktreeSkill
The file
Files
API and Interface Design
Purpose
Stage: Spec · Plan. Principles 1, 5, 6, 7, 8.
Pins the contract of a surface one piece of code offers another — endpoint, exported type, module boundary, component props — before anything builds against it. It writes no artifact of its own; the contract lands in the caller's file. The types are the documentation, so a surface pinned after its implementation documents whatever that implementation happened to do.
When to use / when to skip
- A surface something else calls is about to exist or change.
- The Spec sitting, as a variant for a load-bearing "what may a consumer depend on here" (
spec-grilling). - Plan, where two slices build against one surface and
plan-breakdownneeds its signatures and error envelope pinned first. - Code-cold over a written
architecture.md(architecture-design), or a diff moving a symbol, route or schema something outside it calls (orchestrator). - A pure interface refactor by hand, the exported signatures and their callers as substrate.
- Skip — a module's internals and where its seam falls:
codebase-design. - Skip — which components exist and the edges between them:
architecture-design. - Skip — retiring a surface consumers still call:
deprecation-and-migration.
Inputs
docs/features/<slug>/research.md— helps:## Structural facts, the seams and the conventions in use · without it: read the exported types and one caller,deriveddocs/features/<slug>/prd.md— helps:## Solutionand## Implementation Decisionsname the surfaces · without it: take them fromintent.mdor the prompt,derivedCONTEXT.md— helps:## Glossaryterms, used verbatim · without it: reuse the names the exported types already use, coining nothing,deriveddocs/adr/— helps: surface decisions already taken, cited by id · without it: treat this choice as newdocs/features/<slug>/architecture.md— helps: the components this surface sits between · without it:research.md's boundaries,derived
A present person is worth at most three questions, where the answer changes the surface's shape: the resource model, the error envelope, the versioning posture.
Process
references/surface-conventions.md draws what this body only names:
the error body and status map, the naming table, the REST and pagination forms, the typed-interface patterns.
- Match the conventions already there, or say what the fork buys. Read
## Structural factsand one existing caller first: a second error envelope, pagination style or name for one thing is paid for by every consumer and invisible from inside the feature adding it. - Write the contract before the implementation. Input and output are separate types with server-generated fields absent from every input; variants are discriminated unions; ids are branded.
- One error strategy at every point on the surface — the reference's structured body and status map,
never a mix of throwing,
nulland{ error }, never two shapes from one endpoint by outcome. - Validate at the boundary, trust the types inside it — route handlers, form submissions, environment loading, and every third-party response, untrusted whatever its documentation promises.
- Paginate every list from the first version; extend rather than modify — a new field arrives optional, an existing field's type holds, a field is not removed.
- Name every observable behaviour and mark which are committed — ordering, error text, timing, a
field's presence. Given enough consumers each is depended on whatever the contract promises (Hyrum's
Law), so design the removal path while the surface is on paper (
deprecation-and-migration). - Hand a hard-to-reverse choice to the person — REST against GraphQL, a public surface's shape, a
versioning posture, the error envelope: name it ADR-worthy with the alternative and its cost, for the
caller to record (
documentation-and-adrs); reversible detail stays inline. With nobody there: the default, its reason, a log entry, a Decided-for-you row. - Land the contract where the builder reads it cold — a Spec variant carrying your recommendation, or
plan.md's## File Structureand step snippets, exact enough thatincremental-implementationbuilds to the signature andtest-driven-developmentasserts the observable behaviour. - Grade a written surface code-cold, changing nothing
(
safety-rails.md) — the interface lens over a surface somebody already wrote, its checks catalogued inlens-passes.md· Sweep 2. Each finding is the fact plus a recommended answer the person can disagree with. By hand, close withpass · concerns · block(blocka stop-list item); dispatched byarchitecture-design, hand back findings only — an empty list where you found none.
Rationalizations
- "We'll document the API later" → the first consumer reads the implementation and depends on what it finds.
- "Pagination can wait" → the need arrives at a hundred items, by which time the contract has consumers.
- "PATCH is fiddly, take the whole object" → two clients that read, edit and send it all back lose one edit.
- "Nobody uses that undocumented behaviour" → if it is observable, somebody depends on it.
- "Two versions side by side is fine" → that is a diamond dependency for everyone downstream of both (the One-Version Rule).
- "Internal surfaces need no contract" → the contract is what lets two slices build in parallel.
Red flags
- One endpoint returning different shapes depending on the outcome.
- Error formats that differ from one endpoint to the next.
- Validation between two internal functions that already share a type.
- A field whose type changed, or a field that went away.
- A list endpoint with no pagination.
- A verb in a REST path (
/api/createNote), or a third-party response used unparsed.
Verification
- Every surface in scope has a typed input, a typed output, and one shared error shape.
- Every list carries pagination, and every added field is optional.
- Names are
CONTEXT.md's verbatim where the term exists there, and the naming table's otherwise. - The observable behaviours are listed, each marked committed or not.
- No decision contradicts an ADR; each hard-to-reverse one is cited by id or named ADR-worthy.
- Each decision settled with nobody to ask has a logged reason and a Decided-for-you row.
- The types ship in the same change as the implementation they describe.
- Every value reconstructed from a missing input is marked
derivedwhere written. - A code-cold pass left every file as it was and closed as its caller reads it:
pass · concerns · blockby hand, findings only — empty where there were none — when dispatched.
Outputs & handoff
No artifact of its own, and no STATE.md row. The contract lands in the caller's file — plan.md for
plan-breakdown, a §6 row for architecture-design, a record for spec-grilling — so one fact has one
writer, and the caller owns the slice's transition
(state-schema.md).
docs/session-log.md — one appended entry per surface decision taken with nobody to ask, cap 60 words,
matching its Decided-for-you row (state-schema.md). Report the
measured count against that cap; an over-cap entry is trimmed, not handed on.
Returned in conversation — the contract (typed signatures, error shape, resource and pagination forms),
the observable behaviours and which are committed, any decision named ADR-worthy with its alternative, and
what each derived input came from. Dispatched code-cold, the findings alone; by hand, those and the
verdict.
When a published contract's shape changes, its consumers move in the same change — the plan section,
the tests asserting it, the pull request's design anchor; the caller supersedes the promoted ADR by link
rather than deleting it (documentation-and-adrs), and re-reads every Decided-for-you decision citing the
moved section, confirming or reversing each one in the log.
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.

