api-design

Designs REST API resources with conventions for naming, status codes, pagination, and error responses.

Updated May 7, 2026
One-click install
npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill api-design-mirzadham
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/mirzadham/trainingroombookingsystem2/tree/main/.agent/.agents/skills/api-design
Command: npx skills add https://github.com/mirzadham/trainingroombookingsystem2 --skill api-design-mirzadham

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Inconsistent API design leads to confusing endpoints, wrong HTTP status codes, and fragile integrations that frustrate developers consuming your API. This Skill provides a complete set of REST API design conventions so every endpoint follows predictable, production-grade patterns. ## Core Features & Use Cases - Resource and URL Conventions: Enforces plural, kebab-case, noun-based resource naming with correct HTTP method semantics and status code usage. - Pagination, Filtering, and Sorting: Covers offset and cursor pagination strategies, bracket-notation filtering, multi-field sorting, and sparse fieldsets. - Error Responses, Auth, Rate Limiting, and Versioning: Standard error envelope formats, Bearer token and API key patterns, rate limit headers and tiers, and URL path versioning with deprecation timelines. - Use Case: When adding a new orders endpoint to a Laravel or Next.js backend, use this Skill to define the URL structure, validation error format, cursor pagination, and 201 Created response with a Location header. ## Quick Start Use the api-design skill to design a paginated REST endpoint for managing orders 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 proper naming conventions?▼

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

What HTTP status codes should a REST API return?▼

Return 200 for successful reads, 201 with a Location header for creations, 204 for deletions, 400 or 422 for validation failures, 404 for missing resources, 409 for conflicts, and 429 for rate limiting. Never return 200 with an error payload.

Should I use cursor or offset pagination for my API?▼

Use cursor pagination for large datasets, infinite scroll, and public APIs since performance stays consistent regardless of position. Use offset pagination for admin dashboards and search results where users expect page numbers.

How do I format REST API error responses?▼

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

When should I version my REST API?▼

Start with /api/v1/ and only create a new version for breaking changes like removing fields, changing types, or altering authentication. Adding fields, optional parameters, or new endpoints does not require a new version.