api-and-interface-design
Skill47 starsChanged 4 months agoMITView on GitHub
Use when defining a public API, CLI, webhook, or SDK surface — lock the contract first so compatibility, validation, and versioning stay intentional instead of accidental
38 other projects use a version of this.
Adopted by
Most recently taken up by
- GuillemRoca/agent-skills-androidtheir own version, first seen Oct 3, 2026
- addyosmani/agent-skillstheir own version, first seen Oct 3, 2026
- weisser-dev/agentic-skillstheir own version, first seen Oct 3, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
- richardkuo2002/gaterail-skilltheir own version, first seen Sep 21, 2026
- vinvcn/addyosmani-agent-skills-zhtheir own version, first seen Sep 15, 2026
Used with
Projects with it also use constraint-driven-development, code-simplification and 7 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.
vinvcnSkillconstraint-driven-development
把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。
Also in 4 projects that use this
az9713Skillcode-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 30 projects that use this
skytiger6724Skillbrainstorm-experiments-new
Design lean startup experiments (pretotypes) for a new product. Creates XYZ hypotheses and suggests low-effort validation methods like landing pages, explainer videos, and pre-orders. Use when validating a new product idea, creating pretotypes, or testing market demand.
Also in 4 projects that use this
skytiger6724Skillideal-customer-profile
Identify the Ideal Customer Profile (ICP) from research data with demographics, behaviors, JTBD, and needs. Use when defining your ICP, analyzing PMF survey data, or understanding who your best customers are.
Also in 4 projects that use this
borhen68Skillobservability-and-instrumentation
Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
Also in 12 projects that use this
- +4 more from skytiger6724
Other versions38 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 38
- addyosmani/agent-skills★ 101ksame name
- shashankswe2020-ux/whoop-mcp★ 165same name
- thiientv/godmode★ 96same name
- az9713/addyosmani-agent-skills★ 38same name
- vinvcn/addyosmani-agent-skills-zh★ 38same name
- jmxt3/gitscape.ai★ 32same name
- pimenov/codex-first-skills-pack★ 25same name
- sampleXbro/agentsmesh★ 25same name
- ishandutta2007/Awesome-Agent-Skills★ 21same name
- HiAi-gg/hiai-opencode★ 18same name
28 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 repository111 other files it gives its agents.
- AGENTS.mdAGENTS.md
- COPILOT-INSTRUCTIONS.mdCopilot instructions
- .github/copilot-instructions.mdCopilot instructions
- ai-visibilitySkill
- content-strategySkill
- seoSkill
- actions-debuggingSkill
- agentic-engineeringSkill
- autopilot-patternsSkill
- background-agentSkill
- context-primeSkill
- copilot-memorySkill
- cross-session-memorySkill
- ecosystem-intakeSkill
- fleet-parallelSkill
- github-code-searchSkill
- github-codespaces-efficiencySkill
- github-issue-triageSkill
- github-pr-workflowSkill
- ide-switchingSkill
- knowledge-curatorSkill
- mcp-builderSkill
- mcp-ecosystemSkill
- multi-model-strategySkill
- plan-mode-masterySkill
- scope-guardSkill
- session-managementSkill
- stack-detectorSkill
- sub-agent-sandboxingSkill
- task-intake-routerSkill
- team-plannerSkill
- token-cost-optimizerSkill
- code-reviewSkill
- context-engineeringSkill
- cpp-debuggingSkill
- deprecation-and-migrationSkill
- diagnoseSkill
- fix-build-errorsSkill
- fix-github-issueSkill
- implementSkill
- improve-codebase-architectureSkill
- nestjs-prismaSkill
- nextjs-prismaSkill
- performance-optimizationSkill
- pr-multi-perspective-reviewSkill
- prototypeSkill
- react-vitestSkill
- receiving-code-reviewSkill
- refactor-cleanSkill
- reviewSkill
- skill-creatorSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- systematic-debuggingSkill
- tdd-workflowSkill
- zoom-outSkill
- add-to-changelogSkill
- api-documentationSkill
- architecture-decisionsSkill
- code-tourSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
6
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 42
If the consumer or stability target is unclear, you are not ready to implement.
- Distinctive: line 46
Create a contract document or spec section before touching implementation:
- Distinctive: line 78
If consumers start depending on it, can we support it long-term?
- Distinctive: line 79
If not, should we remove it, hide it, or document that it is non-contractual?
- Distinctive: line 98
Do not scatter the same runtime validation through every internal layer.
- Distinctive: line 114
If you cannot explain the migration path in two or three sentences, the change is not ready.
“Common” is measured: kept by at least 6 in 10 of the 37 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 and Interface Design
Define the contract before the implementation. This skill is for public or cross-team interfaces where downstream consumers can depend on every observable behavior, including the ones you did not mean to promise.
When to Use
- Designing a new public HTTP API, CLI command, webhook, SDK surface, or plugin contract
- Changing an existing interface that other teams, tools, or customers already consume
- Clarifying breaking-change policy before implementation starts
- Tightening the interface section of
spec-driven-developmentfor a compatibility-sensitive feature
When NOT to Use
| Instead of api-and-interface-design | Use |
| Internal implementation design inside one module | spec-driven-development |
| Writing user-facing docs for a finished API | api-documentation |
| Retiring or replacing an old interface | deprecation-and-migration |
| Narrow bug fixes with no contract change | do the fix directly |
Workflow
1. Identify the real contract boundary
Write down:
- Who consumes this interface? Humans, services, CLI users, integrations, third-party developers
- What is observable? Inputs, outputs, error codes, ordering, timing, idempotency, pagination, retries
- What must stay stable? Field names, response structure, exit codes, callback payloads, invariants
If the consumer or stability target is unclear, you are not ready to implement.
2. Draft the contract before code
Create a contract document or spec section before touching implementation:
## Interface Contract: createWidget
**Interface type**: REST API / CLI / SDK / webhook
**Consumers**: Internal services + external customers
**Stability**: stable / beta / experimental
### Inputs
- Method / command / function name:
- Required parameters:
- Optional parameters:
- Validation rules:
### Outputs
- Success shape:
- Error shape:
- Ordering / pagination guarantees:
### Invariants
- [Behavior that must remain true]
### Non-Goals
- [What this interface deliberately does not promise]3. Run a Hyrum's Law review
For every observable behavior, ask:
- Is this behavior intentionally part of the contract?
- If consumers start depending on it, can we support it long-term?
- If not, should we remove it, hide it, or document that it is non-contractual?
Common accidental contracts:
- Stable ordering without documenting it
- Error message wording used by scripts
- Undocumented default values
- Side effects triggered by read operations
- Field presence that is only an implementation artifact
4. Design validation at the trust boundary
Validation should happen where untrusted input enters the system:
- HTTP body, query params, headers
- CLI args and environment variables
- Webhook payloads
- Files or user-supplied configuration
Do not scatter the same runtime validation through every internal layer. Define:
- Accepted input shape
- Rejection rules
- Standard error envelope or exit code mapping
- Which invariants are guaranteed after boundary validation succeeds
5. Choose the compatibility strategy
| Change type | Default strategy |
| Additive field | Make optional first; define default behavior |
| Renamed field | Add new field, deprecate old one, keep overlap window |
| Semantic change | Version the interface or add a new endpoint/flag |
| Removed capability | Publish a migration path before removal |
If you cannot explain the migration path in two or three sentences, the change is not ready.
6. Hand off to implementation planning
Once the contract is stable:
- Feed it into
spec-driven-development - Identify tests that prove the contract
- Implement the smallest slice that honors the contract exactly
Example
## Interface Contract: `copilot skill install`
**Interface type**: CLI
**Consumers**: Developers using Copilot CLI
**Stability**: beta
### Inputs
- Command: `copilot skill install <url-or-path>`
- Optional flags: `--dry-run`, `--force`
- Validation rules:
- URL must be HTTPS or GitHub shorthand
- Local path must contain a valid skill directory
### Outputs
- Exit code `0`: install succeeded
- Exit code `1`: validation failure
- Exit code `2`: network or fetch failure
### Invariants
- Installed skill is validated before being written
- `--dry-run` never mutates the filesystem
### Non-Goals
- Private repository authentication
- Version pinningCommon Mistakes
| Mistake | Fix |
| Letting implementation details leak into the contract | Document only consumer-visible behavior |
| Treating every internal helper as a public interface | Limit this skill to external or cross-team boundaries |
| Adding validation everywhere "just in case" | Validate once at the boundary, then trust the normalized input |
| Delaying breaking-change planning until after coding | Choose the migration strategy before implementation |
Verification
- Consumers and stability target are explicitly named
- Inputs, outputs, invariants, and non-goals are written before coding
- Observable but accidental behaviors were reviewed for Hyrum's Law risk
- Boundary validation and error semantics are defined
- Breaking changes have a migration or versioning strategy
See Also
spec-driven-development— turn the contract into an implementation planapi-documentation— publish user-facing API docsdeprecation-and-migration— retire or replace old interfaces safely
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.

