Skip to content
Back to skills

Api Patterns Gonzoblasco

ASecurity

Use cuando diseñes APIs, elijas entre REST/GraphQL/tRPC, definas formatos de respuesta, planifiques versionado, o implementes rate limiting. Keywords: API design, REST, GraphQL, tRPC, OpenAPI, versioning, pagination, rate limiting, authentication, status codes.

  • 57 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 31, 2026
developmenttypescriptpythontestingapidatabasefrontendbackendfullstacksecuritydocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Scanned May 31, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill api-patterns-gonzoblasco --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Patterns Gonzoblasco?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Patterns Gonzoblasco
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-api-patterns-gonzoblasco/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-api-patterns-gonzoblasco)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-patterns
description: Use cuando diseñes APIs, elijas entre REST/GraphQL/tRPC, definas formatos de respuesta, planifiques versionado, o implementes rate limiting. Keywords: API design, REST, GraphQL, tRPC, OpenAPI, versioning, pagination, rate limiting, authentication, status codes.
---

# 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:

- [ ] **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?**

---

## ⚠️ 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>` |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.