review-code
БесплатноБез исполняемых скриптовНе проверенRun a comprehensive code review of local changes, analyzing staged and unstaged changes to provide insights, identify issues, and suggest alternative…
от kvet★ 38 звёзд на GitHubОб этом скилле
Local Code Review
Run a comprehensive, critical code review of local changes. This skill analyzes staged and unstaged changes to provide insights, identify issues, and suggest alternative approaches.
Instructions
When this skill is invoked:
- First, read the detailed agent instructions from
.claude/agents/review-code/instructions.md - Gather the current changes using git diff
- Analyze the changes following the review framework
- Provide a structured report with findings and alternatives
Usage
/review-code # Review all uncommitted changes
/review-code --staged # Review only staged changes
/review-code <commit> # Review changes in a specific commit
/review-code <base>..<head> # Review changes between commits
Review Process
Step 1: Gather Changes
Based on arguments:
- No args:
git diff HEAD(all uncommitted changes) --staged:git diff --staged<commit>:git show <commit><base>..<head>:git diff <base>..<head>
Step 2: Understand Context
For each modified file:
- Read the full file to understand surrounding context
- Identify the module/component's purpose
- Note existing patterns and conventions
Step 3: Analyze Changes
Apply the review framework from .claude/agents/review-code/instructions.md:
- Project convention compliance (
CLAUDE.md,code-style.md) - Correctness analysis
- Design evaluation
- Security review
- Performance considerations
- Maintainability assessment
- Public surface, persisted state, and sibling adapters (section 7)
Step 4: Generate Alternatives
For changes that make a design choice (new abstraction, data structure, control flow, or API shape), brainstorm alternative approaches. Skip this for mechanical changes — renames, fixes with one obvious shape, test-only edits:
- Different architectural patterns
- Alternative algorithms or data structures
- Trade-off analysis for each approach
Step 5: Verify Changeset Coverage
Inspect the diff for user-facing changes — public API renames or signature changes, behavior changes, schema/migration changes, user-visible bug fixes, breaking changes. If any are present, confirm a .changeset/*.md entry exists that:
- Bumps every package whose published surface or runtime behavior changed (
patch/minor/major). - Describes the change in language a user reading release notes would understand.
- For breaking changes, bumps
majorand includes migration guidance. - For schema/migration changes, calls out what runs against existing databases.
Treat a missing changeset as a CRITICAL issue when the diff has user-facing changes. Internal-only changes (refactors with no API impact, tests, types-only tightening, doc-only edits, build/CI/tooling, benchmarks, examples) do not need a changeset.
Step 6: Report
Provide a structured report with:
- Executive summary
- Critical issues (must fix)
- Concerns (should consider)
- Convention violations (
code-style.md) - Suggestions (nice to have)
- Alternative approaches with trade-offs
- Questions for the author
Omit any section that has nothing in it rather than writing "none".
Output Format
# Code Review: [brief description of changes]
## Summary
[2-3 sentence overview of what the changes do and overall assessment]
## Critical Issues
[Issues that would cause bugs, security vulnerabilities, or data loss]
## Concerns
[Design issues, edge cases, potential problems]
## Convention Violations
[Every departure from `code-style.md` or `CLAUDE.md`, one row each. Obvious comments — any comment restating what the code says — belong here, not in Suggestions. Omit the section only when the diff has none.]
| File:line | Rule | What the code does | Fix |
| --------- | ---- | ------------------ | --- |
| ... | ... | ... | ... |
## Suggestions
[Improvements, style, minor issues]
## Alternative Approaches
### Alternative 1: [Name]
**Approach:** [Description]
**Trade-offs:**
- Pro: ...
- Con: ...
**When to prefer:** [Conditions where this is better]
### Alternative 2: [Name]
...
## Questions
[Clarifying questions for the author about intent or requirements]
Severity Definitions
- CRITICAL: Bugs, security issues, data loss risks, breaking changes, missing changeset for user-facing changes
- CONCERN: Design flaws, missing edge cases, unclear intent, potential issues, changeset present but incomplete (wrong bump level, missing affected package, unclear description)
- SUGGESTION: Readability, minor optimizations, documentation
Установить review-code в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл review-code?
Run a comprehensive code review of local changes, analyzing staged and unstaged changes to provide insights, identify issues, and suggest alternative approaches. Use when reviewing code before committing or creating pull requests.
Как установить скилл review-code?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл review-code запускает скрипты?
Нет, скилл состоит только из инструкций (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