api-design

Design RESTful and GraphQL APIs with resource modeling and error handling patterns.

1|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/hyukudan/ai-skills --skill api-design-hyukudan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/hyukudan/ai-skills/tree/main/examples/skills/api-design
Command: npx skills add https://github.com/hyukudan/ai-skills --skill api-design-hyukudan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance on designing, implementing, and versioning APIs, ensuring consistency, predictability, and maintainability.

Core Features & Use Cases

  • RESTful Principles: Covers resource modeling, HTTP semantics, and URL anti-patterns.
  • Response Design: Details consistent envelope structures and HTTP status codes.
  • Authentication: Explains JWT, OAuth2, and API Key strategies.
  • Versioning: Offers strategies for managing API evolution.
  • Error Handling: Defines clear error response structures and common codes.
  • Use Case: When designing a new microservice API, use this Skill to ensure adherence to best practices for resource naming, HTTP methods, and error reporting.

Quick Start

Consult the API design guide for best practices on resource-oriented URLs.

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 RESTful API with proper resource modeling and HTTP semantics?

Designing a RESTful API requires modeling resources logically, applying correct HTTP method semantics, and avoiding URL anti-patterns. Following these principles ensures your API endpoints remain predictable, scalable, and consistent across microservices.

What is the best way to handle API authentication using JWT or OAuth2?

API authentication strategies like JWT, OAuth2, and API Key provide secure access control. Choosing the right method depends on your security requirements, with OAuth2 handling complex delegated authorization flows and JWT managing stateless user sessions.

How do I structure consistent API response envelopes and HTTP status codes?

Consistent API response envelopes require a standardized JSON structure combined with appropriate HTTP status codes. This approach clearly communicates success or error states to clients, ensuring maintainability and predictable parsing across your service endpoints.

Does this guide cover both REST and GraphQL API design patterns?

Yes, the API design guidelines comprehensively cover both RESTful and GraphQL patterns. It details resource modeling for REST and schema definitions for GraphQL, ensuring you can apply consistent versioning, pagination, and error handling across either architectural style.

What are the recommended strategies for API versioning and error handling?

API versioning strategies manage evolution without breaking existing clients, while structured error handling defines clear response formats and standard error codes. Together, they ensure backward compatibility and provide developers with actionable debugging information.