From devrunway
Universal REST API design principles — response envelope, route naming, versioning, pagination, status codes. Applies to any backend language or framework. Load when designing or implementing any API endpoint.
How this skill is triggered — by the user, by Claude, or both
Slash command
/devrunway:api-conventionssrc/**/*.controller.*src/**/*.route.*src/**/*.handler.*src/**/routes/**src/**/api/**The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Full standards in [api-conventions.md](api-conventions.md). Always-on summary:
Full standards in api-conventions.md. Always-on summary:
Response envelope — always consistent:
{ "success": true, "data": <resource>, "meta": { "requestId": "...", "timestamp": "..." } }"pagination": { "nextCursor": "...", "total": N, "limit": 20, "hasMore": true }{ "success": false, "error": { "code": "NOT_FOUND", "message": "...", "details": [...] }, "meta": { ... } }JS implementation shape (always use this):
// Success
res.json({ success: true, data: result });
// Error
res.json({ success: false, error: { code: 'NOT_FOUND', message: '...' } });
Routes:
/api/v1//orders not /order or /getOrders/users/:userId/orders (max 2 levels deep)/order-items not /orderItemsHTTP status codes:
200 success · 201 created · 204 deleted (no body)400 invalid input · 401 not authenticated · 403 not authorised404 not found · 409 conflict · 422 business rule violated · 500 unexpectedPagination: prefer cursor-based (?limit=20&cursor=<id>) over offset — offset is inconsistent under concurrent writes
Never: verb routes (/getOrders), unversioned paths (/api/orders), bare arrays at root, 200 for errors
For implementation helpers (response builder functions, validation middleware, framework-specific wiring), see your backend layer skill.
npx claudepluginhub manikumarkv/devrunway-claude-plugin --plugin devrunwayGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.