code-review · justxor — Claude Code skill: check code before commit
The code-review skill checks changes in the current branch against main and produces a report with notes on correctness, security, tests, and readability.
MIT ★ 353 updated 2026-10-01
npx skills add justxor/claude-code-pro-course --skill code-review -a claude-codeWhat code-review does
The skill reads the diff via git diff main...HEAD --stat, then the full text of changes and surrounding code. It checks logic, edge cases (null, empty values, large arrays), error handling, injections, hardcoded secrets, input validation, test coverage, N+1 queries, leaks, and style compliance from CLAUDE.md.
The report is split into three sections: critical issues, worth fixing, and minor notes. Each remark points to a file and line. If there are no remarks, the skill confirms that.
Available tools: Bash(git diff:*), Bash(git log:*), Bash(git status), Read, Grep, Glob. If the branch does not differ from main, the skill switches to git diff and git diff --staged.
What it helps with
- check code before opening a pull request
- find security issues in changes
- confirm new behavior is covered by tests
- spot N+1 queries and leaks in the diff
- get a structured report with file and line references
Example prompts for the agent
- Review changes in the current branch
- Check the code before I commit
- Find issues in the diff against main
How to install code-review
1Skills CLI (Vercel)
npx skills add justxor/claude-code-pro-course --skill code-review -a claude-code2Manually: put the files in place
~/.claude/skills/code-review/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-review/
1Skills CLI (Vercel)
npx skills add justxor/claude-code-pro-course --skill code-review -a codex2Manually: put the files in place
.agents/skills/code-review/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add justxor/claude-code-pro-course --skill code-review -a cursor2Manually: put the files in place
.cursor/skills/code-review/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install justxor/claude-code-pro-course starter-kit/.claude/skills/code-review2Manually: put the files in place
.github/skills/code-review/SKILL.md1Skills CLI (Vercel)
npx skills add justxor/claude-code-pro-course --skill code-review -a gemini-cli2Platform CLI
gemini skills install https://github.com/justxor/claude-code-pro-course --path starter-kit/.claude/skills/code-reviewManually: put the files in place
.devin/skills/code-review/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about code-review
How to install code-review in Claude Code?
Run npx skills add justxor/claude-code-pro-course --skill code-review -a claude-code. The skill will land in ~/.claude/skills/code-review/SKILL.md.
What does code-review do?
The skill checks changes in the current branch against main: logic, security, tests, performance, and readability. It produces a report with remarks tied to files and lines.
Which tools does code-review use?
The skill uses Bash(git diff:*), Bash(git log:*), Bash(git status), Read, Grep, and Glob. This lets it read diffs, logs, repository status, and surrounding code.
Source text
SKILL.md · MIT
--- name: code-review description: Ревью изменений в текущей ветке относительно main. Используй, когда просят проверить код, сделать ревью, найти проблемы перед PR или коммитом. allowed-tools: Bash(git diff:*), Bash(git log:*), Bash(git status), Read, Grep, Glob --- # Code review ## Шаги 1. Определи базу: `git diff main...HEAD --stat` (если main нет — `master`). Если изменений в ветке нет — используй `git diff` и `git diff --staged`. 2. Прочитай полный дифф и, где нужно, окружающий код изменённых файлов. 3. Проверь каждый файл по чек-листу: - **Корректность:** логика, граничные случаи (null, пусто, большие значения), обработка ошибок - **Безопасность:** инъекции, секреты в коде, проверка прав, валидация ввода - **Тесты:** покрыто ли новое поведение; не ослаблены ли существующие тесты - **Производительность:** N+1, лишние циклы, утечки - **Читаемость:** имена, дублирование, соответствие стилю из CLAUDE.md 4. Не придумывай проблем ради количества. Нет замечаний — так и скажи. ## Формат отчёта ``` ## Итог: <одно предложение> ### 🔴 Критично - `файл:строка` — проблема → предложение ### 🟡 Стоит исправить - ... ### 🟢 Мелочи - ... ```
© justxor · MIT · justxor/claude-code-pro-course
Similar skills
All skills for Code review and refactoring →code-review by other authors comes first.