agentleFS
bordenetbordenet/superpowers-plus/skills/engineering/requesting-code-review/skill.md

requesting-code-review

Skill8 starsChanged 7 months agoMITView on GitHub

Use when presenting code changes to a human for review — dispatches code-review-battery. Self-fires on intent to present (see Cardinal Rule in skill body). Skips battery dispatch if valid sentinel exists for clean HEAD. Always runs battery before presenting, never after.

155 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, workflow-runner and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 projects that use this

  • MorningStar0709Skill

    workflow-runner

    Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.

    Also in 5 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • kevinnftSkill

    touchdesigner-mcp

    Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.

    Also in 7 projects that use this

  • aivrarSkill

    sdlc-review

    Review Kanban handoffs and route verified outcomes.

    Also in 5 projects that use this

  • braxtonROSE4Skill

    songwriting-and-ai-music

    Songwriting craft, AI music generation prompts (Suno focus), parody/adaptation techniques, phonetic tricks, and lessons learned. These are tools and ideas, not rules. Break any of them when the art calls for it.

    Also in 11 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 5 are common, 6 are distinctive, and 3 are very specific to this project.

  • 5

    Common

    Most of the 146 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every message that presents work to the human for review MUST open with the clearance line:

    line 78
  2. Distinctive:

    If you cannot produce this line, you have not run battery on HEAD.

    line 85
  3. Distinctive:

    If battery has not run: Run it now, before writing a single word of the response.

    line 105
  4. Distinctive:

    Before presenting ANY work as "ready/done/complete" to a human

    line 114
  5. Distinctive:

    After completing a major feature or bug fix

    line 115
  6. Common:

    Before merge to main

    line 116
  7. Distinctive:

    Before offering to commit, push, or create a PR

    line 117
  8. Common:

    After each task in subagent-driven development

    line 118
  9. Common:

    When stuck (fresh perspective)

    line 121
  10. Common:

    Before refactoring (baseline check)

    line 122
  11. Common:

    After fixing a complex bug

    line 123
  12. Very specific:

    Follow the code-review-battery procedure:

    line 137
  13. Very specific:

    Dispatch: all activated reviewers in parallel via sub-agent-code-reviewer

    line 140
  14. Very specific:

    Only proceed to presenting work as "ready" when battery verdict is PASS or PASS_WITH_NITS (with nits fixed).

    line 155

“Common” is measured: kept by at least 6 in 10 of the 146 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
skill.md

Wrong skill? Pre-commit/push → unified-commit-gate. Reviewing someone else's PR → providing-code-review. Implementing feedback you received → receiving-code-review. Inter-agent file handoff → inter-agent-review-protocol.

Requesting Code Review

Dispatch code-review-battery to catch issues before they cascade. The battery dispatches up to 7 specialist reviewers in parallel — each focused on a distinct set of review dimensions — producing deeper analysis than any single-pass review.

Core principle: Review early, review often.

🔴 Before Asking the Human to Review

Apply this protocol whenever you are about to show a human your work — PR links, summaries, "here's what I built," "please review my changes." Run this check before writing that message.

Step 1 — Read the sentinel, HEAD SHA, and worktree state:

SENTINEL="$(git rev-parse --show-toplevel 2>/dev/null || echo .)/.code-review-cleared"
cat "$SENTINEL" 2>/dev/null || echo "NO CLEARANCE"
echo "HEAD: $(git rev-parse HEAD 2>/dev/null || echo 'unknown')"
git diff --quiet && git diff --cached --quiet && echo "WORKTREE_CLEAN" || echo "WORKTREE_DIRTY"

Step 2 — Decide:

ResultAction
NO CLEARANCESTOP. Run code-review-battery first. Do not write the review request.
Sentinel SHA ≠ HEAD SHASTOP. Changes were made after last review. Re-run code-review-battery.
Sentinel valid for HEAD but WORKTREE_DIRTYSTOP. Staged/unstaged changes exist that battery didn't review. Commit or stash, then re-run battery.
v1|SHA|PASS|... or PASS_WITH_NITS, SHA matches HEAD, AND WORKTREE_CLEANProceed — include the clearance line in your message (see Step 3)
Anything elseSTOP. Sentinel is malformed. Delete .code-review-cleared, re-run battery.

