api-and-interface-design
Skill2 starsChanged 5 months agoMITView on GitHub
Use when designing or changing an API, RPC, CLI, endpoint, schema, public function signature or plugin contract: «спроектируй API/интерфейс», «добавь эндпоинт», «поменяй контракт», breaking changes, versioning, pagination, retries, error format. Not for internal module seams (architecture-principles).
92 other projects use a version of this.
Adopted by
Most recently taken up by
- dzikrisyairozi/agent-skillstheir own version, first seen Nov 29, 2026
- jaydubya818/MissionControltheir own version, first seen Nov 29, 2026
- aakash1552005/universal-agent-skillstheir own version, first seen Nov 29, 2026
- karanmrn/karanagentskillstheir own version, first seen Nov 29, 2026
- karanmrn/kstacktheir own version, first seen Nov 29, 2026
- alexj11324/Mikkatheir own version, first seen Nov 29, 2026
Used with
Projects with it also use observability-and-instrumentation, accessibility-engineering 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.
jaydubya818Skillobservability-and-instrumentation
Add or review logs, metrics, traces, and actionable alerts.
Also in 50 projects that use this
steven123397Skillaccessibility-engineering
Audits existing interfaces for WCAG 2.2 AA conformance and remediates the violations found. Use when auditing a page or component for accessibility, running axe-core or pa11y, triaging a11y violations, or checking screen reader and contrast issues before shipping.
Also in 4 projects that use this
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 22 projects that use this
seikaikyoSkilldoubt-driven-development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
Also in 59 projects that use this
jaydubya818Skilldeprecation-and-migration
Retire APIs or migrate consumers and persistent data across releases.
Also in 47 projects that use this
HK-hubSkillcode-simplification
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
Also in 65 projects that use this
Other versions92 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 92
- addyosmani/agent-skills★ 121ksame name
- ollaya-dev/ollaya★ 1.5ksame name
- shashankswe2020-ux/whoop-mcp★ 181same name
- alexj11324/Mikka★ 90same name
- aspectly-labs/Mikka★ 90same name
- drvoss/everything-copilot-cli★ 49same name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- jmxt3/gitscape.ai★ 33same name
- sampleXbro/agentsmesh★ 31same name
- jaskirat1616/grok-skills★ 22same name
82 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 repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-ui-reviewSkill
- agent-retrospectiveSkill
- agents-md-retrospectiveSkill
- agent-squadSkill
- architecture-mapSkill
- architecture-normalizerSkill
- architecture-principlesSkill
- authz-boundary-reviewSkill
- c-cppSkill
- code-qualitySkill
- code-reviewSkill
- code-to-figmaSkill
- code-wiki-ruSkill
- context-packSkill
- core-engineeringSkill
- debuggingSkill
- dependency-advisory-auditSkill
- deserialization-parser-reviewSkill
- design-system-extractorSkill
- documentationSkill
- engineering-standardsSkill
- esp32Skill
- esphomeSkill
- external-agent-pack-auditSkill
- fastSkill
- figma-to-codeSkill
- fix-security-findingSkill
- goSkill
- homeassistantSkill
- mcp-tool-routerSkill
- migration-plannerSkill
- mobile-qaSkill
- multi-agent-pr-reviewSkill
- performanceSkill
- playwright-visual-qaSkill
- pythonSkill
- quality-gatesSkill
- refactoringSkill
- responsive-breakpoint-checkSkill
- review-routerSkill
- rustSkill
- secrets-and-config-reviewSkill
- security-diff-reviewSkill
- security-routerSkill
- securitySkill
- session-memorySkill
- specialist-dispatchSkill
- subagent-result-mergeSkill
- supply-chain-reviewSkill
- tdd-guardSkill
- testing-tddSkill
- threat-modelSkill
- typescriptSkill
- ui-buildSkill
- ui-business-appsSkill
- ui-concept-firstSkill
- ui-figmaSkill
- ui-qaSkill
- ui-researchSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 10 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 87 edited versions we read keep these.
10
Distinctive
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
- Distinctive: line 17
Treat every observable behaviour of a published interface as a commitment.
- Distinctive: line 19
Prefer one live version of a thing: extend rather than fork.
- Distinctive: line 23
Write the contract (types, schema, signatures, documented errors) before the implementation, and commit it with the code.
- Distinctive: line 26
Keep input shapes separate from output shapes.
- Distinctive: line 37
Do not mix throwing, returning null and returning an error object for the same kind of failure.
- Distinctive: line 44
Treat third-party responses as untrusted data: check shape and content before use.
- Distinctive: line 51
Prefer additive change: new optional fields, new operations, new enum values that old clients can ignore or default.
- Distinctive: line 53
Do not remove or rename fields, change types, tighten validation or change defaults in place.
- Distinctive: line 57
Check consumers (search the repo, clients, docs) before declaring a change safe.
- Distinctive: line 71
Keep keys longer than the longest retry or replay path.
“Common” is measured: kept by at least 6 in 10 of the 87 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
Skill: api-and-interface-design
Design interfaces that are stable, documented and hard to misuse. Applies to HTTP/RPC APIs, CLIs, schemas, public library functions and plugin contracts.
Hyrum's law
With enough users, every observable behaviour becomes depended on, whatever the contract says: error text, ordering, timing, undocumented quirks.
- Be deliberate about what is exposed; do not leak implementation details.
- Treat every observable behaviour of a published interface as a commitment.
- Plan deprecation at design time; tests alone do not catch undocumented use.
- Prefer one live version of a thing: extend rather than fork.
Contract first
Write the contract (types, schema, signatures, documented errors) before the implementation, and commit it with the code. For each operation state inputs, outputs, server-generated fields, error cases and whether it is safe to retry. Keep input shapes separate from output shapes. Model variants as explicit tagged unions, not flags and nullable fields.
Error model
Pick one error strategy and use it everywhere.
- One structured shape: machine-readable
code, humanmessage, optionaldetails. Clients branch oncode, never on message text. - Map causes consistently: invalid input, unauthenticated, forbidden, not found, conflict, unprocessable, internal. Never expose internals in server errors.
- Do not mix throwing, returning null and returning an error object for the same kind of failure.
Validate at the edge
- Validate where external input enters: request handlers, CLI arguments, config and environment loading, parsing of third-party responses.
- Treat third-party responses as untrusted data: check shape and content before use.
- Inside the trusted core rely on types; do not scatter re-validation through internal functions or over data read from your own store.
Backwards compatibility
- Prefer additive change: new optional fields, new operations, new enum values that old clients can ignore or default.
- Do not remove or rename fields, change types, tighten validation or change defaults in place; that is a breaking change.
- Breaking change: introduce a new version or name, run both with a documented deprecation window, and say who is affected. Do not keep many versions alive.
- Check consumers (search the repo, clients, docs) before declaring a change safe.
Idempotency and retries
- Mark each state-changing operation as idempotent or document it unsafe to retry. Deletes and PUT-style replaces should be idempotent.
- Derive an idempotency key from the intent (stable across retries, different across intents), supplied by the client or initiating event; never a fresh random value or timestamp per attempt.
- Claim the key atomically (unique constraint), not check-then-act. Reusing a key with a different payload must fail loudly. Decide what an in-flight duplicate gets: reject (conflict), wait with a bound, or return pending plus a status location.
- A timeout means outcome unknown, not failure. Record intent before the call.
- Keep keys longer than the longest retry or replay path.
Pagination and limits
- Paginate every list operation from the start; prefer cursors for changing data.
- Enforce and document a maximum page size, a default, and a stable sort order.
- Bound request size, filter complexity and rate; state the limits in the contract and the error returned when exceeded.
- Support partial update (patch semantics) where full replacement forces clients to send data they do not own.
Naming
- One convention per surface; follow what the repository already uses.
- Resources as nouns; operations as verbs only where the style is RPC or CLI.
- Booleans read as questions (
is_,has_,can_); units and time zones are part of the name or the type; identifiers are distinct types where the language allows. - Same concept, same word, everywhere.
Red flags
- Same operation returning different shapes by condition.
- Inconsistent error formats; verbs in resource paths.
- List operations without pagination or limits.
- Breaking changes to existing fields without a version or deprecation path.
- Idempotency key read then written in separate steps.
- Third-party data used without validation.
Verification
- Every operation has typed input and output and documented errors.
- One error format; validation only at the edge.
- Lists paginated with documented limits.
- New fields additive; breaking changes versioned and announced.
- State-changing operations idempotent or documented unsafe to retry.
- Contract committed with the implementation; consumers checked.
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.

