api-design-reviewer
БесплатноЗапускает вложенные скриптыНе проверенReview REST API designs for quality, consistency, and breaking changes. Lints OpenAPI specs, generates scorecards, and detects breaking changes between…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
API Design Reviewer
Comprehensive analysis and review of REST API designs against conventions, best practices, and industry standards. Helps engineering teams build consistent, maintainable, well-designed APIs through automated linting, breaking-change detection, and design scorecards.
Core Capabilities
- API linting & convention analysis — resource naming (kebab-case URLs, camelCase fields), HTTP method usage, URL structure, status-code compliance, error-format consistency, and documentation coverage.
- Breaking change detection — endpoint removal, response-shape changes, field removal/rename, type changes, new required fields, and status-code changes between two spec versions, with migration guides.
- API design scoring — weighted scorecard across Consistency (30%), Documentation (20%), Security (20%), Usability (15%), and Performance (15%), with letter grades A–F and recommendations.
When to Use
- Designing a new REST API or reviewing an API contract.
- Validating an OpenAPI/Swagger spec against REST conventions.
- Managing API versioning and detecting breaking changes between releases.
- Gating deployments on API design quality in CI.
Clarify First
Before producing the review, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Which output: lint report, design scorecard, or breaking-change detection (selects
api_linter.py,api_scorecard.py, orbreaking_change_detector.py). - Spec file(s): the OpenAPI/Swagger JSON, or the two versions to diff (the input the tools parse).
- Quality bar / CI gate: minimum grade or fail-on-breaking (sets
--min-grade/--exit-on-breakingand how strict the verdict is).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Quick Start Workflow
# 1. Lint conventions (naming, methods, status codes, error format, docs coverage)
python scripts/api_linter.py assets/sample_openapi_v1.json # 93/100, 0 errors, exit 0
# 2. Diff two versions for breaking changes, with migration notes
python scripts/breaking_change_detector.py assets/sample_openapi_v1.json assets/sample_openapi_v2.json --exit-on-breaking
# -> 3 breaking (DELETE removed, User.id integer->string, new required field), exit 1
# 3. Score overall design maturity across five weighted dimensions
python scripts/api_scorecard.py assets/sample_openapi_v1.json --min-grade C # F (51/100), exit 1
Tools Overview
| Tool | Measures | Gate with it? |
|---|---|---|
api_linter.py |
Convention violations; starts at 100 and subtracts per issue, so a small clean spec scores high | Yes: exit 1 on any error-level issue. Use on every PR. |
breaking_change_detector.py |
Removed endpoints/methods, type changes, new required fields, status-code changes between two versions | Yes: --exit-on-breaking on every PR that touches the spec. |
api_scorecard.py |
Design maturity: documentation depth, examples, security coverage, pagination, error guidance; absent features cost points | As a ratchet: set --min-grade to today's grade so it cannot drop, and review the recommendations at release time. |
The linter and the scorecard disagree by design. On the sample spec the linter gives 93/100 (few violations) while the scorecard gives F (missing descriptions, examples, error schemas, rate-limit docs). Report both and say which question each answers: "does it break our rules?" versus "is it a complete, well-documented API?".
All three take --format text|json and --output FILE.
Exit codes. 0 pass; 1 linter errors found, breaking changes found (with
--exit-on-breaking) or grade below --min-grade; 2 missing or unreadable spec, invalid JSON,
or a spec the tool cannot analyse.
Done when:
- The linter reports no errors and every warning is fixed or accepted with a reason.
- The breaking-change diff against the last released spec is empty, or each breaking change has a version bump and a migration note.
- The scorecard grade did not drop, and its top recommendation is either done or ticketed.
Anti-Patterns
Gating on the wrong score
Mistake: Blocking merges on a scorecard grade of B for an API that has never had examples or long descriptions. Why it happens: One number per PR looks tidy. Instead: Gate on linter errors and breaking changes; use the scorecard as a ratchet so it only improves.
Verbs in paths
Mistake: /getUsers, /createOrder, /users/delete/{id}.
Why it happens: RPC habits carry over into REST.
Instead: Nouns for resources and HTTP methods for actions (GET /users, POST /orders, DELETE /users/{id}). The linter flags these.
Breaking changes in a minor release
Mistake: Changing a field type or adding
Установить api-design-reviewer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл api-design-reviewer?
Review REST API designs for quality, consistency, and breaking changes. Lints OpenAPI specs, generates scorecards, and detects breaking changes between versions. Use when designing APIs, reviewing contracts, or managing API versioning.
Как установить скилл api-design-reviewer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-design-reviewer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
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