api-design

Standardize REST API endpoints with consistent URL structures and HTTP methods.

13|Updated Mar 15, 2019
One-click install
npx skills add https://github.com/WTFox/dotfiles --skill api-design-wtfox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/WTFox/dotfiles/tree/main/claude/.claude/skills/api-design
Command: npx skills add https://github.com/WTFox/dotfiles --skill api-design-wtfox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

API design tasks include ensuring endpoints follow consistent conventions, choosing HTTP methods, statuses, schemas, and URL structures to create predictable, consumable APIs. The guide helps teams maintain uniform API behavior across projects and reduce integration friction.

Core Features & Use Cases

  • Naming and structuring endpoints for resources, not actions
  • Selecting appropriate HTTP methods and status codes
  • Defining consistent request/response schemas and pagination
  • Reviewing an existing endpoint for RESTful consistency across an API

Quick Start

Define a new endpoint by mapping a resource to a URL, choosing an HTTP method, and outlining the response shape for consistency.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I design consistent REST API endpoints for resources?

Designing consistent REST API endpoints involves mapping resources to clear URL structures, selecting appropriate HTTP methods, and defining explicit pagination with semantic request and response shapes. This ensures predictable, consumable APIs across teams.

What HTTP methods and status codes should I use for REST API operations?

Selecting appropriate HTTP methods and status codes for REST API operations requires matching actions like creating, listing, retrieving, updating, and deleting resources to their standard semantic equivalents. This enforces uniform behavior and clear error handling.

How do I structure URLs and pagination for a RESTful API?

Structuring URLs and pagination for a RESTful API means using resource-based URLs rather than action-based endpoints, combined with explicit pagination rules. This standardizes request and response schemas to reduce integration friction.

How do I review an existing API endpoint for RESTful consistency?

Reviewing an existing API endpoint for RESTful consistency involves checking its URL structure, HTTP methods, status codes, and error handling against standard rules. This ensures uniform behavior across all endpoints in your project.

What is the best way to define error handling and response schemas in an API?

Defining error handling and response schemas in an API requires establishing clear rules for semantic request and response shapes alongside appropriate status codes. This standardization creates predictable API consumption and reduces integration friction.