api-design-principles

Guide RESTful and GraphQL API design with resource-oriented architecture and schema-first development.

4|1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/GPTtang/skill-atlas --skill api-design-principles-gpttang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/GPTtang/skill-atlas/tree/main/skills/devops/api-design-principles
Command: npx skills add https://github.com/GPTtang/skill-atlas --skill api-design-principles-gpttang

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidance on designing robust and developer-friendly REST and GraphQL APIs, ensuring scalability, maintainability, and a positive developer experience.

Core Features & Use Cases

  • RESTful Principles: Covers resource-oriented design, HTTP method semantics, and versioning strategies.
  • GraphQL Principles: Details schema-first development, query structure, and mutation patterns.
  • Design Patterns: Includes practical examples for resource collection design, pagination, filtering, error handling, and HATEOAS for REST, and schema/resolver design with DataLoader for GraphQL.
  • Use Case: When designing a new microservice API, use this Skill to ensure adherence to best practices for both REST and GraphQL, leading to a well-structured and easily consumable API.

Quick Start

Consult the API Design Principles skill for guidance on designing a new REST API.

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 a scalable REST API?

Designing scalable REST APIs requires resource-oriented architecture, proper HTTP method semantics, and robust versioning strategies to ensure maintainability and a positive developer experience.

How do I prevent the N+1 problem in GraphQL?

To prevent the GraphQL N+1 problem, implement schema and resolver design patterns utilizing DataLoader for batching requests, ensuring efficient query execution and scalable API performance.

What is the best way to handle pagination and filtering in API design?

The best way to handle API pagination and filtering involves applying standardized design patterns for resource collections, ensuring efficient data retrieval and a consumable API interface.

REST vs GraphQL: how do I choose an architecture for my microservice?

Choosing between REST and GraphQL for microservices depends on your needs: REST offers resource-oriented design with HATEOAS, while GraphQL enables schema-first development with flexible query structures.

When should I use schema-first development for API design?

You should use schema-first development when designing GraphQL APIs to establish a clear contract early, ensuring structured query and mutation patterns before implementing resolvers.