agentleFS
osmonteroosmontero/opencode-skills/skills/requesting-code-review/SKILL.md

requesting-code-review

Skill14 starsChanged 4 months agoMITView on GitHub

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

155 other projects use a version of this, 115 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

We split this skill into the rules it gives an agent

10 rules. 6 are common, 3 are distinctive, and 1 is very specific to this project.

  • 6

    Common

    Most of the 146 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Common:

    After each task in subagent-driven development

    line 16
  2. Common:

    After completing major feature

    line 17
  3. Common:

    Before merge to main

    line 18
  4. Very specific:

    When the change touches security-relevant code — untrusted input, authn/authz, secrets, injection sinks, subprocess/plugin boundaries, or …

    line 19
  5. Common:

    When stuck (fresh perspective)

    line 22
  6. Common:

    Before refactoring (baseline check)

    line 23
  7. Common:

    After fixing complex bug

    line 24
  8. Distinctive:

    REQUIRED SUB-SKILL: Use receiving-code-review before implementing any suggestion.

    line 141
  9. Distinctive:

    Reviewing before committing: No stable range to diff, and the reviewer may see a half-saved state.

    line 174
  10. Distinctive:

    Treating the review as a formality: If every review returns "approved, no issues", either the prompt is biasing it or the wrong reviewer is …

    line 178

“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

Requesting Code Review

Dispatch code-reviewer sub-agent using the task tool to catch issues before they cascade. The reviewer gets precisely crafted context for evaluation — never your session's history. This keeps the reviewer focused on the work product, not your thought process, and preserves your own context for continued work.

Core principle: Review early, review often.

When to Request Review

Mandatory:

  • After each task in subagent-driven development
  • After completing major feature
  • Before merge to main
  • When the change touches security-relevant code — untrusted input, authn/authz, secrets, injection sinks, subprocess/plugin boundaries, or new dependencies (dispatch security-reviewer)

Optional but valuable:

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

How to Request

1. Get git SHAs:

BASE_SHA=$(git rev-parse HEAD~1)  # or origin/main
HEAD_SHA=$(git rev-parse HEAD)

2. Dispatch code-reviewer, code-quality-reviewer, or security-reviewer global agent using the task tool:

The code-reviewer, code-quality-reviewer, and security-reviewer agents are registered globally with appropriate review checklists. Invoke with context about what was implemented, plan reference, and git diff range. The agent will use git diff {BASE_SHA}..{HEAD_SHA} to inspect changes.

Context to include in your Task tool prompt:

  • What you just built (brief summary)
  • What it should do (plan or requirements reference)
  • Starting commit SHA (BASE_SHA)
  • Ending commit SHA (HEAD_SHA)

3. Act on feedback:

  • Fix Critical issues immediately
  • Fix Important issues before proceeding
  • Note Minor issues for later
  • Push back if reviewer is wrong (with reasoning)

Example

[Just completed Task 2: Add verification function]

You: Let me request code review before proceeding.

BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
HEAD_SHA=$(git rev-parse HEAD)

[Dispatch code-reviewer sub-agent using the `task` tool]
  WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
  PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
  BASE_SHA: a7981ec
  HEAD_SHA: 3df7661
  DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types

[Sub-agent returns]:
  Strengths: Clean architecture, real tests
  Issues:
    Important: Missing progress indicators
    Minor: Magic number (100) for reporting interval
  Assessment: Ready to proceed

You: [Fix progress indicators]
[Continue to Task 3]

Integration with Workflows

Subagent-Driven Development:

  • Review after EACH task
  • Catch issues before they compound
  • Fix before moving to next task

Executing Plans:

  • Review after each batch (3 tasks)
  • Get feedback, apply, continue

Ad-Hoc Development:

  • Review before merge
  • Review when stuck

Choosing the Reviewer

AgentUse whenRefuses to
spec-reviewerImmediately after implementation — does the code match the spec, nothing more, nothing less?Comment on style or quality
code-quality-reviewerAfter spec compliance passes — decomposition, naming, error handling, test qualityRe-litigate scope
security-reviewerWhen the change touches untrusted input, authn/authz, secrets, injection sinks, subprocess/plugin boundaries, or new dependencies — after spec and quality passReport findings without a traced input-to-impact path
code-reviewerEnd of a feature or before merge — production readiness across the whole change—
reviewing-interface-quality (skill)The change includes user-facing UI—

Order matters. Run spec compliance first, then code quality, then security, then the final production-readiness review. Running quality review before spec compliance wastes effort polishing code that may not be what was asked for; running security before spec compliance audits behavior that may be wrong on purpose. See subagent-driven-development.

Writing the Dispatch Prompt

The reviewer starts with no context. What you write is everything they know — never your session history. A reviewer given a vague prompt returns vague findings.

The prompt contains, in this order:

  1. What was built — two sentences
  2. What it should do — the requirement or plan task text, pasted in full, not a file reference
  3. The diff range — BASE_SHA and HEAD_SHA
  4. Where to look — the files that changed
  5. What you already know — deviations you made, and why
  6. What you want back — the report format

Paste the requirement text. Telling the reviewer to read docs/plans/x.md costs a tool call and risks them reading the wrong task. You already have the text.

Do not tell them what you think. "I think the error handling is solid" biases the review toward agreement. State facts, ask for findings.

Review the implementation of Task 2 from the auth plan.

REQUIREMENT (verbatim from the plan):
  Add verifyIndex() and repairIndex() to src/index/verify.ts. verifyIndex()
  returns a list of issues across 4 types: orphaned, stale, duplicate,
  missing. repairIndex() fixes each type. Report progress every 100 items.

DIFF: git diff a7981ec..3df7661
FILES: src/index/verify.ts, src/index/types.ts, tests/index/verify.test.ts

KNOWN DEVIATION: used a WeakMap rather than the Map the plan specified,
so entries are collected with their request objects. Behavior identical.

Return: PASS or FAIL with file:line references for each finding.

Acting on Feedback

REQUIRED SUB-SKILL: Use receiving-code-review before implementing any suggestion. Reviewers are sometimes wrong, and blind implementation of a wrong suggestion is worse than no review.

SeverityAction
CriticalFix before doing anything else
ImportantFix before the next task
MinorNote it; fix if cheap, defer if not

Then re-review. A reviewer that found issues has not approved the fixes. Re-dispatch with the same context plus what changed. Skipping the re-review is how "fixed" issues survive to merge.

Red Flags

Never:

  • Skip review because "it's simple"
  • Ignore Critical issues
  • Proceed with unfixed Important issues
  • Argue with valid technical feedback
  • Make the reviewer read the plan file instead of pasting the task text
  • Include your own assessment in the prompt (biases the review)
  • Accept a fix as done without re-review
  • Review uncommitted work — commit first so the diff range is real

If reviewer wrong:

  • Push back with technical reasoning
  • Show code/tests that prove it works
  • Request clarification

Common Mistakes

Dispatching with session context. The reviewer inherits your assumptions and reviews your reasoning rather than the code.

No diff range. The reviewer reads the whole file and comments on pre-existing code that is not part of this change.

Reviewing before committing. No stable range to diff, and the reviewer may see a half-saved state.

One reviewer for both spec and quality. They are different questions and merging them means the scope question gets less attention than it needs.

Treating the review as a formality. If every review returns "approved, no issues", either the prompt is biasing it or the wrong reviewer is being used.

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.