API Patterns
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:
❌ 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.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Source: sickn33/agentic-awesome-skills → skills/api-patterns/SKILL.md
Also appears in: sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/api-patterns/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/api-patterns/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-bundle-full-stack-developer/skills/api-patterns/SKILL.md, sickn33/agentic-awesome-skills/plugins/agentic-bundle-aas-api-platform-builder/skills/api-patterns/SKILL.md
1---
2name: api-patterns
3description: "API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination."
4category: backend-and-data
5source_repo: sickn33/agentic-awesome-skills
6source_path: "skills/api-patterns/SKILL.md"
7source_url: https://github.com/sickn33/agentic-awesome-skills/blob/HEAD/skills/api-patterns/SKILL.md
8metadata:
9 source: https://skillmd.com/skills/thedixitjain/api-patterns
10---
11
12
13# API Patterns
14
15> API design principles and decision-making for 2025.
16> **Learn to THINK, not copy fixed patterns.**
17
18## 🎯 Selective Reading Rule
19
20**Read ONLY files relevant to the request!** Check the content map, find what you need.
21
22---
23
24## 📑 Content Map
25
26| File | Description | When to Read |
27|------|-------------|--------------|
28| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |
29| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |
30| `response.md` | Envelope pattern, error format, pagination | Response structure |
31| `graphql.md` | Schema design, when to use, security | Considering GraphQL |
32| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |
33| `versioning.md` | URI/Header/Query versioning | API evolution planning |
34| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |
35| `rate-limiting.md` | Token bucket, sliding window | API protection |
36| `documentation.md` | OpenAPI/Swagger best practices | Documentation |
37| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |
38
39---
40
41## 🔗 Related Skills
42
43| Need | Skill |
44|------|-------|
45| API implementation | `@[skills/backend-development]` |
46| Data structure | `@[skills/database-design]` |
47| Security details | `@[skills/security-hardening]` |
48
49---
50
51## ✅ Decision Checklist
52
53Before designing an API:
54
55- [ ] **Asked user about API consumers?**
56- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)
57- [ ] **Defined consistent response format?**
58- [ ] **Planned versioning strategy?**
59- [ ] **Considered authentication needs?**
60- [ ] **Planned rate limiting?**
61- [ ] **Documentation approach defined?**
62
63---
64
65## ❌ Anti-Patterns
66
67**DON'T:**
68- Default to REST for everything
69- Use verbs in REST endpoints (/getUsers)
70- Return inconsistent response formats
71- Expose internal errors to clients
72- Skip rate limiting
73
74**DO:**
75- Choose API style based on context
76- Ask about client requirements
77- Document thoroughly
78- Use appropriate status codes
79
80---
81
82## Script
83
84| Script | Purpose | Command |
85|--------|---------|---------|
86| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |
87
88## When to Use
89This skill is applicable to execute the workflow or actions described in the overview.
90
91## Limitations
92- Use this skill only when the task clearly matches the scope described above.
93- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
94- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
95
96---
97
98**Source:** [`sickn33/agentic-awesome-skills`](https://github.com/sickn33/agentic-awesome-skills) → `skills/api-patterns/SKILL.md`
99
100**Also appears in:** `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills/skills/api-patterns/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-awesome-skills-claude/skills/api-patterns/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-bundle-full-stack-developer/skills/api-patterns/SKILL.md`, `sickn33/agentic-awesome-skills/plugins/agentic-bundle-aas-api-platform-builder/skills/api-patterns/SKILL.md`