| name | api-interface-design |
| description | Use this skill for REST/RPC contracts, versioning, error shapes, schemas, backward compatibility. Trigger when the task involves programming work related to API Interface Design, production implementation, audits, debugging, strategy, or validation. |
API Interface Design
Use this skill to handle Programming tasks focused on REST/RPC contracts, versioning, error shapes, schemas, backward compatibility.
Workflow
- Clarify the user outcome, constraints, current stack, and definition of done.
- Inspect the local repository or provided artifacts before proposing changes.
- Check official documentation when APIs, platform rules, SDK versions, policies, or production behavior may have changed.
- For non-trivial choices, compare proven open-source patterns or examples and adapt ideas without copying incompatible code.
- Implement the smallest production-ready change that satisfies the request.
- Validate with the most relevant checks: tests, lint, typecheck, build, browser/device review, audits, or manual scenario.
- Report changed files, commands run, remaining risks, and exact next steps.
Focus Checklist
- Define scope and assumptions explicitly.
- Prefer existing project conventions and tools.
- Handle loading, empty, error, permission, and edge states where relevant.
- Include security, privacy, performance, accessibility, and rollback considerations when they apply.
- Keep output actionable and evidence-backed.
Guardrails
- Do not break public contracts without migration guidance.
- Do not perform destructive, paid, production, trading, publishing, or account-changing actions without explicit user confirmation.
- Do not expose secrets, private keys, tokens, cookies, personal data, or confidential business data.
- If validation is impossible, state exactly why and provide a manual verification path.