dev-api-design

dev-api-design is a skill for Claude Code from joaoguirunas/team-os. It costs 27 tokens per session (1,105 once invoked), scanned A, original, MIT.

A guide for designing APIs for complex software, covering REST, tRPC, contracts, versioning, and standard error responses. APIs are interfaces that let software systems communicate.

In plain words
What is it for?
It is for planning API contracts, choosing or documenting REST and tRPC interfaces, managing versions, and defining standard error responses.
Why use it?
It helps keep API behaviour and error handling consistent as a complex system changes over time.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It is for planning API contracts, choosing or documenting REST and tRPC interfaces, managing versions, and defining standard error responses.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/joaoguirunas/team-os/dev-api-design
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add joaoguirunas/team-os --skill dev-api-design
Clone the repo
git clone --depth 1 https://github.com/joaoguirunas/team-os

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dev-api-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/joaoguirunas/team-os/dev-api-design/github.svg)](https://agentmods.dev/skills/joaoguirunas/team-os/dev-api-design)
Your own site
<a href="https://agentmods.dev/skills/joaoguirunas/team-os/dev-api-design"><img src="https://agentmods.dev/badge/skills/joaoguirunas/team-os/dev-api-design/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dev-api-design

Your own site · 80×15
<a href="https://agentmods.dev/skills/joaoguirunas/team-os/dev-api-design"><img src="https://agentmods.dev/badge/skills/joaoguirunas/team-os/dev-api-design.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.01105
Opus 5.5 $0.00011 $0.00442
Sonnet 5.5 $0.00005 $0.00221
Haiku 4.5 $0.00003 $0.00111

Measured 27d ago against content hash 9fc22c70f577, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dev-api-design scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/dev-api-design/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Design — Software Complexo

REST — Nomenclatura

GET    /users              → listar
GET    /users/:id          → buscar por ID
POST   /users              → criar
PUT    /users/:id          → substituir completo
PATCH  /users/:id          → atualizar parcial
DELETE /users/:id          → remover

# Ações não-CRUD (POST + verbo explícito)
POST   /users/:id/deactivate
POST   /auth/refresh
POST   /payments/:id/refund

Regras: plural sempre (/users), nunca verbos em recursos, máx 2 níveis de aninhamento.

Responses

Sucesso

{
  "data": { "id": "usr_123", "email": "[email protected]" },
  "meta": { "requestId": "req_abc" }
}

Lista paginada

{
  "data": [...],
  "pagination": { "page": 1, "perPage": 20, "total": 150, "hasNext": true }
}

Erro — padrão obrigatório

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request data",
    "details": [{ "field": "email", "message": "Must be a valid email" }],
    "requestId": "req_abc"
  }
}

requestId obrigatório em todas as respostas — sucesso e erro. Gerado no middleware de entrada e propagado pelo sistema. Usar o mesmo requestId nos logs (ver dev-security-patterns) para rastrear requests end-to-end.

Nunca expor: stack traces, mensagens de banco, lógica interna.

HTTP Status + Códigos de Erro

HTTP Code Quando
200 — GET, PATCH, PUT ok
201 — POST criou recurso
204 — DELETE ou ação sem body
400 VALIDATION_ERROR Input inválido
401 UNAUTHORIZED Não autenticado
403 FORBIDDEN Sem permissão
404 NOT_FOUND Não existe
409 CONFLICT Estado conflitante
429 RATE_LIMITED Rate limit
500 INTERNAL_ERROR Erro interno

requestId — Geração e Propagação

// Middleware de entrada — gerar requestId único
app.use((req, res, next) => {
  req.requestId = req.headers['x-request-id'] as string
    ?? `req_${crypto.randomUUID().replace(/-/g, '').slice(0, 12)}`
  res.setHeader('x-request-id', req.requestId)
  next()
})

// Passar requestId para logs e serviços downstream
logger.info('Request received', { requestId: req.requestId, path: req.path })

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago Changed 9fc22c70f577
  2. 1mo ago First seen · 144 lines · 27 tokens per session scan A 5f41f72a6684

Subscribe to this mod's changes

dev-api-design is a skill published in the GitHub repository joaoguirunas/team-os (5 stars, last pushed 3d ago), licensed MIT. It adds 27 tokens to every session and 1,105 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

form-strategy

Design forms that convert, validate well, resist spam, and integrate cleanly with downstream systems. Use this skill when designing or auditing any form (contact, signup, checkout, multi-step, embedded), planning validation logic, fighting spam, choosing form tooling, or improving form conversion. Triggers on form…

rampstackco/claude-skills · 107 tokens

mcp-server-builder

Use to build, wire up, or debug an MCP (Model Context Protocol) server that gives Claude access to an internal API, database, or SaaS tool. Trigger when the user wants Claude to connect to their own system, asks for an MCP server, needs custom tools for Claude Code or the Claude app, or an existing server's tools are…

OneWave-AI/claude-skills · 79 tokens

api-endpoint-scaffolder

Generate REST API endpoints with proper structure, validation, error handling, and types. Use when creating new API routes, endpoints, or backend services.

OneWave-AI/claude-skills · 36 tokens

nextauth-authentication

Guidelines for implementing NextAuth.js (Auth.js v5) authentication in Next.js applications with session management and security best practices.

Mindrally/skills · 30 tokens

api-security-best-practices

Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities.

lingxling/awesome-skills-cn · 29 tokens

apollo-graphql

Guidelines for developing GraphQL APIs and React applications using Apollo Client for state management, data fetching, and caching.

Mindrally/skills · 26 tokens