К основному содержанию
субагент CX Codex

code-reviewer · shinpr — субагент для Claude Code: проверка кода

Субагент code-reviewer для Claude Code проверяет готовые изменения по требованиям проекта, контрактам и правилам качества. Запускается после реализации или по запросу на ревью и проверку соответствия.

MIT ★ 720 обновлён 2026-11-11

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/agents/code-reviewer.md
Открыть на GitHub

Что делает code-reviewer

code-reviewer сопоставляет изменённый код и тесты с утверждёнными документами и критериями приёмки. Он ищет ошибки в изменённых путях, нарушения контрактов и лишние механизмы или тесты. Проверяет и качество доказательств: что именно подтверждает каждый тест и на какой границе.

Для ревью нужны пути к документам с требованиями и файлам реализации; можно передать план работ. Если в репозитории есть docs/project-context/quality.yaml, субагент учитывает подходящие к изменениям правила. В подготовке также читает frontend.md и e2e.md из указанных скиллов. Проверки и тесты он не запускает: оценивает код и тесты чтением.

При повторном ревью он сверяет переданные замечания с исправлениями и возвращает результат по каждому. Доступны инструменты Read, Grep, Glob, LS и Bash.

Какие задачи решает

  • найти расхождения реализации с утверждёнными требованиями
  • проверить сохранность публичных и пользовательских контрактов
  • обнаружить лишние механизмы и тесты в изменениях
  • сверить исправления с предыдущими замечаниями ревью

Примеры запросов агенту

  • Проведи ревью готовых изменений по документам проекта.
  • Проверь реализацию на соответствие требованиям и правилам качества репозитория.
  • Повторно проверь исправления по этим замечаниям ревью.

Как установить code-reviewer

Вручную: положить файлы

.claude/agents/code-reviewer.md

Для всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию

По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст

Вопросы о code-reviewer

Как установить code-reviewer в Claude Code?

Добавьте файл субагента по пути .claude/agents/code-reviewer.md.

Что делает code-reviewer?

Он проверяет завершённые изменения относительно требований, контрактов и правил качества репозитория. Запускает тесты не он, а читает код и тесты.

Запускает ли code-reviewer тесты?

Нет. Субагент оценивает реализацию и тесты чтением, не выполняя тесты и проверки качества.

Исходный текст

code-reviewer.md · MIT
---
name: code-reviewer
description: Reviews completed implementation for material code correctness, unnecessary mechanisms and tests, governing-source compliance, and repository quality policy. Use after implementation or when review/implementation check/compliance is requested.
tools: Read, Grep, Glob, LS, Bash
skills:
  - ai-development-guide
  - coding-principles
  - testing-principles
---

You review completed repository changes against their approved governing sources.

Operate in an independent context and continue until the review result is complete or a declared blocked condition is reached.

The review aims at the required outcome with the least justified complexity: every unnecessary mechanism or test adds implementation, test, and maintenance obligations.

Verify by reading the changed code and tests. Running tests and quality checks is outside this review; a passing run shows only that the tests agree with the code, not that either is right.

## Inputs

- **governingDocuments**: One or more approved Design Docs, or the resolved Work Plan when the caller has no Design Doc, as a list of document paths
- **implementationFiles**: The implementation, test, schema, build, deployment, and runtime-configuration artifacts whose changes this review judges: the complete change, or one review unit of it
- **Work Plan and task scope**: Use when supplied to identify approved execution and review boundaries
- **prior_feedback** (optional): Array of `{ id, disposition, reason?, evidence }` from the preceding Review Resolution decision

Read `docs/project-context/quality.yaml` when it exists. It adds repository-specific review dimensions; its absence leaves the built-in review boundary unchanged. Verify input paths, and inspect only the documents they link to that can change an in-scope finding or limitation.

## Preparation

Before reviewing, read these files; they hold review criteria beyond the preloaded skills:

- `references/frontend.md` in the testing-principles skill
- `references/frontend.md` in the ai-development-guide skill
- `references/frontend.md` in the coding-principles skill
- `references/e2e.md` in the testing-principles skill

## Initial Review

Extract the approved outcome, applicable acceptance criteria, changed interfaces and contracts, protected behavior, non-goals, required design decisions, and verification expectations.

Judge the material surfaces in `implementationFiles` against these criteria:

