api-design
Skill0 starsChanged yesterdayMITView on GitHub
Design or review the public surface of a library or SDK that people and coding agents call from code (functions, options, results, errors, cancellation, exports, names). Use before adding or changing an export, and when reviewing one. Not for HTTP/REST endpoints, command lines (cli-design) or module boundaries (architecture-review).
192 other projects use a version of this.
Adopted by
Most recently taken up by
- agenticluke/rest-api-designer-plustheir own version, first seen Nov 15, 2026
- dovuthanhhien1609/claude-skillstheir own version, first seen Nov 15, 2026
- tayyebi/skillstheir own version, first seen Nov 15, 2026
- swap-cameroon/kuro-antigravity-configtheir own version, first seen Nov 15, 2026
- RostislavDugin/postgresustheir own version, first seen Nov 8, 2026
- Markssuave/Markssuave-Agent-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use db-design, everything-claude-code and 10 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.
yuexueyuSkilldb-design
数据库工程师技能 - Schema设计、索引优化、并发安全、数据库审计。当你涉及数据库表/字段/索引/SQL/迁移/MCP数据库操作、建表改表、写查询时必须使用此技能。即使用户只是说"加个字段"或"查下数据",也应触发。
Also in 4 projects that use this
InfopibeSkilleverything-claude-code
Also in 9 projects that use this
mryeastcodeSkilleverything-claude-code-conventions
Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
Also in 8 projects that use this
tpavanipradeepSkillnextjs-turbopack
Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.
Also in 15 projects that use this
Indium-AI-LabsSkilldata-pipeline-design
Design batch or incremental ETL and ELT pipelines and warehouse models: grain, partitioning, idempotent loads, late-arriving data, data quality tests, PII controls, and cost monitoring, before building them. Use when adding or changing a dbt model, warehouse table, scheduled transformation, or ingestion job. Not for transactional schema design (use the database-design skill) or event-sourced stores (use the event-sourcing-architecture skill).
Also in 3 projects that use this
thejordanleopoldSkillthird-party-integration
Use when integrating with external APIs, payment processors (Stripe), webhooks, or third-party services. Use when implementing API clients with authentication and rate limiting, handling webhooks with signature verification and idempotency, writing contract tests for external services, or isolating third-party dependencies behind adapters. Triggers: \"Stripe\", \"payment integration\", \"webhook\", \"third-party API\", \"external service\", \"API client\", \"integrate with\", \"signature verification\", \"idempotency key\".
Also in 3 projects that use this
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- affaan-m/ECC★ 246ksame name
- databasus/databasus★ 9.3ksame name
- RostislavDugin/postgresus★ 9.3ksame name
- authgear/authgear-server★ 2.1ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- Aaronontheweb/dotnet-skills★ 1.2ksame name
- epam/ai-dial-chat★ 501same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 229same name
- DevelopersGlobal/ai-agent-skills★ 216same name
182 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 repository34 other files it gives its agents.
- astroSkill
- bun-standardsSkill
- postgresSkill
- react-engineeringSkill
- rust-standardsSkill
- spring-bootSkill
- tailwind-v4Skill
- typescript-standardsSkill
- vitest-testingSkill
- architecture-reviewSkill
- benchmark-readiness-reviewSkill
- cli-designSkill
- codebase-scoutingSkill
- code-review-findingsSkill
- config-projection-reviewSkill
- documentation-hygieneSkill
- domain-modelingSkill
- formal-verificationSkill
- implementation-planningSkill
- orchestration-workflowSkill
- problem-clarificationSkill
- product-copySkill
- refactorSkill
- repository-text-hygieneSkill
- researchSkill
- security-scope-reviewSkill
- setup-canastaSkill
- system-designSkill
- task-closeoutSkill
- tddSkill
- technical-writingSkill
- upstream-contributionSkill
- writing-issuesSkill
- writing-prSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 8 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 166 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Use the language's standards skill, such as typescript-standards, for idioms (unions, readonly, exports).
- Distinctive: line 30
Call sites: Write two or three real call sites per consumer, with error handling and cancellation, before any type.
- Distinctive: line 33
Outcomes: Write a table: outcome, trigger, the caller's next action, and whether it is a returned value or a throw (rules below).
- Distinctive: line 46
Challenge: Run the review checklist on the recommendation.
- Distinctive: line 58
Prefer a plain function to a handle, class or builder.
- Very specific: line 66
Keep the surface to what every implementation honours.
- Distinctive: line 74
When support varies by backend or mode, expose a queryable capability description that defaults to "no", built from the same data as the …
- Very specific: line 77
When a result's meaning depends on scope, method or version, put that on the result (a guarantee or scope field), so forwarding the result …
- Distinctive: line 91
When failures are thrown, use a small set of codes grouped by the caller's next action (fix the call, not possible here, retry), not one …
- Very specific: line 103
Every async operation takes signal?: AbortSignal in its options, checks it before starting, and rejects with signal.reason.
- Very specific: line 115
When a safe and an unchecked variant coexist, the unchecked one carries a suffix (getUnsafe, getOrThrow).
- Distinctive: line 117
Before release, change the API, migrate the callers and delete the old path in one change, with no aliases.
- Very specific: line 124
Run the review checklist. Report each "no" with file and line, the rule it breaks, and the smallest fix.
- Distinctive: line 130
every export has a named consumer and a one-sentence summary.
“Common” is measured: kept by at least 6 in 10 of the 166 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 design
An API is judged where it is called. Design from the call sites of real consumers, and make every result say exactly what it established. A surface that reads well but promises more than it checked has failed.
Use the language's standards skill, such as typescript-standards, for
idioms (unions, readonly, exports); architecture-review for module
boundaries; cli-design for a command line that wraps this API; and
technical-writing for its documentation.
Design a surface
Each step ends when its output exists. Stop at a product or taste decision and ask.
- Consumers. List the consumers that exist today: repository, file, function, and what each needs. No consumer, no export: explore instead.
- Call sites. Write two or three real call sites per consumer, with error handling and cancellation, before any type. They must read clearly to someone who has seen only these lines.
- Outcomes. Write a table: outcome, trigger, the caller's next action, and whether it is a returned value or a throw (rules below). Add what each result guarantees and what it does not.
- Vocabulary. One name per concept across functions, options, results, errors, docs and CLI. Reuse the terms the caller's ecosystem and domain already use. Record rejected synonyms.
- Alternatives. Two or three designs that differ in shape, not naming: a function or a handle, a union or a throw, one entry point or several. Include the simplest design that serves the listed consumers. Every alternative serves those consumers; none is designed for imagined ones.
- Recommendation. Pick one. Name the simpler design you rejected and what it loses. Write a one-sentence summary per export; if it needs "and" or "unless", the export does two things.
- Challenge. Run the review checklist on the recommendation. Then the probe: can a caller holding only the type declarations handle every outcome, cancel, and tell a retryable failure from a final one?
- Enforcement. For each convention that must outlive this change, name the tool that checks it (lint rule, type test, package-shape check), or say none is needed.
Rules
Shape
- Prefer a plain function to a handle, class or builder. Use a handle only
when real state outlives one call (a long remote job, a configured
client). A declarative object (
{ when, require, otherwise }) earns its place only when the domain is a table of rules with a consumer. - Positional parameters only for the one or two required subjects
(
check(file, options)). Everything else in one options object, written inline unless several exports share it, withreadonlyfields and optional fields typed?: T | undefined. - Keep the surface to what every implementation honours. Put special cases
behind an explicit escape hatch (
client.raw), not in core options. - Sibling operations return one shape with the same field names.
Honesty
- Refuse what you cannot do, before any side effect. An option that is accepted and then ignored, or a result weaker than it looks, is a bug.
- When support varies by backend or mode, expose a queryable capability description that defaults to "no", built from the same data as the runtime check. Add it only with two or more implementations.
- When a result's meaning depends on scope, method or version, put that on
the result (a
guaranteeorscopefield), so forwarding the result keeps the caveat. - Reading a field never triggers I/O or heavy work. Costly actions are explicit calls.
Outcomes and errors
- Return every outcome the caller is expected to handle, including "could
not decide", as a union discriminated on one literal field (
status,kind). Each variant carries only its own fields. - Throw only for misuse (a bad argument:
TypeError,RangeError) and broken invariants. Validate at runtime too: JavaScript callers and agents bypass types. - When failures are thrown, use a small set of codes grouped by the caller's next action (fix the call, not possible here, retry), not one class per cause. Mark deterministic failures as not retryable.
- Errors carry a stable
nameandcode, keep the original incause, and pass instance checks across duplicate copies of the package. Keep secrets out of messages andcause. - "Unsupported": return it as a value when it depends on the input being analysed; throw when it depends on options or environment the caller can check up front.
Cancellation and time
- Every async operation takes
signal?: AbortSignalin its options, checks it before starting, and rejects withsignal.reason. Normalize the abort into the library's own error only when the library already funnels every failure through one error type; document which one you chose. - A time limit has its unit in the name (
timeoutMs) and is its own outcome, distinct from a caller's abort. A timeout is never success.
Exports and change
- Named exports, small entry points, no wildcard re-exports. Keep third-party types out of the core surface; if one must appear, mark that export less stable.
- When a safe and an unchecked variant coexist, the unchecked one carries a
suffix (
getUnsafe,getOrThrow). - Before release, change the API, migrate the callers and delete the old path in one change, with no aliases. After release, adding is safe and renaming, retyping or removing is a break: record it in the changelog with the old form, the new form and why.
Review an existing surface
Run the review checklist. Report each
"no" with file and line, the rule it breaks, and the smallest fix. A rename
with no behaviour change is a refactor.
Done when
- every export has a named consumer and a one-sentence summary;
- the outcome table covers every result and every throw;
- the checklist passes, or each failure is listed with its reason;
- the open decisions are listed for the owner.
Sources lists the evidence behind these rules and where sources disagree.
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.

