api-design-principles

Apply REST and GraphQL design principles to resolve API inconsistencies.

Updated Oct 26, 2025
One-click install
npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill api-design-principles-hieubkav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/Hieubkav/wincellarCloneBackend/tree/main/.claude/skills/api-design-principles
Command: npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill api-design-principles-hieubkav

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Developers often struggle with designing APIs that are consistent, scalable, and easy to use, leading to maintenance headaches and poor developer experience. This skill provides a structured approach to master both REST and GraphQL design, ensuring your APIs are robust and future-proof.

Core Features & Use Cases

  • RESTful & GraphQL Mastery: Learn core principles, patterns (pagination, error handling, HATEOAS, schema design, resolvers), and best practices for both paradigms.
  • API Versioning: Implement effective strategies to manage breaking changes and evolve your API gracefully.
  • Use Case: When starting a new microservice, use this skill to define its API contract, ensuring it follows best practices for resource modeling, error handling, and versioning from day one.

Quick Start

Design a REST API for a new e-commerce product catalog, including endpoints for products, categories, and reviews, ensuring proper HTTP method semantics and error handling.

Frequently Asked Questions about api-design-principles

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

FAQPage Schema
How do I design a REST API that follows HTTP semantics and best practices?

REST API design uses resource-oriented modeling with proper HTTP methods, status codes, and consistent naming conventions. This skill teaches core principles like correct verb semantics, stateless interactions, and HATEOAS patterns to ensure your endpoints are intuitive and maintainable across platforms.

What's the best way to handle API versioning when making breaking changes?

API versioning strategies manage breaking changes while maintaining backward compatibility. This skill covers approaches like URL versioning, header-based versioning, and deprecation policies so you can evolve your API gracefully without disrupting existing clients.

How do I structure pagination and filtering in my API?

Pagination and filtering patterns let clients retrieve large datasets efficiently. This skill provides proven designs for limit/offset and cursor-based pagination, filter syntax, and query parameter conventions that scale across REST and GraphQL implementations.

When should I use GraphQL instead of REST for my API design?

GraphQL and REST serve different needs: GraphQL excels at flexible client queries and reduces over-fetching, while REST is simpler for resource-centric APIs. This skill teaches both paradigms, their schema design patterns, and resolvers so you choose the right fit for your use case.

How do I implement consistent error handling across my API?

Consistent error handling improves developer experience through predictable response formats, meaningful error codes, and clear messages. This skill covers error response structures, HTTP status code selection, and documentation practices for both REST and GraphQL.

What security practices should I include in my API design?

API security encompasses authentication, authorization, rate limiting, input validation, and HTTPS enforcement. This skill integrates security into the design phase, ensuring your resource models, endpoints, and documentation include security requirements from the start.