Step 3 — Include the clearance in your human-facing message:

Every message that presents work to the human for review MUST open with the clearance line:

🔍 Review cleared: PASS | SHA: abc12345 | 2026-04-02T21:29Z

This is not optional decoration. It lets the human verify at a glance that battery ran on exactly the code being reviewed. If you cannot produce this line, you have not run battery on HEAD. Run it now.

🔴 The Cardinal Rule

The INTENT TO PRESENT is the trigger — not the words you use.

The moment you are forming a response to the human that describes code you wrote — that is the trigger. Before the words exist. Not after you say "done". Before you start writing the sentence.

This applies unconditionally. No threshold for simplicity. No exception for small fixes. No exception for "the user will just look at the diff themselves." Every response. Every time.

Internal state (INTENT)Required gate
Forming a response that describes code changesBattery must have PASSED
About to commit or pushBattery must have PASSED; sentinel must exist
About to share an MR/PR linkSentinel must exist for HEAD
About to write a completion summaryBattery must have PASSED
ANY moment of transitioning from "working" to "reporting"This IS the trigger. There is no hesitation threshold.

If battery already ran and sentinel exists for HEAD: Evidence confirmed. Do not re-dispatch. Note the clearance and proceed.

If battery has not run: Run it now, before writing a single word of the response.

The autonomous review is not the human's job to request. You must do it yourself, every time, before the response is formed.

Why this rule exists: See the 2026-04-02b incident in verification-before-completion Incident History. The gate failed because the implementation→reporting transition was not recognized as a trigger despite an explicit incident log entry from earlier the same session. The fix: trigger on INTENT, not on output language.

When to Use / When to Request Review

Always (hard gates):

  • Before presenting ANY work as "ready/done/complete" to a human
  • After completing a major feature or bug fix
  • Before merge to main
  • Before offering to commit, push, or create a PR
  • After each task in subagent-driven development

Also valuable:

  • When stuck (fresh perspective)
  • Before refactoring (baseline check)
  • After fixing a complex bug

How to Request

1. Gather context

BASE_SHA=$(git merge-base HEAD main)   # or origin/dev, origin/main
HEAD_SHA=$(git rev-parse HEAD)
git diff $BASE_SHA..$HEAD_SHA          # the diff to review

2. Dispatch code-review-battery

Follow the code-review-battery procedure:

  1. Triage the diff → select relevant specialist reviewers
  2. Dispatch all activated reviewers in parallel via sub-agent-code-reviewer
  3. Each reviewer gets: reviewer prompt + full diff + source context (callers, field readers, state types)
  4. Aggregate findings → triple-filter → classify Implement/Defer/Reject

3. Act on findings

SeverityAction
CriticalFix immediately. Re-dispatch battery.
ImportantFix before proceeding. Re-dispatch if >1 fixed.
MinorFix now or document for follow-up.
Reviewer wrongPush back with technical reasoning and evidence.

4. Confirm verdict

Only proceed to presenting work as "ready" when battery verdict is PASS or PASS_WITH_NITS (with nits fixed).

Integration with Workflows

WorkflowWhen to Review
Subagent-driven developmentAfter EACH task — catch issues before they compound
Feature developmentAfter implementation, before presenting options
Ad-hoc developmentBefore merge or when stuck
Finishing a branchStep 0 of finishing-a-development-branch dispatches code-review-battery directly

Anti-Patterns

WrongRight
Skipping review because "it's simple"Complexity doesn't determine risk
Ignoring Critical findingsCritical = broken if shipped
Proceeding with unfixed Important findingsFix first, then re-dispatch
Arguing with valid technical feedbackPush back only with evidence
Presenting work as "ready" then reviewingReview first, present second

Companion Skills

  • code-review-battery: The review engine this skill dispatches
  • progressive-code-review-gate: Fires at commit time (uses battery) — handles "ready to commit/push" triggers
  • verification-before-completion: Completion gate that requires review evidence
  • providing-code-review: Engineering rigor checklist (informs reviewer focus)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.