api-design

Plan REST API endpoints with versioning, pagination, and error formats.

9|5|Updated Aug 8, 2025
One-click install
npx skills add https://github.com/AnExiledDev/CodeForge --skill api-design-anexileddev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/AnExiledDev/CodeForge/tree/main/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design
Command: npx skills add https://github.com/AnExiledDev/CodeForge --skill api-design-anexileddev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

API design is challenging: teams struggle with inconsistent endpoints, unclear versioning, ad-hoc error handling, and missing documentation.

Core Features & Use Cases

  • Resource naming & structure: clear nouns, plural collections, and explicit ownership relationships.
  • HTTP semantics & consistency: proper use of GET/POST/PUT/PATCH/DELETE with predictable status codes and error formats.
  • Versioning & pagination: recommended URL/path versioning and cursor-based pagination with sane defaults and backward compatibility.
  • Authentication & error handling patterns: standardized auth flows and RFC 7807-compliant error responses.
  • Documentation & governance: contract checklists, naming conventions, and testability guidance.

Quick Start

Design a RESTful API for a books service with versioning and cursor-based pagination.

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 APIs with consistent resource naming and HTTP method semantics?

Design REST APIs by using clear plural nouns for resource collections and applying proper GET, POST, PUT, PATCH, and DELETE semantics. This ensures predictable status codes, explicit ownership relationships, and structural consistency across your service endpoints.

What is the best way to handle REST API versioning and pagination?

The best way to handle REST API versioning and pagination is using URL path versioning and cursor-based pagination. This approach provides sane defaults and maintains backward compatibility while ensuring scalable data retrieval across services.

How do I structure REST API error handling and authentication flows?

Structure REST API error handling and authentication by implementing standardized auth flows and RFC 7807-compliant error responses. This standardizes security mechanisms and ensures consistent, predictable error formats for clients.

Can I use this approach to plan API documentation and governance for multiple services?

Yes, you can use this approach to plan API documentation and governance for multiple services. It provides contract checklists, naming conventions, and testability guidance to ensure endpoints remain well-documented and standardized across your architecture.

When should I use cursor-based pagination instead of other REST API pagination patterns?

Use cursor-based pagination when designing scalable REST APIs that require stable data retrieval across large datasets. It provides sane defaults and backward compatibility, preventing performance degradation common with offset-based pagination patterns.