File contents 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
references/api-style.md
REST vs GraphQL vs tRPC decision tree
Choosing API type
references/rest.md
Resource naming, HTTP methods, status codes
Designing REST API
references/response.md
Envelope pattern, error format, pagination
Response structure
references/graphql.md
Schema design, when to use, security
Considering GraphQL
references/trpc.md
TypeScript monorepo, type safety
TS fullstack projects
references/versioning.md
URI/Header/Query versioning
API evolution planning
references/auth.md
JWT, OAuth, Passkey, API Keys
Auth pattern selection
references/rate-limiting.md
Token bucket, sliding window
API protection
references/documentation.md
OpenAPI/Swagger best practices
Documentation
references/security-testing.md
OWASP API Top 10, auth/authz testing
Security audits
🚀 Quick Decision
Who are the API consumers?
│
├── Public API / Multiple platforms ────→ REST + OpenAPI
├── Complex data / Multiple frontends ──→ GraphQL
├── TypeScript monorepo ────────────────→ tRPC
├── Real-time / Event-driven ───────────→ WebSocket + AsyncAPI
└── Internal microservices ─────────────→ gRPC or REST
First question ALWAYS: ¿Quién va a consumir esta API?
🔗 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:
⚠️ Racionalizaciones Comunes
Excusa
Realidad
"Siempre usamos REST"
Evalúa consumidores primero - tRPC o GraphQL podrían ser mejores
"GraphQL es overkill"
Para apps con datos complejos, reduce overfetching significativamente
"No necesitamos versionado"
Los clientes romperán sin aviso cuando hagas breaking changes
"Rate limiting después"
Implementar desde día 1 es 10x más fácil que retrofitting
"Los errores ya se manejan"
Sin formato consistente, el frontend sufre
❌ Anti-Patterns
NUNCA:
Defaults a REST sin evaluar contexto
Verbos en endpoints REST (/getUsers → /users)
Formatos de respuesta inconsistentes
Exponer errores internos al cliente
Saltear rate limiting
SIEMPRE:
Elegir estilo API basado en consumidores
Preguntar requisitos del cliente
Documentar exhaustivamente
Usar status codes apropiados
Script
Script
Purpose
Command
scripts/api_validator.py
API endpoint validation
python scripts/api_validator.py <project_path>
1 --- 2 name: api-patterns-gonzoblasco 3 description: API Patterns 4 --- 5 6 # API Patterns 7 8 > API design principles and decision-making for 2025. 9 > **Learn to THINK, not copy fixed patterns.** 10 11 ## 🎯 Selective Reading Rule 12 13 **Read ONLY files relevant to the request!** Check the content map, find what you need. 14 15 --- 16 17 ## 📑 Content Map 18 19 | File | Description | When to Read | 20 | -------------------------------- | ------------------------------------------- | ---------------------- | 21 | `references/api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type | 22 | `references/rest.md` | Resource naming, HTTP methods, status codes | Designing REST API | 23 | `references/response.md` | Envelope pattern, error format, pagination | Response structure | 24 | `references/graphql.md` | Schema design, when to use, security | Considering GraphQL | 25 | `references/trpc.md` | TypeScript monorepo, type safety | TS fullstack projects | 26 | `references/versioning.md` | URI/Header/Query versioning | API evolution planning | 27 | `references/auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection | 28 | `references/rate-limiting.md` | Token bucket, sliding window | API protection | 29 | `references/documentation.md` | OpenAPI/Swagger best practices | Documentation | 30 | `references/security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits | 31 32 --- 33 34 ## 🚀 Quick Decision 35 36 ``` 37 Who are the API consumers? 38 │ 39 ├── Public API / Multiple platforms ────→ REST + OpenAPI 40 ├── Complex data / Multiple frontends ──→ GraphQL 41 ├── TypeScript monorepo ────────────────→ tRPC 42 ├── Real-time / Event-driven ───────────→ WebSocket + AsyncAPI 43 └── Internal microservices ─────────────→ gRPC or REST 44 ``` 45 46 > **First question ALWAYS:** ¿Quién va a consumir esta API? 47 48 --- 49 50 ## 🔗 Related Skills 51 52 | Need | Skill | 53 | ------------------ | ------------------------------- | 54 | API implementation | `@[skills/backend-development]` | 55 | Data structure | `@[skills/database-design]` | 56 | Security details | `@[skills/security-hardening]` | 57 58 --- 59 60 ## ✅ Decision Checklist 61 62 Before designing an API: 63 64 - [ ] **Asked user about API consumers?** 65 - [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC) 66 - [ ] **Defined consistent response format?** 67 - [ ] **Planned versioning strategy?** 68 - [ ] **Considered authentication needs?** 69 - [ ] **Planned rate limiting?** 70 - [ ] **Documentation approach defined?** 71 72 --- 73 74 ## ⚠️ Racionalizaciones Comunes 75 76 | Excusa | Realidad | 77 | --------------------------- | --------------------------------------------------------------------- | 78 | "Siempre usamos REST" | Evalúa consumidores primero - tRPC o GraphQL podrían ser mejores | 79 | "GraphQL es overkill" | Para apps con datos complejos, reduce overfetching significativamente | 80 | "No necesitamos versionado" | Los clientes romperán sin aviso cuando hagas breaking changes | 81 | "Rate limiting después" | Implementar desde día 1 es 10x más fácil que retrofitting | 82 | "Los errores ya se manejan" | Sin formato consistente, el frontend sufre | 83 84 --- 85 86 ## ❌ Anti-Patterns 87 88 **NUNCA:** 89 90 - Defaults a REST sin evaluar contexto 91 - Verbos en endpoints REST (`/getUsers` → `/users`) 92 - Formatos de respuesta inconsistentes 93 - Exponer errores internos al cliente 94 - Saltear rate limiting 95 96 **SIEMPRE:** 97 98 - Elegir estilo API basado en consumidores 99 - Preguntar requisitos del cliente 100 - Documentar exhaustivamente 101 - Usar status codes apropiados 102 103 --- 104 105 ## Script 106 107 | Script | Purpose | Command | 108 | -------------------------- | ----------------------- | ------------------------------------------------ | 109 | `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |
diegosouzapw/awesome-omni-skill/tree/main/skills/development/api-patterns-gonzoblasco commit 509697da98
Frequently asked questions How do I install the API Patterns Gonzoblasco skill? Run npx skillmds@latest add diegosouzapw/api-patterns-gonzoblasco 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.
What does the API Patterns Gonzoblasco skill do? API Patterns It is listed under Integrations & APIs on SkillMD.
Is API Patterns Gonzoblasco safe to use? 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.
Which AI agents work with API Patterns Gonzoblasco? 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.
Is API Patterns Gonzoblasco free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published API Patterns Gonzoblasco? diegosouzapw (@diegosouzapw) published this skill. Their other Agent Skills are listed on their SkillMD profile.