reviewing-code — скилл для Claude Code: ревью кода по шагам
Скилл проводит разбор кода по чек-листу: корректность, поддерживаемость, производительность, типы и тесты. Пригодится, когда нужно ревью перед мержем.
npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a claude-codeЧто делает reviewing-code
Скилл включается, когда вы просите проверить код или дать по нему обратную связь. Сначала агент читает файлы или диф и определяет, что это за изменение: новая фича, фикс бага или рефакторинг. Дальше идёт по пунктам.
Корректность — пустой ввод, null, ноль, отрицательные числа, обработка ошибок через try/catch и fallback UI, гонки и таймауты в асинхронном коде, ошибки на единицу в циклах. Поддерживаемость — одна ответственность на функцию, понятные имена, дублирование, магические числа, глубокая вложенность. Производительность — паттерн N+1 в запросах к базе, тяжёлые вычисления в циклах рендера, отсутствие виртуализации или пагинации у больших списков, индексы под частые запросы. Для TypeScript отдельно проверяются any, явные возвращаемые типы у публичных API и исчерпывающая обработка union-типов.
Замечания агент раскладывает по трём уровням: must fix (баги, безопасность, риск потери данных), should fix (производительность и поддерживаемость) и nit (стиль). К каждому пункту — файл, строка, суть проблемы и предложенное исправление. Скилл просит объяснять, почему что-то является проблемой, и отмечать удачные места. Про мелочи, которые закрывает линтер или форматтер, спорить не будет.
Какие задачи решает
- разобрать диф перед мержем и найти баги
- проверить обработку пустого ввода и null
- найти паттерн N+1 в запросах к базе
- убрать
anyи сузить типы в TypeScript - оценить, покрыты ли тестами ошибки, а не только happy path
Примеры запросов агенту
- сделай ревью этого диффа
- проверь код в
src/api/orders.tsна корректность и производительность - посмотри изменения в ветке и разложи замечания по severity
Как установить reviewing-code
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a claude-code2Вручную: положить файлы
~/.claude/skills/reviewing-code/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/reviewing-code/
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a codex2Вручную: положить файлы
.agents/skills/reviewing-code/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a cursor2Вручную: положить файлы
.cursor/skills/reviewing-code/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install spencerpauly/awesome-cursor-skills reviewing-code2Вручную: положить файлы
.github/skills/reviewing-code/SKILL.md1Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a gemini-cli2Командой платформы
gemini skills install https://github.com/spencerpauly/awesome-cursor-skills --path resources/reviewing-codeВручную: положить файлы
.devin/skills/reviewing-code/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Из того же набора59
Похожие
Рядом в теме «Код-ревью и рефакторинг»
Всё по теме «Код-ревью и рефакторинг» →Вопросы о reviewing-code
Как установить reviewing-code в Claude?
Выполните npx skills add spencerpauly/awesome-cursor-skills --skill reviewing-code -a claude-code. Скилл окажется в ~/.claude/skills/reviewing-code/SKILL.md.
Что делает reviewing-code?
Прогоняет код по чек-листу: корректность, поддерживаемость, производительность, типы и тесты. На выходе — список замечаний с файлом, строкой и предложенным исправлением.
На каких платформах работает скилл?
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode. Для каждой платформы своя команда установки.
Исходный текст
SKILL.md · CC0-1.0
--- name: reviewing-code description: Perform a thorough code review focused on correctness, maintainability, performance, and best practices. --- # Code Review Use this skill when the user asks for a code review, feedback on their code, or to check code quality. ## Steps 1. **Understand the change** — read the files or diff to understand what the code is supposed to do. Identify the scope (new feature, bug fix, refactor). 2. **Check correctness** - Does the code handle edge cases (empty input, null, zero, negative numbers)? - Are error states handled (try/catch, error boundaries, fallback UI)? - Does async code handle race conditions, cancellation, and timeouts? - Are there off-by-one errors in loops or array access? 3. **Check maintainability** - Are functions focused on a single responsibility? - Are variable and function names descriptive? - Is there unnecessary duplication that should be extracted? - Are magic numbers replaced with named constants? - Is the code complexity reasonable (deeply nested conditionals, long functions)? 4. **Check performance** - Are there N+1 query patterns in database access? - Are expensive computations or API calls happening in render loops? - Are large lists missing virtualization or pagination? - Are there missing indexes for common database queries? - Is memoization used appropriately (not over-applied)? 5. **Check type safety** (TypeScript projects) - Are there `any` types that should be narrowed? - Are function return types explicit for public APIs? - Are union types handled exhaustively? 6. **Check testing** - Are there tests for the new/changed code? - Do tests cover the happy path AND error cases? - Are tests isolated (no shared mutable state)? 7. **Provide feedback** — organize findings by severity: - **Must fix**: bugs, security issues, data loss risks - **Should fix**: performance issues, maintainability concerns - **Nit**: style preferences, minor suggestions For each finding, include the file, line, the issue, and a suggested fix. ## Notes - Be constructive — explain *why* something is a problem, not just that it is. - Acknowledge what's done well, not just what needs fixing. - Don't bikeshed on style issues that a linter/formatter should handle.
© spencerpauly · CC0-1.0 · spencerpauly/awesome-cursor-skills