skills/standards-api/SKILL.md
Use when designing, building, documenting, or maintaining RESTful APIs, defining type contracts between modules, or establishing boundaries between frontend and backend. Enforces the project's style guide, response envelopes, pagination, field naming, and release readiness.
npx skillsauth add paulund/ai standards-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
Security scan pending...
This skill is queued for security scanning. Results will appear when the scan completes.
| Rationalization | Reality | |---|---| | "We'll document the API later" | The types ARE the documentation. Define them first. | | "We don't need pagination for now" | You will the moment someone has 100+ items. Add it from the start. | | "PATCH is complicated, let's just use PUT" | PUT requires the full object every time. PATCH is what clients actually want. | | "We'll version the API when we need to" | Breaking changes without versioning break consumers. Design for extension from the start. | | "Nobody uses that undocumented behavior" | Hyrum's Law: if it's observable, somebody depends on it. Treat every public behavior as a commitment. | | "Internal APIs don't need contracts" | Internal consumers are still consumers. Contracts prevent coupling and enable parallel work. |
/api/createTask, /api/getUsers)After designing or implementing an API:
snake_case for all JSON field names, query parameters, and error detail keys.Z (YYYY-MM-DDTHH:MM:SSZ).{
"data": [ ... ],
"meta": { "total": 120, "page": 2 },
"links": { "next": "...", "prev": "..." }
}
{
"error": {
"code": 422,
"message": "Validation failed",
"details": { "field_name": ["Error message"] }
}
}
page and per_page query params. Enforce sensible defaults and a max limit./v1/, /v2/). Confirm with the user before introducing breaking changes.| Topic | Reference | Load When | |-------|-----------|-----------| | Design Principles | references/design-principles.md | Designing new APIs from scratch, defining module boundaries, or creating public interfaces | | OpenAPI Specification | references/openapi-specification.md | Writing, updating, or validating an OpenAPI spec | | Pre-Release Checklist | references/pre-release-checklist.md | Before releasing a new API or major endpoint |
development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.