skills/api-design/SKILL.md
Use when designing REST or GraphQL APIs - endpoint naming, versioning, error handling, pagination, authentication patterns
npx skillsauth add kienbui1995/magic-powers api-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Good APIs are consistent, predictable, and hard to misuse. Design for the consumer, not the implementation.
GET /api/v1/users → List users
GET /api/v1/users/:id → Get user
POST /api/v1/users → Create user
PUT /api/v1/users/:id → Full update
PATCH /api/v1/users/:id → Partial update
DELETE /api/v1/users/:id → Delete user
/users not /getUsers)/users not /user)/users/:id/orders{
"data": { ... },
"meta": { "page": 1, "total": 100 },
"errors": []
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description",
"details": [{ "field": "email", "issue": "invalid format" }]
}
}
Use standard HTTP status codes: 200, 201, 204, 400, 401, 403, 404, 409, 422, 429, 500.
GET /api/v1/users?page=2&per_page=20
GET /api/v1/users?cursor=abc123&limit=20 (preferred for large datasets)
/api/v1/ (simplest, recommended)Accept: application/vnd.api+json;version=1 (cleaner but harder to test)createUser(input: CreateUserInput!)X-RateLimit-*)content-media
Use when designing for XR (AR/VR/MR), choosing interaction modes, or adapting 2D UI patterns for spatial computing
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment
development
Use when you have a spec or requirements for a multi-step task, before touching code
development
Use when executing a structured workflow — select and run a feature, bugfix, refactor, research, or incident template with correct agent and model assignments per phase.