api-design

Guide RESTful API design covering naming, status codes, pagination, and OpenAPI documentation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/RedBeret/agent-skill-catalog --skill api-design-redberet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/RedBeret/agent-skill-catalog/tree/main/skills/api-design
Command: npx skills add https://github.com/RedBeret/agent-skill-catalog --skill api-design-redberet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and best practices for designing RESTful APIs, ensuring consistency, usability, and maintainability.

Core Features & Use Cases

  • Resource Naming Conventions: Learn how to name resources effectively using plural nouns and proper nesting.
  • HTTP Status Codes: Understand the appropriate use of HTTP status codes for clear communication of API responses.
  • Error Handling: Implement a consistent and informative error response format.
  • Pagination Strategies: Choose between offset-based and cursor-based pagination for efficient data retrieval.
  • Versioning: Implement API versioning using URL paths for clarity.
  • Authentication Patterns: Explore common authentication methods like API keys and Bearer tokens.
  • Request Validation: Ensure data integrity with robust input validation.
  • Rate Limiting: Implement rate limiting to manage API usage and prevent abuse.
  • OpenAPI Documentation: Understand the importance of documenting APIs using OpenAPI/Swagger specifications.
  • Use Case: When designing a new set of endpoints for a user management system, use this Skill to ensure all resources are named correctly (e.g., /users), appropriate HTTP methods are used (GET, POST, PUT, DELETE), and error responses are standardized.

Quick Start

Follow the API design guidelines to create a new set of RESTful endpoints for managing user data.

Frequently Asked Questions about api-design

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

FAQPage Schema
What are the best practices for REST API resource naming and HTTP methods?

REST API resource naming best practices involve using plural nouns for endpoints, such as `/users`, and applying standard HTTP methods like GET, POST, PUT, and DELETE for clear, predictable interactions.

How do I design a consistent error response format for HTTP APIs?

Designing a consistent HTTP API error response format requires standardizing the payload structure and utilizing appropriate HTTP status codes to clearly communicate client and server errors.

When should I use cursor-based pagination versus offset-based pagination in REST APIs?

Cursor-based pagination is ideal for large, frequently changing REST API datasets to prevent data skipping, while offset-based pagination is simpler to implement for static data retrieval.

How do I implement API versioning and authentication for RESTful endpoints?

Implement REST API versioning using URL paths for explicit clarity, and secure endpoints with common authentication patterns like API keys or Bearer tokens to manage access.

Does OpenAPI documentation work with rate limiting and request validation?

OpenAPI documentation defines standard REST API contracts, but rate limiting and request validation are separate mechanisms implemented to manage API usage and ensure data integrity respectively.