API design principles and decision-making for 2025.
Learn to THINK, not copy fixed patterns.
🎯 Selective Reading Rule
Read ONLY files relevant to the request! Check the content map, find what you need.
📑 Content Map
File
Description
When to Read
api-style.md
REST vs GraphQL vs tRPC decision tree
Choosing API type
rest.md
Resource naming, HTTP methods, status codes
Designing REST API
response.md
Envelope pattern, error format, pagination
Response structure
graphql.md
Schema design, when to use, security
Considering GraphQL
trpc.md
TypeScript monorepo, type safety
TS fullstack projects
versioning.md
URI/Header/Query versioning
API evolution planning
auth.md
JWT, OAuth, Passkey, API Keys
Auth pattern selection
rate-limiting.md
Token bucket, sliding window
API protection
documentation.md
OpenAPI/Swagger best practices
Documentation
security-testing.md
OWASP API Top 10, auth/authz testing
Security audits
🔗 Related Skills
Need
Skill
API implementation
@[skills/backend-development]
Data structure
@[skills/database-design]
Security details
@[skills/security-hardening]
✅ Decision Checklist
Before designing an API:
Asked user about API consumers?
Chosen API style for THIS context? (REST/GraphQL/tRPC)
Defined consistent response format?
Planned versioning strategy?
Considered authentication needs?
Planned rate limiting?
Documentation approach defined?
❌ Anti-Patterns
DON'T:
Default to REST for everything
Use verbs in REST endpoints (/getUsers)
Return inconsistent response formats
Expose internal errors to clients
Skip rate limiting
DO:
Choose API style based on context
Ask about client requirements
Document thoroughly
Use appropriate status codes
Script
Script
Purpose
Command
scripts/api_validator.py
API endpoint validation
python scripts/api_validator.py <project_path>
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
1---2name: api-patterns3description: API Patterns4---5# API Patterns67> API design principles and decision-making for 2025.8> **Learn to THINK, not copy fixed patterns.**910## 🎯 Selective Reading Rule1112**Read ONLY files relevant to the request!** Check the content map, find what you need.1314---1516## 📑 Content Map1718| File | Description | When to Read |19|------|-------------|--------------|20| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |21| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |22| `response.md` | Envelope pattern, error format, pagination | Response structure |23| `graphql.md` | Schema design, when to use, security | Considering GraphQL |24| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |25| `versioning.md` | URI/Header/Query versioning | API evolution planning |26| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |27| `rate-limiting.md` | Token bucket, sliding window | API protection |28| `documentation.md` | OpenAPI/Swagger best practices | Documentation |29| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |3031---3233## 🔗 Related Skills3435| Need | Skill |36|------|-------|37| API implementation | `@[skills/backend-development]` |38| Data structure | `@[skills/database-design]` |39| Security details | `@[skills/security-hardening]` |4041---4243## ✅ Decision Checklist4445Before designing an API:4647- [ ] **Asked user about API consumers?**48- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)49- [ ] **Defined consistent response format?**50- [ ] **Planned versioning strategy?**51- [ ] **Considered authentication needs?**52- [ ] **Planned rate limiting?**53- [ ] **Documentation approach defined?**5455---5657## ❌ Anti-Patterns5859**DON'T:**60- Default to REST for everything61- Use verbs in REST endpoints (/getUsers)62- Return inconsistent response formats63- Expose internal errors to clients64- Skip rate limiting6566**DO:**67- Choose API style based on context68- Ask about client requirements69- Document thoroughly70- Use appropriate status codes7172---7374## Script7576| Script | Purpose | Command |77|--------|---------|---------|78| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |798081## When to Use82This skill is applicable to execute the workflow or actions described in the overview.
Run npx skillmds@latest add comeonoliver/api-patterns in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
API Patterns It is listed under Integrations & APIs on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ComeOnOliver (@comeonoliver) published this skill. Their other Agent Skills are listed on their SkillMD profile.