api-design

Design REST and GraphQL APIs with OpenAPI specifications and pagination strategies.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/jacexh/skills --skill api-design-jacexh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/jacexh/skills/tree/main/skills/api-design
Command: npx skills add https://github.com/jacexh/skills --skill api-design-jacexh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear, consistent patterns for defining REST and GraphQL endpoints, pagination, filtering, versioning, authentication, error handling, and API documentation so teams can build interoperable, maintainable backend services.

Core Features & Use Cases

  • Endpoint & Resource Conventions: Guidance on resource naming, nested resources, and when to use RPC-style actions.
  • Pagination & Filtering Strategies: Offset and cursor pagination patterns with response shapes and pagination metadata recommendations.
  • Versioning & Documentation: Recommendations for URL and header versioning and examples for OpenAPI/Swagger schemas.
  • Error Handling & Best Practices: Standardized error formats, HTTP status code usage, idempotency, rate limiting, and HATEOAS link inclusion.
  • Use Case: Designing user, order, or product APIs that require consistent responses, pagination, and OpenAPI documentation for client generation.

Quick Start

Design an API for a user management service with REST endpoints for CRUD, cursor pagination for lists, query filtering, bearer authentication, and an OpenAPI spec documenting each route.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design a REST API with pagination and filtering for a backend service?

To design a REST API with pagination, apply offset or cursor pagination patterns to return standardized response shapes with pagination metadata, and implement query filtering for nested resources to ensure scalable backend services.

What is the best way to handle API versioning and documentation with OpenAPI?

API versioning and documentation with OpenAPI are best handled by implementing URL or header versioning strategies, generating Swagger schemas for your endpoints, and documenting standardized error formats and HTTP status codes for client generation.

How does cursor pagination work for REST and GraphQL APIs?

Cursor pagination for REST and GraphQL APIs works by using a cursor pointer to fetch the next data set instead of an offset, returning pagination metadata in the response to maintain consistent performance across large lists.

Can I use GraphQL and REST together in the same backend service architecture?

You can use GraphQL and REST together in the same backend service by defining clear endpoint conventions for REST resources and GraphQL queries, applying consistent authentication and error handling formats across both API types.

What should be included in standardized API error handling and HTTP status codes?

Standardized API error handling should include consistent error formats, appropriate HTTP status codes, idempotency guidance for repeated requests, rate limiting headers, and HATEOAS links to guide client interactions.

When do I need to define idempotency and authentication for my API endpoints?

You need to define idempotency and authentication for API endpoints when building services requiring secure, consistent responses, such as user management systems utilizing bearer authentication and protecting against duplicate request execution.