api-patterns
ALWAYS use this when the task involves API shape, contracts, auth, versioning, response structure, error handling, or service boundary design.
от Anhvu1107★ 25 звёзд на GitHub
Установить api-patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
API Patterns
Selective Reading Rule
Start with:
references/usage-routing.mdreferences/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
Selective Reading Rule
Start with:
references/senior-master-standard.md
Start with the file that answers the current design question:
references/contract-playbook.mdfor senior-level contract design and reviewreferences/api-review-checklist.mdfor final review before implementationapi-style.mdfor REST vs GraphQL vs tRPCrest.mdfor REST endpoint and resource designgraphql.mdfor GraphQL fit and schema considerationstrpc.mdfor TypeScript-first monorepo APIsresponse.mdfor envelopes, pagination, and error contractsversioning.mdfor API evolutionauth.mdfor authentication and caller identityrate-limiting.mdfor abuse protectiondocumentation.mdfor API docs and discoverabilitysecurity-testing.mdwhen reviewing API risk
Purpose
Choose an API style that fits the consumers, the team, and the product boundary.
An API is a contract. Changing it later is expensive, so design for clarity and operational reality early.
Use This Skill When
- picking between REST, GraphQL, and tRPC
- shaping new endpoints or procedures
- normalizing responses, errors, pagination, or filtering
- deciding auth and versioning strategy
- reviewing whether an API is too leaky, inconsistent, or hard to evolve
Core Workflow
- Identify the consumers.
- web client, mobile app, internal service, public integrators, same-repo frontend
- Choose the transport and contract style.
- REST, GraphQL, or tRPC based on usage patterns and team reality
- Define resource or procedure boundaries.
- Standardize responses.
- success shape, errors, pagination, identifiers, timestamps
- Decide control concerns.
- auth, rate limiting, idempotency, versioning, observability
- Document the contract in a way implementation can follow.
Heuristics
- Use REST when resources and cacheable operations dominate.
- Use GraphQL when the client truly needs flexible graph traversal and multiple consumer views.
- Use tRPC when TypeScript-first internal velocity matters more than public portability.
- Keep error shapes consistent across the surface.
- Avoid exposing internal storage structure as public API design.
Review Questions
- Can a new consumer understand the contract quickly?
- Are identifiers, status codes, and error shapes consistent?
- Is pagination stable and predictable?
- Can the API evolve without breaking common callers?
- Are auth and authorization boundaries obvious?
Related Skills
architecturefor broader system-boundary decisionsdatabase-designwhen endpoint shape is being distorted by schema issuesmcp-builderwhen the API surface is being adapted for tool-based LLM useverification-before-completionbefore claiming an API contract is ready
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- agents/openai.yaml
- references/api-review-checklist.md
- references/contract-playbook.md
- references/legacy-api-style.md
- references/legacy-auth.md
- references/legacy-documentation.md
- references/legacy-graphql.md
- references/legacy-rate-limiting.md
- references/legacy-response.md
- references/legacy-rest.md
- references/legacy-security-testing.md
- references/legacy-trpc.md
- references/legacy-versioning.md
- references/quality-checklist.md
- references/senior-master-standard.md
- references/usage-routing.md
- scripts/api_validator.py
FAQ
Что делает скилл api-patterns?
ALWAYS use this when the task involves API shape, contracts, auth, versioning, response structure, error handling, or service boundary design.
Как установить скилл api-patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-patterns запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…