api-design-principles

Guide RESTful and GraphQL API design with patterns and checklists.

2|Updated Mar 15, 2025
One-click install
npx skills add https://github.com/dandudzi/dotfiles --skill api-design-principles-dandudzi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/dandudzi/dotfiles/tree/main/dot_claude/skills/api-design-principles
Command: npx skills add https://github.com/dandudzi/dotfiles --skill api-design-principles-dandudzi

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, building, and maintaining robust, scalable, and developer-friendly RESTful and GraphQL APIs.

Core Features & Use Cases

  • API Design Principles: Learn core concepts for both REST (resource-oriented, HTTP semantics) and GraphQL (schema-first, query structure).
  • Design Patterns: Implement practical patterns for resource collections, pagination, filtering, error handling, and more.
  • Best Practices & Checklists: Utilize detailed checklists for REST and GraphQL to ensure production-readiness, security, and maintainability.
  • Use Case: A team is starting a new microservice and needs to define its API contract. They can use this Skill to ensure they follow industry best practices for REST or GraphQL design, covering everything from URL structure to error handling and security.

Quick Start

Review the API design checklist for REST APIs to ensure all critical aspects are covered 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 core principles for designing RESTful and GraphQL APIs?

Core API design principles involve resource-oriented architecture and HTTP semantics for REST, alongside schema-first design and structured queries for GraphQL to ensure robust interfaces.

How do I implement pagination, filtering, and error handling in my API?

Implement API pagination, filtering, and error handling by applying established design patterns for resource collections, ensuring consistent data retrieval and clear error communication for developers.

What is the best way to establish API standards for a new microservice?

Establish API standards for a new microservice by defining its API contract using industry best practices, covering URL structure, security, versioning, and performance optimization checklists.

How do I ensure my REST API is production-ready before deployment?

Ensure your REST API is production-ready by reviewing a detailed design checklist that verifies critical aspects like HTTP semantics, security configurations, maintainability, and proper error handling.

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

Choose GraphQL over REST when you need a schema-first approach with flexible query structures, whereas REST suits resource-oriented architectures relying on standard HTTP semantics for operations.

Does this API design guidance cover security and performance optimization?

Yes, this API design guidance covers security and performance optimization, providing comprehensive best practices and checklists to maintain robust and scalable RESTful and GraphQL APIs.