api-design

Design REST API endpoints, responses, errors, and versioning for web services.

Updated May 15, 2021
One-click install
npx skills add https://github.com/JustinFirsching/dotfiles --skill api-design-justinfirsching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/JustinFirsching/dotfiles/tree/main/opencode/.config/opencode/skill/api-design
Command: npx skills add https://github.com/JustinFirsching/dotfiles --skill api-design-justinfirsching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

REST API design patterns and conventions provide a standardized approach to building scalable, consistent APIs across teams.

Core Features & Use Cases

  • Resource-oriented URL structures (nouns, not verbs; pluralized; hyphenated)
  • Consistent HTTP methods and status codes
  • Standardized request/response formats and error handling
  • Versioning in the URL path to manage breaking changes
  • Authentication, authorization, and rate limiting patterns

Quick Start

Provide a REST API design plan for a new service, outlining endpoints, versions, and error handling.

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 API endpoints with consistent URL structures?

Design REST API endpoints by enforcing resource-oriented URL structures that use pluralized nouns and hyphens rather than verbs. This ensures consistent HTTP methods and standardized request formats across web services.

What is the best way to handle errors and HTTP status codes in a REST API?

Handle REST API errors by enforcing consistent error formats alongside standard HTTP methods and status codes. Standardized error handling ensures scalable, consistent API behavior across development teams.

How do I manage breaking changes with versioning in the URL path?

Manage breaking changes by placing versioning in the URL path. This approach allows you to roll out new API versions while maintaining backward compatibility for existing web service consumers.

What authentication and rate limiting patterns should I use for my REST API?

Secure REST APIs using standardized authentication, authorization, and rate limiting patterns. These mechanisms provide consistent access control and protect web service endpoints across development teams.

REST API design patterns for planning a new web service

Apply REST API design patterns when planning a new web service to outline endpoints, versions, and error handling. This enforces resource-oriented URLs and standard HTTP methods for scalable architecture.

Why do I need health and test endpoints in my REST API?

Health and test endpoints provide standardized locations to monitor web service status. They are a core part of robust REST API design, ensuring consistent ways to verify service availability.