api-design

Guide REST and GraphQL API design with resource modeling and versioning.

20|1|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/krzysztofsurdy/code-virtuoso --skill api-design-krzysztofsurdy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/krzysztofsurdy/code-virtuoso/tree/main/skills/knowledge/api-design
Command: npx skills add https://github.com/krzysztofsurdy/code-virtuoso --skill api-design-krzysztofsurdy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance on designing APIs that are consistent, predictable, and easy to evolve, addressing challenges in choosing between REST and GraphQL, defining error contracts, and implementing versioning.

Core Features & Use Cases

  • API Strategy: Helps choose between REST and GraphQL based on project needs.
  • Design Principles: Covers REST resource modeling, HTTP methods, and GraphQL schema design.
  • Error Handling & Versioning: Establishes consistent error formats and effective versioning strategies.
  • Use Case: A team is starting a new microservices project and needs to decide on the best API approach. This Skill guides them through the trade-offs of REST vs. GraphQL and provides best practices for designing their endpoints, error responses, and versioning strategy.

Quick Start

Use the api-design skill to compare REST and GraphQL for a new project.

Frequently Asked Questions about api-design

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

FAQPage Schema
What's the best way to choose between REST and GraphQL for a new API?

Choosing between REST and GraphQL depends on your project needs like data fetching patterns and client flexibility. This API strategy guidance evaluates trade-offs in resource modeling and schema design to help you select the right approach for scalable microservices.

How do I design consistent error handling for REST and GraphQL APIs?

Designing consistent error handling requires establishing a standardized error contract across your services. This Skill provides patterns for creating predictable error formats and HTTP semantic responses, ensuring robust API design and clear client communication during failures.

What are the best practices for API versioning and pagination?

API versioning and pagination best practices focus on evolvability and predictable data retrieval. This Skill covers effective versioning strategies to manage breaking changes and pagination patterns to handle large datasets without compromising API consistency.

How do I model resources and use HTTP methods correctly in API design?

Modeling resources and using HTTP methods correctly involves applying standard semantics to ensure predictable interactions. This Skill outlines REST resource modeling principles and proper HTTP method usage to build user-friendly and scalable endpoints.

Can I use this API design guidance to review existing APIs and establish team standards?

Yes, you can use this API design guidance to review existing APIs and establish team standards. The principles covering consistency, predictability, and evolvability are applicable to both new API development and auditing current endpoints for compliance.