api-review
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when reviewing API designs, auditing REST or gRPC endpoints, designing backend APIs, evaluating BFF architecture, or discussing API…
от robbyt★ 42 звезды на GitHubОб этом скилле
API Design Review
Expert guidance for API design based on Google's API Improvement Proposals (AIPs) — the same standards governing all public Google APIs. These principles are universal and apply to any organization building REST, gRPC, or BFF/backend APIs.
When to Use
Invoke this skill when:
- Reviewing or auditing API endpoint designs (REST or gRPC)
- Designing new backend service APIs
- Evaluating BFF (Backend-for-Frontend) architecture boundaries
- Resolving concurrency issues (TOCTOU, lost updates, race conditions)
- Choosing between PATCH and PUT, or standard vs custom methods
- Designing pagination, filtering, or error handling
- Assessing backward compatibility of API changes
Always cite the AIP number (e.g., "Per AIP-154, ETags must use ABORTED on mismatch") when providing guidance. This gives teams an authoritative, linkable reference at https://google.aip.dev/{number}.
Query Routing
Match the user's concern to the right reference file:
| User asks about... | Primary reference | Key AIPs |
|---|---|---|
| PUT vs PATCH, partial update, field masks | standard-update.md |
AIP-134 |
| Race conditions, lost updates, concurrent edits, ETags | etags-and-freshness.md |
AIP-154 |
| Retry safety, duplicate requests, request IDs | idempotency.md |
AIP-155 |
| Page tokens, cursor pagination, filtering, ordering | pagination-and-filtering.md |
AIP-158, 160 |
| Breaking changes, backward compatibility | compatibility.md |
AIP-192 |
| Alpha/beta/stable, API versioning | versioning-and-stability.md |
AIP-180, 181 |
| Error codes, error responses, status details | errors.md |
AIP-193 |
| Auth checks, permission denied vs not found | authorization.md |
AIP-211 |
| BFF anti-patterns, layer boundaries, orchestration | bff-architecture.md |
-- |
| Secrets, passwords, write-only fields | sensitive-fields.md |
AIP-147 |
| Soft delete, undelete, resource expiry | resource-lifecycle.md |
AIP-164, 216 |
| Async tasks, long-running operations | long-running-operations.md |
AIP-151 |
| Recurring tasks, scheduled execution | jobs.md |
AIP-152 |
| Bulk operations, batch requests | batch-methods.md |
AIP-235 |
| Bulk data import/export, data portability | import-and-export.md |
AIP-153 |
| Dry run, preview, validate-only | change-validation.md |
AIP-163 |
| Many-to-many, multi-parent resources | resource-association.md |
AIP-124 |
| Field defaults, server-modified values | server-modified-values.md |
AIP-129 |
| Timestamps, durations, date fields | time-and-duration.md |
AIP-142 |
| Unset vs zero, optional primitives | unset-field-values.md |
AIP-149 |
| Naming conventions, enums, standard fields | naming-and-fields.md |
AIP-140, 148 |
| Required/optional/immutable annotations | field-behavior.md |
AIP-203 |
| Wildcard parent, cross-collection queries | cross-collection-reads.md |
AIP-159 |
| Singleton resources, config objects | singletons.md |
AIP-156 |
| Management vs data plane | planes.md |
AIP-111 |
| Desired-state, reconciliation, declarative | declarative-interfaces.md |
AIP-128 |
Core Principles
These five principles form the foundation of well-designed APIs:
| # | Principle | Key AIPs | One-liner |
|---|---|---|---|
| 1 | Resource-oriented design | AIP-121, 122, 123 | Model APIs as resource hierarchies with standard methods |
| 2 | Business operations, not CRUD | AIP-136 | Expose domain actions, not raw table access |
| 3 | Idempotent, conflict-aware mutations | AIP-154, 155 | ETags prevent lost updates; request IDs enable safe retries |
| 4 | Declarative desired-state | AIP-128 | Clients send intended state; server reconciles |
| 5 | Explicit contracts | AIP-192, 203 | Field behavior is documented; breaking changes are caught |
Standard Methods Quick Reference
Per AIP-121, every resource should expose standard methods where appropriate:
| Method | HTTP | AIP | Notes |
|---|---|---|---|
| Get | GET /v1/{name=...} |
AIP-131 | Return single resource |
| List | GET /v1/{parent=...}/resources |
AIP-132 | Paginated collection; see AIP-158 |
| Create | POST /v1/{parent=...}/resources |
AIP-133 | Include {resource}_id for client-assigned names |
| Update | PATCH /v1/{resource.name=...} |
AIP-134 | Always PATCH, never PUT; use field masks |
| Delete | DELETE /v1/{name=...} |
AIP-135 | Support etag, force, allow_missing |
Custom methods use POST /v1/{name=...}:verb (AIP-136) for operations that don't fit
standard methods — e.g., :archive, :merge, :approve.
Decision Tables
PATCH vs PUT (AIP-134)
| Scenario | Recommendation | Rationale |
|---|---|---|
| Updating specific fields | PATCH + field mask | Adding fields later won't break existing clients |
| Full resource replacement | PATCH with * mask |
Equivalent to PUT without the compatibility risk |
| Legacy system requires PUT | Discouraged | Document risks; plan migr |
Установить api-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл api-review?
This skill should be used when reviewing API designs, auditing REST or gRPC endpoints, designing backend APIs, evaluating BFF architecture, or discussing API best practices. Also triggers on: "review this API", "API design review", "is this API correct", "REST API audit", "gRPC API review", "PATCH vs PUT", "etag", "idempotency", "pagination design", "API error handling", "backward compatibility", "BFF architecture", "resource-oriented design", "TOCTOU", "race condition", "optimistic concurrency", "field mask", "long-running operation", "custom method", "soft delete", "API naming conventions", "declarative-friendly"
Как установить скилл api-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This 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…
от Anthropic