api-design-principles

Guide RESTful and GraphQL API design with versioning and best practices.

2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/yashvinthan/DuskSpendr --skill api-design-principles-yashvinthan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design-principles
Source: https://github.com/yashvinthan/DuskSpendr/tree/main/.agents/skills/api-design-principles
Command: npx skills add https://github.com/yashvinthan/DuskSpendr --skill api-design-principles-yashvinthan

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenges of designing, reviewing, and standardizing API interfaces, ensuring they are intuitive, scalable, and maintainable for developers.

Core Features & Use Cases

  • RESTful Principles: Guides on resource-oriented design, HTTP method semantics, and common patterns like pagination and error handling.
  • GraphQL Principles: Covers schema design, resolver patterns, and N+1 problem prevention with DataLoaders.
  • Use Case: When starting a new microservice, use this Skill to ensure the API adheres to best practices for both REST and GraphQL, making it easier for other developers to integrate with.

Quick Start

Use the api-design-principles skill to review the proposed API specification for the new user management service.

Frequently Asked Questions about api-design-principles

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

FAQPage Schema
What are the key principles for designing a scalable RESTful API?

RESTful API design principles focus on resource-oriented modeling, correct HTTP method semantics, and standard patterns for pagination and error handling to ensure interfaces are intuitive and scalable. This guidance helps developers avoid common pitfalls and build maintainable services.

How do I prevent the N+1 query problem when designing a GraphQL API?

To prevent the N+1 problem in GraphQL API design, you should implement resolver patterns that utilize DataLoaders for batching requests. This approach optimizes data fetching by grouping multiple requests for the same resource into a single query.

What is the best way to standardize API versioning and error handling?

Standardizing API versioning and error handling involves applying consistent design patterns across your endpoints to maintain compatibility and provide clear feedback. Following established API principles ensures your interface remains intuitive and maintainable for developers.

Can I use these API design principles for both REST and GraphQL microservices?

Yes, these API design principles apply to both REST and GraphQL microservices, offering comprehensive guidance on schema design and resource modeling. This ensures your new microservices adhere to best practices for developer experience and integration.

How do I review an existing API specification for best practices?

You can review an API specification against established API principles by checking for resource-oriented design, proper HTTP semantics, and standard patterns like pagination. This process ensures the proposed interface is intuitive, scalable, and maintainable.