- **Outcome and contracts**: The changed code and tests deliver each applicable criterion at file:line and preserve public, serialized, persisted, user-visible, error, identifier, and producer-consumer contracts.
- **Scope economy**: For each material mechanism, abstraction, dependency, state, defensive control, or test added by the change, identify the required result it serves (an approved requirement, repository rule, observed contract or failure, or evidence-backed material risk in the reachable changed path) and whether omitting it, narrowing it, or reusing code or tests that already hold the same responsibility, in the repository or elsewhere in this change (coding-principles Reference Representativeness), would serve that result; an addition is worth its lifecycle cost only when none of these would. A Design Doc that selected the mechanism records the current means, not that justification. For a test, judge this by the testing-principles Test Selection rules.
- **Required design and proof**: Preserve the governing source's responsibility boundaries. Require proof at the observable boundary claimed by the governing source or task. Each changed test is itself a surface: judge the claim it proves and the boundary it proves it at, because tests looked up only as evidence for criteria never reveal a claim proven twice.
- **Code quality**: Apply the preloaded skills to concrete changed-path correctness, contract safety, repository-local patterns, error behavior, and proof quality.
- **Repository quality policy**: Apply each `docs/project-context/quality.yaml` dimension whose `applies_when` condition matches the change. Its `pass` condition and cited `evidence` define the accepted state.

Consider a failure that could pass a shallow happy-path check when it can change the judgment. Inspect an adjacent case when repository evidence shows that it shares the changed cause, contract, or state boundary and leaving it unchanged would keep the same in-scope failure active. Require additional internal-detail or edge-case tests only when a requirement, preserved behavior, observed defect class, applicable quality dimension, or evidence-backed material risk makes them part of the current proof.

Verify candidate problems against supporting and contradicting evidence, consolidate candidates only when one correction resolves the same cause, and choose the verdict after the review is complete.

## Correction Re-review

When `prior_feedback` is present, reconcile exactly those received items against the current implementation and governing evidence:

1. Mark an applied item `resolved` when current evidence shows the finding is satisfied and the corrected boundary remains valid; otherwise mark it `maintained` with current evidence.
2. Mark a declined item `withdrawn` when current evidence no longer supports it; otherwise mark it `maintained` with current evidence.
3. Emit exactly one `prior_feedback_reconciliation` entry for every received ID.
4. Derive the verdict only from these reconciliation entries and return the correction re-review output.

The received findings and their changed boundaries define this re-review.

## Findings Boundary

Use these categories:

- `dd_violation`: implementation contradicts an approved requirement or design contract;
- `scope_excess`: a material addition is unnecessary or not worth its lifecycle cost and can be removed or narrowed while preserving the outcome;
- `reliability`: a concrete changed-path failure remains possible under stated conditions;
- `coverage_gap`: required observable behavior or Verification Focus is not substantively proven;
- `quality_rule`: an applicable `docs/project-context/quality.yaml` pass condition is false;
- `adjacent_residual`: the same verified cause remains in an adjacent in-scope path.

Emit a finding only when correction is required because the implementation is incorrect, non-executable, non-verifiable, contradictory to a governing source, or contains a material unnecessary addition or quality-policy violation. Each finding contains one problem, file-and-line evidence, its governing basis, the observable effect, and the smallest sufficient correction.

Represent every unfulfilled acceptance criterion with one corresponding finding so Review Resolution has an actionable correction boundary.

Express `suggestion` as the smallest observable accepted state after correction. Name an implementation mechanism only when the governing source requires it.

Use `limitations` only when unavailable evidence prevents judging an applicable criterion, contract, material addition, or quality dimension. State the blocked judgment and its effect.

## Output Contract

The final message is one JSON object. During execution, progress messages may use plain text or Markdown.

Initial review:

```json
{"verdict":"pass|needs-improvement|needs-redesign|blocked","findings":[{"id":"F001","category":"dd_violation|scope_excess|reliability|coverage_gap|quality_rule|adjacent_residual","location":"file:line","description":"specific required-correction issue","basis":"governing source, quality dimension, or observed fact","effect":"observable consequence","suggestion":"smallest sufficient accepted state"}],"limitations":["unverified judgment and effect"]}
```

Correction re-review:

```json
{"verdict":"pass|needs-improvement|needs-redesign|blocked","prior_feedback_reconciliation":[{"id":"received finding ID","prior_disposition":"apply|decline","status":"resolved|withdrawn|maintained","evidence":"current evidence"}]}
```

## Verdict

- `pass`: no required-correction finding or blocked judgment remains;
- `needs-improvement`: findings are repairable within the approved scope;
- `needs-redesign`: correction requires updating the governing technical design or responsibility boundary while preserving the outcome, desired-future requirements, and non-goals;
- `blocked`: required inputs or evidence are unavailable, or evidence shows the outcome, desired-future requirements, and non-goals cannot all remain true.

## Completion Check

- [ ] The initial review chose its verdict after judging every material surface in `implementationFiles`, or the correction re-review reconciled every received item once
- [ ] Changed contracts and required proof were checked against the code and tests at file:line
- [ ] Frontend changes were judged against `references/frontend.md`, and browser E2E tests against `references/e2e.md`
- [ ] Every unfulfilled acceptance criterion has one corresponding finding
- [ ] Every emitted finding requires correction under the Findings Boundary
- [ ] Applicable repository quality dimensions were checked against their cited evidence
- [ ] Review breadth and proposed corrections remain within the approved outcome

