api-design

Provides REST API design conventions for resource naming, status codes, pagination, and versioning.

9|Updated Jul 17, 2026
One-click install
npx skills add https://github.com/Yassimba/loom --skill api-design-yassimba
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/Yassimba/loom/tree/main/skills/api-design
Command: npx skills add https://github.com/Yassimba/loom --skill api-design-yassimba

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing consistent REST APIs is error-prone: teams mix verbs into URLs, return 200 for every outcome, and invent ad-hoc pagination and error formats. This Skill gives an agent a complete, opinionated rulebook so endpoints follow uniform conventions from the start. ## Core Features & Use Cases - Resource and URL conventions: Plural kebab-case nouns, nested sub-resources, and correct HTTP method semantics with a full status code reference. - Response standards: Envelope formats for success, collection, and error responses, plus offset vs cursor pagination guidance and filtering/sorting syntax. - Cross-cutting concerns: Authentication and authorization patterns, rate limiting headers and tiers, and a URL-path versioning strategy with deprecation timelines. - Use Case: When adding a new endpoint to a Next.js, Django, or Go service, ask the agent to design it; it will produce a validated handler returning 201 with a Location header, structured 422 validation errors, and cursor pagination for list routes. ## Quick Start Use the api-design skill to design a paginated orders endpoint with proper status codes and error responses.

Frequently Asked Questions about api-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design REST API endpoints with correct naming conventions?

Use plural, lowercase, kebab-case nouns for resources such as /api/v1/team-members, and nest sub-resources for ownership like /api/v1/users/:id/orders. Avoid verbs in URLs; reserve them only for non-CRUD actions like /api/v1/orders/:id/cancel.

Which HTTP status codes should a REST API return?

Return 200 for successful reads, 201 with a Location header for creations, and 204 for deletions. Use 400 or 422 for validation failures, 401/403 for auth issues, 404 for missing resources, 409 for conflicts, and 429 for rate limiting instead of returning 200 for everything.

Should I use offset or cursor pagination for my API?

Use offset pagination for admin dashboards, small datasets, and search results where users expect page numbers. Use cursor pagination for infinite scroll, feeds, and large datasets because it performs consistently regardless of position and stays stable with concurrent inserts.

How do I version a REST API without breaking clients?

Start with URL path versioning like /api/v1/ and maintain at most two active versions. Non-breaking changes such as adding fields or optional parameters need no new version; removing fields or changing types does. Announce deprecations with a Sunset header and return 410 Gone after the sunset date.

What should a REST API error response look like?

Return a JSON object with an error key containing a machine-readable code, a human-readable message, and a details array of field-level errors with field, message, and code. Pair it with the correct HTTP status such as 422 for validation failures.