agentsclimarketplace

Api conventions

Skill manikumarkv/devrunway-claude-plugin/skills/api-conventions

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.From its SKILL.md

Install
npx -y skills add manikumarkv/devrunway-claude-plugin --skill api-conventions

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

1.9 KB, as published. Nobody here has run it

Full standards in api-conventions.md. Always-on summary:

Response envelope — always consistent:

  • Success: { "success": true, "data": <resource>, "meta": { "requestId": "...", "timestamp": "..." } }
  • Success + pagination: add "pagination": { "nextCursor": "...", "total": N, "limit": 20, "hasMore": true }
  • Error: { "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:

  • Prefix and version from day one: /api/v1/
  • Plural nouns: /orders not /order or /getOrders
  • Nested for ownership: /users/:userId/orders (max 2 levels deep)
  • kebab-case path segments: /order-items not /orderItems

HTTP status codes:

  • 200 success · 201 created · 204 deleted (no body)
  • 400 invalid input · 401 not authenticated · 403 not authorised
  • 404 not found · 409 conflict · 422 business rule violated · 500 unexpected

Pagination: 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.

Keep looking

Skills are one crate of 626,194. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.