api-design-principles

Guide REST and GraphQL API design with patterns and best practices.

1|Updated Feb 19, 2026
One-click install
npx skills add https://github.com/yusufcmg/Antigravity-Agents-Workflows --skill api-design-principles-yusufcmg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/yusufcmg/Antigravity-Agents-Workflows/tree/main/.agent/skills/backend/api-design-principles
Command: npx skills add https://github.com/yusufcmg/Antigravity-Agents-Workflows --skill api-design-principles-yusufcmg

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides comprehensive guidance and best practices for designing robust, developer-friendly REST and GraphQL APIs, ensuring maintainability and scalability.

Core Features & Use Cases

  • RESTful Design: Learn resource-oriented architecture, HTTP method semantics, and common patterns like pagination and error handling.
  • GraphQL Design: Understand schema design, resolver patterns, and techniques like DataLoader for efficient data fetching.
  • Use Case: When designing a new microservice API, use this Skill to ensure adherence to industry best practices for both REST and GraphQL, leading to a more consistent and maintainable developer experience.

Quick Start

Review the API design checklist to ensure all best practices are met before implementation.

Frequently Asked Questions about api-design-principles

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

FAQPage Schema
What are the best practices for REST API resource-oriented architecture?

REST API design best practices involve structuring endpoints around resources, using standard HTTP methods for semantics, and implementing consistent pagination, filtering, and error handling to ensure maintainability and scalability.

How do I design a scalable GraphQL schema and resolver patterns?

Design a scalable GraphQL schema by defining clear type definitions and using efficient resolver patterns. Implementing DataLoader for batching and caching data fetches optimizes performance and prevents the N+1 query problem.

What is the best way to handle API versioning and pagination strategies?

The best way to handle API versioning and pagination is to apply standardized strategies that maintain backward compatibility. This ensures consistent developer experience and scalable data fetching as your microservice architecture evolves.

Should I choose REST or GraphQL for my new microservice API design?

Choosing between REST and GraphQL for microservice API design depends on your data fetching needs. REST provides stateless resource-oriented architecture, while GraphQL offers flexible schema design and efficient data retrieval via resolvers.

How do I handle error handling and developer experience in API design?

Handle error handling in API design by using standard HTTP status codes for REST and structured error payloads for GraphQL. Consistent error formatting improves developer experience and simplifies client-side debugging.