Skill

api-design

API design principles for REST, GraphQL, and gRPC

From f5-core
Install
1
Run in your terminal
$
npx claudepluginhub fujigo-software/f5-framework-claude --plugin f5-core
Tool Access

This skill is limited to using the following tools:

ReadWriteGlobGrepBash
Supporting Assets
View in Repository
best-practices/api-evolution.md
best-practices/api-guidelines.md
best-practices/backwards-compatibility.md
documentation/api-documentation.md
documentation/examples.md
documentation/openapi-swagger.md
graphql/graphql-basics.md
graphql/mutations.md
graphql/resolvers.md
graphql/schema-design.md
graphql/subscriptions.md
grpc/grpc-basics.md
grpc/protobuf.md
grpc/streaming.md
patterns/authentication.md
patterns/error-handling.md
patterns/idempotency.md
patterns/rate-limiting.md
patterns/request-response.md
references/documentation.md
Skill Content

API Design Skills

Overview

API design knowledge for building clean, consistent, and developer-friendly APIs. This domain covers REST, GraphQL, gRPC, documentation standards, and best practices.

API Types Comparison

┌─────────────────────────────────────────────────────────────────────────────┐
│                        API Types Comparison                                  │
├──────────────┬──────────────┬──────────────┬──────────────┬─────────────────┤
│ Aspect       │ REST         │ GraphQL      │ gRPC         │ Best For        │
├──────────────┼──────────────┼──────────────┼──────────────┼─────────────────┤
│ Protocol     │ HTTP/1.1     │ HTTP/1.1     │ HTTP/2       │                 │
│ Format       │ JSON/XML     │ JSON         │ Protobuf     │                 │
│ Schema       │ Optional     │ Required     │ Required     │                 │
│              │ (OpenAPI)    │ (SDL)        │ (.proto)     │                 │
│ Caching      │ HTTP native  │ Complex      │ Manual       │                 │
│ Real-time    │ Polling/SSE  │ Subscriptions│ Streaming    │                 │
│ Learning     │ Easy         │ Medium       │ Hard         │                 │
├──────────────┼──────────────┼──────────────┼──────────────┼─────────────────┤
│ Use Cases    │ Public APIs  │ Flexible     │ Microservices│                 │
│              │ CRUD apps    │ Mobile apps  │ Low latency  │                 │
│              │ Web services │ Aggregation  │ High perf    │                 │
└──────────────┴──────────────┴──────────────┴──────────────┴─────────────────┘

Categories

REST

  • REST principles and HATEOAS
  • Resource naming conventions
  • HTTP methods semantics
  • Status codes usage
  • Pagination strategies
  • Filtering and sorting
  • API versioning

GraphQL

  • Schema design
  • Queries and mutations
  • Resolvers
  • Subscriptions
  • N+1 problem solutions

gRPC

  • Protocol Buffers
  • Service definitions
  • Streaming patterns
  • Error handling

Documentation

  • OpenAPI/Swagger
  • API documentation best practices
  • Examples and SDKs

Patterns

  • Request/Response design
  • Error handling
  • Authentication patterns
  • Rate limiting
  • Idempotency

Best Practices

  • API design guidelines
  • Backwards compatibility
  • API evolution strategies

REST Maturity Model (Richardson)

┌─────────────────────────────────────────────────────────────────┐
│                   REST Maturity Model                            │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Level 3: Hypermedia Controls (HATEOAS)                         │
│           ├── Self-documenting APIs                              │
│           ├── Discoverability via links                          │
│           └── Decoupled client-server evolution                  │
│                        ↑                                         │
│  Level 2: HTTP Verbs + Status Codes                             │
│           ├── GET, POST, PUT, PATCH, DELETE                     │
│           ├── Proper status codes (200, 201, 404, etc.)         │
│           └── Safe and idempotent methods                        │
│                        ↑                                         │
│  Level 1: Resources                                              │
│           ├── Multiple URIs for different resources              │
│           ├── /users, /orders, /products                        │
│           └── Still using single HTTP verb                       │
│                        ↑                                         │
│  Level 0: The Swamp of POX                                      │
│           ├── Single URI for all operations                      │
│           ├── POST /api with action in body                     │
│           └── RPC-style over HTTP                                │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

API Design Decision Tree

┌─────────────────────────────────────────────────────────────────┐
│                 Which API Style to Choose?                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  Start Here                                                      │
│      │                                                           │
│      ▼                                                           │
│  Public API for third parties?                                  │
│      │                                                           │
│      ├── Yes → REST (with OpenAPI)                              │
│      │         • Easy to understand                              │
│      │         • Good tooling                                    │
│      │         • HTTP caching                                    │
│      │                                                           │
│      └── No → Internal/Microservices?                           │
│               │                                                  │
│               ├── Yes → Need real-time?                         │
│               │         │                                        │
│               │         ├── Yes → gRPC streaming                │
│               │         │                                        │
│               │         └── No → High performance?              │
│               │                  │                               │
│               │                  ├── Yes → gRPC                 │
│               │                  └── No → REST                  │
│               │                                                  │
│               └── No → Mobile/Web frontend?                     │
│                        │                                         │
│                        ├── Multiple clients? → GraphQL          │
│                        ├── Complex queries? → GraphQL           │
│                        └── Simple CRUD? → REST                  │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Quick Reference

HTTP Methods

MethodIdempotentSafeCacheableRequest Body
GETYesYesYesNo
POSTNoNoNoYes
PUTYesNoNoYes
PATCHNo*NoNoYes
DELETEYesNoNoOptional

Common Status Codes

CodeNameUsage
200OKSuccessful GET, PUT, PATCH
201CreatedSuccessful POST (resource created)
204No ContentSuccessful DELETE
400Bad RequestInvalid syntax, validation error
401UnauthorizedMissing/invalid authentication
403ForbiddenValid auth, no permission
404Not FoundResource doesn't exist
409ConflictResource conflict
422UnprocessableSemantic errors
429Too Many RequestsRate limited
500Internal ErrorServer error

Skills Index

REST

SkillDescription
rest-principlesCore REST constraints and design
resource-namingURI design and resource naming
http-methodsHTTP verb semantics
status-codesHTTP status code usage
paginationPagination strategies
filtering-sortingQuery parameters design
versioningAPI versioning approaches

GraphQL

SkillDescription
graphql-basicsGraphQL fundamentals
schema-designType system and schema
resolversResolver patterns
mutationsWrite operations
subscriptionsReal-time updates

gRPC

SkillDescription
grpc-basicsgRPC fundamentals
protobufProtocol Buffers
streamingStreaming patterns

Documentation

SkillDescription
openapi-swaggerOpenAPI specification
api-documentationDocumentation best practices
examplesCode examples and SDKs

Patterns

SkillDescription
request-responseRequest/response design
error-handlingError handling patterns
authenticationAuth patterns
rate-limitingRate limiting strategies
idempotencyIdempotent operations

Best Practices

SkillDescription
api-guidelinesGeneral API guidelines
backwards-compatibilityMaintaining compatibility
api-evolutionEvolving APIs over time
Stats
Parent Repo Stars17
Parent Repo Forks7
Last CommitFeb 4, 2026