api-design-principles

Guide REST and GraphQL API design with versioning and error handling.

27|10|Updated Dec 27, 2025
One-click install
npx skills add https://github.com/nilecui/SkillsBase --skill api-design-principles-nilecui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/nilecui/SkillsBase/tree/main/.cursor/skills/api-design-principles
Command: npx skills add https://github.com/nilecui/SkillsBase --skill api-design-principles-nilecui

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers create well-structured, maintainable, and developer-friendly APIs, avoiding common pitfalls and ensuring a positive developer experience.

Core Features & Use Cases

  • RESTful Design: Guides on resource-oriented architecture, HTTP method semantics, and best practices for endpoints.
  • GraphQL Design: Principles for schema design, query structure, and efficient data fetching.
  • API Versioning: Strategies for managing API evolution without breaking clients.
  • Error Handling: Patterns for consistent and informative error responses.
  • Use Case: When designing a new e-commerce API, use this Skill to ensure your product and order endpoints are RESTful, your GraphQL schema is well-organized, and your error handling is consistent across all operations.

Quick Start

Use the api-design-principles skill to design a RESTful endpoint for retrieving user profiles.

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 with proper resource orientation and HTTP method semantics?

REST API design requires structuring endpoints around resources and using HTTP methods semantically. This skill guides resource-oriented architecture and endpoint best practices to ensure intuitive, scalable interfaces.

What is the best way to prevent the N+1 problem in GraphQL schema design?

Preventing the N+1 problem in GraphQL requires efficient data fetching principles and well-structured schemas. This skill provides guidance on query structure and schema-first development to optimize data retrieval.

How do I manage API versioning to avoid breaking existing clients?

API versioning prevents breaking changes by managing API evolution systematically. This skill outlines strategies for versioning REST and GraphQL APIs to maintain backward compatibility while introducing updates.

What patterns should I use for consistent API error handling?

Consistent API error handling uses standardized response patterns for informative feedback. This skill addresses common error handling challenges to ensure reliable and developer-friendly API responses.

When should I choose GraphQL over REST for backend development?

Choosing GraphQL or REST depends on your data fetching needs and schema complexity. This skill compares RESTful resource orientation with GraphQL schema-first development to guide your backend architecture decisions.