ワンクリックで
requesting-code-review
Use before opening a PR. Prepares context for code review and dispatches a reviewer subagent.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use before opening a PR. Prepares context for code review and dispatches a reviewer subagent.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Check for drift between spec.md, plan.md, tasks.md, and the actual code. Reports the gaps; does not fix them.
Run a category-specific quality pass (security / performance / accessibility / i18n / privacy / observability) against the current plan and code.
Surface [NEEDS CLARIFICATION] markers in spec.md (or plan.md) to the user, one at a time, and edit the file with the answers.
Bootstrap or amend constitution.md (framework, preset, or project). Inspects existing project context first; enforces the amendment process: issue first, one article per PR, reviewer non-author.
Print the pipeline quick-reference — a one-screen summary of every /aia:* command and its hand-offs, prefixed by a state-aware "Próximo passo" line.
Execute an approved plan + tasks list by dispatching one fresh subagent per task and applying two-stage review (spec compliance, then code quality) before moving on.
| name | requesting-code-review |
| description | Use before opening a PR. Prepares context for code review and dispatches a reviewer subagent. |
Prepare and execute a structured code review before merging any branch.
Announce at start: "Using requesting-code-review skill. Preparing review context."
Before dispatching the reviewer:
pytest (backend) + npx jest (frontend/mobile)npx tsc --noEmitruff check . (backend) / npm run lint (frontend)python manage.py showmigrations | grep "\[ \]"- [ ] in plan)Create specs/YYYY-MM-DD-<feature>/review-context.md:
# Code Review Context: <Feature Name>
## What Was Built
[2-3 sentences describing the feature]
## Spec Reference
- Spec: `specs/YYYY-MM-DD-<feature>/spec.md`
- Plan: `specs/YYYY-MM-DD-<feature>/plan.md`
## Changed Files
<git diff --stat output>
## Key Decisions Made
- [Decision 1 and why]
- [Decision 2 and why]
## Areas Needing Attention
- [Any complexity, trade-offs, or areas where reviewer should look carefully]
## Test Coverage
- Backend: [pytest output summary]
- Frontend: [jest output summary]
- Manual verification: [what was manually tested]
Use the code-reviewer agent with the review context document.
Never pass session history — always craft a focused review prompt:
You are a code reviewer for a Django 5.2 + React 18 + TypeScript project.
Review the changes described in: <path to review-context.md>
Full diff:
<git diff output>
Check for:
1. Spec compliance — do changes fulfill the spec's acceptance criteria?
2. Security — SQL injection, IDOR, XSS, unencrypted sensitive data?
3. Django patterns — N+1 queries, missing select_related, transaction safety?
4. TypeScript — any types, missing null checks, proper error handling?
5. Celery tasks — idempotency, retry logic, transaction.on_commit usage?
6. Tests — adequate coverage of the spec scenarios? Edge cases?
7. Complexity — unnecessary abstractions, YAGNI violations?
Return: APPROVED or CHANGES_REQUESTED with specific issues and suggested fixes.
Once the reviewer returns a verdict, write .aiadev/review.yaml at the repo root so finishing-a-branch can verify approval. Schema:
status: approved # or: changes_requested
timestamp: 2026-04-21T12:34:56Z # ISO-8601 UTC
reason: <one line> # required only when status: changes_requested
aiadev preflight finishing-a-branch reads this file and aborts unless status: approved.
Write .aiadev/review.yaml with status: approved and a UTC timestamp:. Then proceed to finishing-a-branch.
Write .aiadev/review.yaml with status: changes_requested, a timestamp:, and a one-line reason:. For each issue:
Do not re-review unchanged files — focus the re-review on what changed.
Story 3 of specs/0014-bmad-inspired-evolutions/spec.md adds the
zero-findings-halt rule for the code-reviewer agent. The agent-side
contract (the ### Why no issues block on APPROVED) lives in
agents/code-reviewer.md under "Output rule for APPROVED on non-trivial
change". The orchestrator-side counterpart — detecting violations and
re-dispatching — lives HERE.
This skill dispatches the reviewer for the full branch (not per task), so the gate runs once per review pass:
APPROVED, parse
the rest of the response.### Why no issues block. A valid response has
either a ### Why no issues H3 with ≥ 3 bullet items each in the
shape <file:line> — <verification>, OR (in terse-mode, see
.claude/rules/terse-mode.md) ≥ 3 lines starting with the green
glyph 🟢 file:line — verification. Anything else is a missing
block.main:
git diff --shortstat --ignore-blank-lines main...HEAD > 10 LOC
after dropping .md, .json, .lock, .toml, and any path under
docs/. Spec/plan creation under specs/<branch>/{spec,plan}.md is
ALWAYS non-trivial. The helper
aiadev.review_log.is_non_trivial_change implements this exactly;
aiadev preflight requesting-code-review exposes the same check
from the CLI and is the recommended way to surface it before this
skill dispatches anything.specs/<branch>/.review-log.jsonl
regardless of verdict. Shape:
{"timestamp": <ISO-8601 UTC>, "reviewer": "code-reviewer", "verdict": "APPROVED"|"CHANGES_REQUESTED", "has_why_no_issues_block": <bool>, "task_id": "branch-review"}.
Use aiadev.review_log.append_review_entry. The task_id field is
set to a stable sentinel ("branch-review") at this layer because
the dispatch is branch-scoped, not task-scoped.APPROVED,
the branch is non-trivial, and the ### Why no issues block is
missing, dispatch the SAME code-reviewer agent again with
reinforced adversarial framing. The second prompt MUST escalate to
something like: "You approved without justifying. Assume there is at least one bug
and either show it OR justify the absence by category (security,
performance, spec compliance, tests, complexity)." See
agents/code-reviewer.md for the canonical wording.WARNING: reviewer exhausted re-dispatch budget without justification
line to .review-log.jsonl and proceed to "Recording the review
verdict" below. Plan ADR-4 calls this out as the loop-prevention
guarantee.APPROVED verdict silently and do not re-dispatch. Story 3 sc3
exists to keep noise out of pure-docs branches and similar no-ops.Before sending to reviewer, ask yourself:
If yes to any — fix first, then request review.