API Design

Design RESTful APIs with OpenAPI documentation, versioning, pagination, and error codes.

4|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/OpenLabor/openlabor --skill api-design-openlabor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: API Design
Source: https://github.com/OpenLabor/openlabor/tree/main/skills_archive/api-design
Command: npx skills add https://github.com/OpenLabor/openlabor --skill api-design-openlabor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

APIs often suffer from inconsistent contracts, ambiguous interfaces, and missing documentation, causing integration delays and costly rewrites.

Core Features & Use Cases

  • RESTful conventions and GraphQL schema best practices for consistent interfaces
  • Version APIs from day one (e.g., v1/) and support pagination for lists
  • OpenAPI / Swagger documentation to publish machine-readable API contracts
  • Clear security guidelines: authentication, input validation, and robust error handling

Quick Start

Describe a sample API design and generate its OpenAPI spec for a resource

Frequently Asked Questions about API Design

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

FAQPage Schema
How do I generate an OpenAPI spec for a REST API?

To generate an OpenAPI spec for a REST API, define your RESTful conventions, resources, and security guidelines like authentication. This process creates a machine-readable API contract that ensures consistent interfaces and prevents integration delays.

What is the best way to version REST APIs and handle pagination?

The best way to version REST APIs is implementing versioning from day one using URI paths like v1/. For pagination, apply standard conventions to list endpoints to manage large data sets and ensure robust API contracts.

How do I design API security for input validation and rate limiting?

Design API security by enforcing authentication protocols, strict input validation, and rate limiting. Clear security guidelines and robust error handling protect services and microservices from ambiguous interfaces and bad traffic.

Why does my API documentation have inconsistent contracts and missing error codes?

API documentation has inconsistent contracts and missing error codes when OpenAPI/Swagger specs are not enforced. Publishing machine-readable API contracts with clear error handling and defined RESTful conventions prevents integration delays and costly rewrites.

Can I use this for GraphQL schema design or is it only for REST?

Yes, you can use it for GraphQL schema design alongside REST. The scope includes GraphQL schema best practices for consistent interfaces, while also covering RESTful conventions, versioning, and OpenAPI documentation.

What do I need to start designing microservices API contracts?

To start designing microservices API contracts, you need to define RESTful conventions, version APIs from day one, and establish error codes. Generating an OpenAPI spec for a sample resource provides the required machine-readable documentation.