api-design

Guide API designers in selecting REST, GraphQL, or gRPC protocols.

Updated May 23, 2024
One-click install
npx skills add https://github.com/thependalorian/porfolio --skill api-design-thependalorian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/thependalorian/porfolio/tree/main/.claude/skills/api-design
Command: npx skills add https://github.com/thependalorian/porfolio --skill api-design-thependalorian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Designing modern APIs involves choosing the right protocol (REST, GraphQL, gRPC), ensuring security, scalability, and maintainability across services.

Core Features & Use Cases

  • Guidance on protocol selection among REST, GraphQL, and gRPC based on workload and team capabilities.
  • API security best practices including authentication, authorization, input validation, rate limiting, and threat modeling.
  • Versioning, documentation, and testing patterns to keep APIs stable and evolvable.

Quick Start

Design a simple REST API for a product catalog with authentication and versioning.

Frequently Asked Questions about api-design

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

FAQPage Schema
How do I choose between REST, GraphQL, and gRPC for my API design?

Choosing between REST, GraphQL, and gRPC for API design depends on your specific workload requirements and team capabilities. REST suits standard web services, GraphQL optimizes nested data fetching, and gRPC excels in high-performance internal microservices communication.

What are the best practices for API security and authentication?

API security best practices involve implementing robust authentication, authorization, input validation, and rate limiting. Effective API security also requires threat modeling to protect endpoints from malicious traffic and ensure only authenticated clients access protected resources.

How do I implement API versioning to keep web services evolvable?

API versioning keeps web services evolvable by managing endpoint changes without breaking existing clients. Implementing API versioning involves applying standardized patterns that allow simultaneous support of multiple API iterations during gradual migrations.

Does this API design guidance work for both public and internal APIs?

Yes, this API design guidance applies to designing both new public and internal APIs. It enforces design fundamentals and security policies across diverse web services, ensuring scalable and maintainable interfaces regardless of exposure level.

When should I use WebSocket instead of HTTP for my API endpoints?

You should evaluate WebSocket instead of HTTP for API endpoints when designing real-time, bidirectional communication interfaces. Considering HTTP versus WebSocket involves weighing connection persistence and latency requirements against standard request-response cycles for your web service.

What should I include in API documentation and testing patterns?

API documentation and testing patterns should include clear endpoint definitions, security policies, and versioning strategies. Comprehensive API documentation ensures stable, evolvable interfaces by guiding consumers on correct implementation and validating expected behavior.