api-design-principles

Guide REST and GraphQL API design with schema, versioning, and error handling principles.

4|2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/3commas-io/commas-claude --skill api-design-principles-3commas-io
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/3commas-io/commas-claude/tree/main/skills/api-design-principles
Command: npx skills add https://github.com/3commas-io/commas-claude --skill api-design-principles-3commas-io

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers design, review, and standardize intuitive, scalable, and maintainable REST and GraphQL APIs, reducing common pitfalls and improving developer experience.

Core Features & Use Cases

  • RESTful Principles: Covers resource-oriented design, HTTP method semantics, pagination, filtering, and error handling.
  • GraphQL Principles: Explains schema design, resolver patterns, and N+1 problem prevention with DataLoaders.
  • Best Practices & Pitfalls: Offers guidance on versioning, statelessness, rate limiting, and common mistakes.
  • Use Case: When starting a new microservice with a public API, use this Skill to ensure the design adheres to best practices for both REST and GraphQL, making it easier for consumers to understand and integrate with.

Quick Start

Review the core concepts for designing RESTful APIs.

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 robust REST and GraphQL APIs?

Core principles for designing REST and GraphQL APIs include resource-oriented architecture, proper HTTP method semantics, schema design, and standardizing error handling to ensure scalability and maintainability.

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

Prevent the GraphQL N+1 query problem by implementing resolver patterns with DataLoaders, which batch and cache database requests to optimize performance during schema design.

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

The best way to handle API versioning and pagination involves applying resource-oriented design principles, standardizing filtering methods, and maintaining statelessness to improve developer experience.

When should I choose REST over GraphQL for my software architecture?

Choose REST for resource-oriented architecture and standard HTTP semantics, while GraphQL suits complex schema design requiring flexible data fetching, though both require careful rate limiting and error handling.

What are common pitfalls when building scalable public APIs?

Common pitfalls when building scalable public APIs include ignoring rate limiting, poor error handling, inadequate versioning strategies, and neglecting developer experience during schema design.