api-design-principles

Guide RESTful and GraphQL API design with versioning and error handling.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps developers master the principles of designing robust, user-friendly REST and GraphQL APIs, ensuring better developer experience and maintainability.

Core Features & Use Cases

  • RESTful Design: Understand resource-oriented architecture, HTTP method semantics, and common patterns like pagination and error handling.
  • GraphQL Design: Learn schema-first development, query/mutation structures, and efficient data fetching with DataLoaders.
  • Use Case: When starting a new microservice, use this Skill to ensure your API adheres to best practices for discoverability, consistency, and ease of integration by other developers.

Quick Start

Review the REST API design patterns for creating resource collections.

Frequently Asked Questions about api-design-principles

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

FAQPage Schema
What are the core principles for designing RESTful APIs?

Designing RESTful APIs centers on resource-oriented architecture, proper HTTP method semantics, and standard patterns for pagination and error handling to ensure scalability.

How do I structure a GraphQL schema for better developer experience?

Structuring a GraphQL schema requires schema-first development, defining efficient query and mutation structures, and utilizing DataLoaders for optimized data fetching.

What is the best way to handle API versioning and errors?

The best way to handle API versioning and errors involves applying consistent versioning strategies and standardized error handling patterns across both REST and GraphQL endpoints.

Can I use these API design patterns for existing microservices?

Yes, these API design patterns address usability and maintainability challenges, providing guidance to refine and align both new and existing microservice APIs with best practices.

When should I choose GraphQL over REST for my API?

Choose GraphQL over REST when you need schema-first development and efficient data fetching, whereas REST suits resource-oriented architecture with standard HTTP semantics.

Why does API usability matter for microservice integration?

API usability matters because intuitive, scalable APIs ensure discoverability and consistency, allowing other developers to easily integrate with your microservices without friction.