Skip to content
Skills Library
Programming · Planning

api-patterns

/api-patterns

Chooses REST, GraphQL or tRPC and sets versioning, pagination, auth and rate limits. Use when designing an API or reviewing endpoint contracts.

Repository
cardume ↗
Licence
MIT
Last repository change
04.11.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
12
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 04.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/api_validator.py

What it does and when to use it

Chooses REST, GraphQL or tRPC and sets versioning, pagination, auth and rate limits. Use when designing an API or reviewing endpoint contracts.

Original author description

Chooses REST, GraphQL or tRPC and sets versioning, pagination, auth and rate limits. Use when designing an API or reviewing endpoint contracts.

How it works

  1. 🎯 Selective Reading Rule
  2. 📑 Content Map
  3. 🔗 Related Skills
  4. ✅ Decision Checklist
  5. ❌ Anti-Patterns
  6. Script
Original SKILL.md headings · 79 lines, 381 words
SKILL.md preview
---
name: api-patterns
description: "Chooses REST, GraphQL or tRPC and sets versioning, pagination, auth and rate limits. Use when designing an API or reviewing endpoint contracts."
allowed-tools: Read Write Edit Glob Grep
compatibility: "Claude Code with the Cardume plugins (uses cardume-* commands, subagents or plugin paths); the guidance itself is portable."
---

# API Patterns

> API design principles and decision-making, aligned with current standards
> (RFC 9457 Problem Details, OpenAPI 3.1/3.2, IETF HTTPAPI drafts).
> **Learn to think, not copy fixed patterns.**

## 🎯 Selective Reading Rule

**Read only the 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, idempotency keys | Designing REST API |
| `response.md` | Envelope pattern, RFC 9457 errors, 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, `RateLimit` headers | API protection |
| `documentation.md` | OpenAPI 3.1/3.2 best practices | Documentation |
| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |

---

## 🔗 Related Skills

| Need | Skill |
|------|-------|
| API implementation (Node.js / Java) | `cardume-backend:nodejs-best-practices`, `cardume-backend:java-spring-patterns` |
| Data structure | `cardume-core:database-design` |
| Security details | `cardume-qa:vulnerability-scanner` |

---

## ✅ Decision Checklist

Before designing an API:

- [ ] **Asked user about API consumers?**
- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)
- [ ] **Defined consistent response format?** (errors as RFC 9457 `application/problem+json`)
- [ ] **Retry-safe writes?** (idempotency keys on POST/PATCH that clients may retry)
- [ ] **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 |
|--------|---------|---------|
| `cardume-api-validator` (wraps `scripts/api_validator.py`) | API endpoint validation | `cardume-api-validator <project_path>` |

Files in this package (12)
  • SKILL.md 3 KB
  • api-style.md 1 KB
  • auth.md 1 KB
  • documentation.md 1 KB
  • graphql.md 1 KB
  • rate-limiting.md 1 KB
  • response.md 2 KB
  • rest.md 2 KB
  • security-testing.md 3 KB
  • trpc.md 1 KB
  • versioning.md 1 KB
  • scripts/api_validator.py 7 KB

Versions

RepositoryScoreLicence
This page · jeffersonvalente/cardume90MIT
bybren-llc/safe-agentic-workflow100MIT
bybren-llc/safe-agentic-workflow100MIT
ThibautBaissac/rails_ai_agents100MIT
Reprograme/redevkit90MIT

Database snapshot: 13.11.2026 · package version 253630500cd1 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100design-api
    Design REST and GraphQL APIs: naming, versioning, error shapes, auth. Use when "design an API", "create endpoints", "REST vs GraphQL", or "API contract".
  • 100designing-apis
    Designs REST and GraphQL APIs including endpoints, error handling, versioning, and documentation. Use when creating new APIs, designing endpoints, reviewing API contracts, or when asked about REST, GraphQL, or API patterns.
  • 100api
    Use for API design — REST/GraphQL/gRPC. Versioning, error shape, auth, idempotency, pagination, rate limits. Output is a spec + scaffold.
  • 100api-design
    REST API design patterns including resource naming, status codes, pagination, filtering, error responses, versioning, and rate limiting for production APIs. Use when designing or reviewing REST endpoints, resource names, status codes, pagination, or versioning.
  • 100api-design-expert
    Expert API design for REST & GraphQL: resource modeling, status codes, versioning, pagination, idempotency, errors, and contracts. Trigger keywords: API design, REST, RESTful, GraphQL, OpenAPI, endpoint, status code, versioning, pagination, cursor, idempotency, rate limit,…
  • 100rest-api
    REST API design principles. Covers resources, methods, and status codes. Use when designing or reviewing REST APIs. USE WHEN: user mentions "REST API", "RESTful", "HTTP methods", "status codes", "resource naming", "API endpoints", "pagination", "versioning", asks about "how to…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.