code-review-specialist · luongnv89 — скилл для Claude Code: что делает
Проверяет код на уязвимости, падение производительности и нарушения архитектуры. Пригодится при разборе пулреквестов и подготовке к рефакторингу.
npx skills add luongnv89/claude-howto --skill code-review-specialist -a claude-codeЧто делает code-review-specialist
Скилл анализирует код по четырём направлениям: безопасность, производительность, архитектура и поддерживаемость. При проверке агент оценивает риски инъекций и утечки данных. Заодно измеряется алгоритмическая сложность по Big O и выявляются узкие места в запросах к базам данных. Скилл ожидает размер функций меньше 50 строк. Более длинные методы сразу попадут в замечания.
В состав скилла входят два шаблона и два скрипта на Python. Чек-лист templates/review-checklist.md задаёт структуру ревью, а templates/finding-template.md форматирует найденные дефекты с указанием критичности и готового фикса. Скрипт scripts/analyze-metrics.py подсчитывает функции, классы и среднюю длину строк. Второй скрипт, scripts/compare-complexity.py, сравнивает цикломатическую и когнитивную сложность двух версий файла при рефакторинге. Без установленного Python запустить эти замеры не выйдет.
Итоговый отчёт содержит общую оценку качества от 1 до 5. Агент перечисляет критические проблемы с номерами строк и готовым кодом для исправления. Затем замечания группируются по категориям безопасности, производительности и качества.
Какие задачи решает
- найти уязвимости внедрения кода и утечки данных
- оценить алгоритмическую сложность по Big O
- проверить соблюдение принципов SOLID и шаблонов проектирования
- сравнить цикломатическую сложность кода до и после рефакторинга
- выявить функции длиннее 50 строк
Примеры запросов агенту
- Проведи код-ревью в файле src/auth.ts и найди уязвимости безопасности
- Запусти ревью пуллреквеста и сверь код с чек-листом review-checklist.md
- Сравни сложность двух версий файла через scripts/compare-complexity.py
Как установить code-review-specialist
1Через Skills CLI (Vercel)
npx skills add luongnv89/claude-howto --skill code-review-specialist -a claude-code2Вручную: положить файлы
~/.claude/skills/code-review-specialist/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/code-review-specialist/
1Через Skills CLI (Vercel)
npx skills add luongnv89/claude-howto --skill code-review-specialist -a codex2Вручную: положить файлы
.agents/skills/code-review-specialist/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add luongnv89/claude-howto --skill code-review-specialist -a cursor2Вручную: положить файлы
.cursor/skills/code-review-specialist/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install luongnv89/claude-howto code-review-specialist2Вручную: положить файлы
.github/skills/code-review-specialist/SKILL.md1Через Skills CLI (Vercel)
npx skills add luongnv89/claude-howto --skill code-review-specialist -a gemini-cli2Командой платформы
gemini skills install https://github.com/luongnv89/claude-howto --path 03-skills/code-review-specialistВручную: положить файлы
.devin/skills/code-review-specialist/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add luongnv89/claude-howto --skill code-review-specialist -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о code-review-specialist
Как установить code-review-specialist в Claude Code?
Выполните команду npx skills add luongnv89/claude-howto --skill code-review-specialist -a claude-code. Также можно скопировать файл навыка вручную в ~/.claude/skills/code-review-specialist/SKILL.md.
Что делает скилл code-review-specialist?
Он проводит аудит исходного кода по чек-листу, проверяя безопасность, сложность по Big O, архитектуру и размер функций. В конце агент формирует структурированный отчёт с оценкой от 1 до 5 и примерами исправлений.
Какие вспомогательные скрипты входят в состав скилла?
В репозитории предусмотрены scripts/analyze-metrics.py для подсчёта метрик кода и scripts/compare-complexity.py для сопоставления сложности до и после правок. Для их выполнения в системе нужен рабочий интерпретатор Python.
Исходный текст
SKILL.md · MIT
--- name: code-review-specialist description: Comprehensive code review with security, performance, and quality analysis. Use when users ask to review code, analyze code quality, evaluate pull requests, or mention code review, security analysis, or performance optimization. --- # Code Review Skill This skill provides comprehensive code review capabilities focusing on: 1. **Security Analysis** - Authentication/authorization issues - Data exposure risks - Injection vulnerabilities - Cryptographic weaknesses - Sensitive data logging 2. **Performance Review** - Algorithm efficiency (Big O analysis) - Memory optimization - Database query optimization - Caching opportunities - Concurrency issues 3. **Code Quality** - SOLID principles - Design patterns - Naming conventions - Documentation - Test coverage 4. **Maintainability** - Code readability - Function size (should be < 50 lines) - Cyclomatic complexity - Dependency management - Type safety ## Reference Files This skill includes supporting files that you should read when performing reviews: - **`templates/review-checklist.md`** — Structured checklist covering security, performance, quality, and testing. Read this file and use it as a guide to ensure no category is missed during review. - **`templates/finding-template.md`** — Standard template for documenting individual findings with severity, location, code examples, and impact analysis. Read this file and use its format when reporting issues. - **`scripts/analyze-metrics.py`** — Python script that calculates code metrics (function count, class count, average line length, complexity score). Run this on the file under review to gather quantitative data. - **`scripts/compare-complexity.py`** — Python script that compares cyclomatic and cognitive complexity between two versions of a file. Run this with the before and after versions when reviewing refactoring changes. ## Review Template For each piece of code reviewed, provide: ### Summary - Overall quality assessment (1-5) - Key findings count - Recommended priority areas ### Critical Issues (if any) - **Issue**: Clear description - **Location**: File and line number - **Impact**: Why this matters - **Severity**: Critical/High/Medium - **Fix**: Code example ### Findings by Category #### Security (if issues found) List security vulnerabilities with examples #### Performance (if issues found) List performance problems with complexity analysis #### Quality (if issues found) List code quality issues with refactoring suggestions #### Maintainability (if issues found) List maintainability problems with improvements ## Version History - v1.0.0 (2024-12-10): Initial release with security, performance, quality, and maintainability analysis --- **Last Updated**: August 4, 2026 **Claude Code Version**: 2.1.220 **Sources**: - https://code.claude.com/docs/en/skills **Compatible Models**: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5
© luongnv89 · MIT · luongnv89/claude-howto
Похожие скиллы
Все скиллы по теме «Код-ревью и рефакторинг» →Сначала — code-review-specialist от других авторов.