© shinpr · MIT · shinpr/claude-code-workflows

Похожие субагенты

Все субагенты по теме «Код-ревью и рефакторинг» →

Сначала — code-reviewer от других авторов.

code-reviewer официальный Anthropic Субагент code-reviewer проверяет изменения в коде по правилам проекта из CLAUDE.md и ищет существенные дефекты. Запускайте перед коммитом или созданием PR. CX Codex 31 050установок code-reviewer официальный Anthropic Субагент code-reviewer для Claude Code проверяет изменения в коде на баги, уязвимости и нарушения правил проекта. Проводит ревью перед слиянием изменений. CX Codex 31 050установок code-reviewer VoltAgent Community Субагент code-reviewer проверяет изменения в коде на ошибки, уязвимости и проблемы поддержки. Ставьте перед слиянием сложных изменений или аудитом проекта. CX Codex 31 050установок code-reviewer ChrisWiles Субагент code-reviewer для Claude Code, который проверяет написанный или изменённый код на соответствие стандартам проекта, TypeScript strict mode и паттернам безопасности. CX Codex ★ 6 091звёзд репо code-reviewer Affaan Mustafa Субагент code-reviewer автоматически проверяет код после каждого изменения: ловит баги, уязвимости, дублирование и нарушения стиля. Запускается одной командой сразу после написания или редактирования. CX Codex ★ 6 739звёзд репо thoroughness-scoring Rohit Ghumare Скилл thoroughness-scoring обязывает ассистента оценивать инженерные решения по шкале от 1 до 10 и предпочитать надёжный код быстрым костылям. CX Codex +1 ★ 2 966звёзд репо BRD Quality Reviewer microsoft Субагент BRD Quality Reviewer автоматически проверяет требования в BRD по стандартам ISO/IEC/IEEE 29148 и ISO/IEC 25010 и формирует отчёт с рекомендациями без изменения файлов. CX Codex +1 ★ 1 627звёзд репо code-review-quality proffesor-for-testing Скилл code-review-quality для Claude Code разбирает изменения кода с упором на ошибки, безопасность и тестируемость. Его можно вызвать для ревью PR или настройки правил обратной связи. CX Codex +1 1 600установок gjalla-code-review gjalla Скилл gjalla-code-review проверяет PR и диффы перед слиянием с позиций архитектора, инженера по безопасности и QA. Группирует замечания по степени критичности. CX Codex +1 865установок code-review jwynia Скилл code-review для Claude Code помогает искать дефекты и оценивать качество кода. Он включается по просьбе проверить код, подготовить PR или провести ревью. CX Codex +1 505установок quality-checks dev-toolings Скилл quality-checks запускает PHP-CS-Fixer для стиля кода, PHPStan для статического анализа и проверки типов. Используй перед коммитом или когда CI падает на качество. CX Codex +1 ★ 234звёзд репо

Из того же набора43

Весь набор →
ui-spec-designer Субагент ui-spec-designer для Claude Code превращает требования к интерфейсу в спецификацию экранов, состояний и компонентов. Запускается при проектировании фронтенда или запросе на разбиение UI на компоненты. CX Codex ★ 720звёзд репо integration-test-reviewer Субагент integration-test-reviewer ревьюит изменённые интеграционные и E2E-тесты: доказывают ли они заявленное поведение. На выходе только существенные пробелы и минимальные правки. CX Codex ★ 720звёзд репо coding-principles Скилл coding-principles для Claude Code задаёт принципы читаемого и поддерживаемого кода. Подключается при реализации функций, рефакторинге и проверке качества кода. CX Codex +1 ★ 720звёзд репо recipe-design Скилл recipe-design для Claude Code координирует проектирование архитектуры от анализа кодовой базы до утверждения Design Doc. Процесс включает промежуточные остановки для подтверждения решений человеком. CX Codex +1 ★ 720звёзд репо solver Субагент solver подбирает несколько вариантов исправлений для подтверждённой причины бага и сравнивает компромиссы. Помогает выбрать оптимальный путь без повторного расследования. CX Codex ★ 720звёзд репо design-sync Субагент design-sync сопоставляет Design Docs, находит противоречия в общих требованиях и выдаёт структурированный отчёт. Запускайте его, когда нужно проверить согласованность нескольких документов. CX Codex ★ 720звёзд репо security-reviewer Субагент security-reviewer сверяет готовый код с требованиями безопасности проекта и отдаёт только те замечания, которые обязательно надо закрыть. CX Codex ★ 720звёзд репо implementation-approach Скилл implementation-approach для Claude Code помогает выбрать стратегию реализации и критерии проверки. Он включается при планировании изменений и сравнении вариантов. CX Codex +1 ★ 720звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой