agentleFS
MorningStar0709MorningStar0709/trae-agent-enhancements/skills/requesting-code-review/SKILL.md

requesting-code-review

Skill18 starsChanged 7 months agoMITView on GitHub

Use when you need an independent code review before commit, merge, or task handoff, including Chinese requests such as “帮我 review”“合并前审一下”“看看这次改动有没有问题”. Do not use for from-scratch implementation work with no reviewable diff yet, or when the user only wants a code explanation instead of a risk-focused review.

155 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnosing-superpowers, touchdesigner-mcp and 8 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

  • 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

  • braxtonROSE4Skill

    heartmula

    Set up and run HeartMuLa, the open-source music generation model family (Suno-like). Generates full songs from lyrics + tags with multilingual support.

    Also in 7 projects that use this

  • john-data-chenSkill

    teams-meeting-pipeline

    Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

    Also in 8 projects that use this

  • +3 more from braxtonROSE4

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 146 edited versions we read keep these.

  • 12

    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:

    After completing a major feature.

    line 16
  2. Distinctive:

    After fixing a complex bug.

    line 17
  3. Distinctive:

    Before merging or committing.

    line 18
  4. Distinctive:

    After a subagent or batch task finishes, when you want an independent gate check.

    line 19
  5. Very specific:

    If origin/$DEFAULT_BRANCH does not exist, fall back to the last stable baseline or the commit from the previous task.

    line 59
  6. Distinctive:

    If using a subagent, provide the full context, not just "please review".

    line 63
  7. Distinctive:

    When providing feedback to a Chinese-speaking user, adopt a constructive, polite, and inquiry-based tone:

    line 88
  8. Distinctive:

    Use suggestions instead of commands (e.g., "建议考虑用 X,因为 Y" instead of "你必须改成 X").

    line 89
  9. Distinctive:

    Use questions instead of negations when unsure of intent (e.g., "这里用 sync 是出于什么考虑?" instead of "不应该用 sync").

    line 90
  10. Distinctive:

    Always classify findings by severity:

    line 92
  11. Distinctive:

    If the review judgment is wrong: Provide evidence to refute it.

    line 98
  12. Very specific:

    Prefer using independent review capabilities available in the current environment.

    line 102
  13. Distinctive:

    If no suitable review subagent is available, perform a self-review in the current session using the same standards, maintaining a …

    line 103
  14. Distinctive:

    Use PowerShell-compatible commands when getting git information on a Windows host.

    line 104
  15. Very specific:

    If no issues found, explicitly route to verification-before-completion before proceeding to commit.

    line 121

“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

Overview

Request an independent code review for the current changes before continuing development, committing, or merging.

Core Principle: The earlier the review, the cheaper the fix.

Use This Skill

  • After completing a major feature.
  • After fixing a complex bug.
  • Before merging or committing.
  • After a subagent or batch task finishes, when you want an independent gate check.
  • The user explicitly asks for a review, code review, or to check the changes.

Do Not Use

  • The current task is a from-scratch implementation with no reviewable diff yet.
  • The user is asking how to handle received feedback; use receiving-code-review instead.
  • The user only wants to understand the code, not review its quality and risks.
  • The change is extremely small and involves no behavioral changes; a simple self-check is enough.

Execution Protocol

1. Determine Review Scope

Provide a clear scope for the changes rather than a vague "please take a look".

Common scopes:

  • Changes after a single task completes.
  • The diff of a feature branch relative to the base branch.
  • The most recent commit.
  • A few specific key files.

2. Gather Review Context

Prepare at least the following information:

  • What was changed.
  • Why it was changed.
  • The corresponding requirement, plan, or bug.
  • The git scope to review.
  • Which validations have already been run.

PowerShell example:

# Detect default branch dynamically instead of hardcoding origin/main
$DEFAULT_BRANCH = git remote show origin | Select-String "HEAD branch" | ForEach-Object { $_ -replace '.*HEAD branch: ', '' }
if (-not $DEFAULT_BRANCH) { $DEFAULT_BRANCH = "main" }
$BASE_SHA = git merge-base HEAD "origin/$DEFAULT_BRANCH"
$HEAD_SHA = git rev-parse HEAD
git diff --stat $BASE_SHA..$HEAD_SHA

If origin/$DEFAULT_BRANCH does not exist, fall back to the last stable baseline or the commit from the previous task.

3. Initiate Independent Review

If using a subagent, provide the full context, not just "please review".

First, use discovering-subagent-capabilities to discover available subagents at runtime. Match the subagent whose description best fits code review. The subagent name is dynamic — do not assume a fixed value.

The Task call should follow this pattern:

Task(
  description="审查<模块名>",
  query="<完整审查指令>",
  subagent_type="<discovered dynamically>",
  response_language="zh-CN"
)

The subagent is stateless and returns exactly once — the query must contain everything needed.

The prompt should include:

  • Implementation summary.
  • Requirement or plan source.
  • BASE_SHA / HEAD_SHA.
  • Risk areas or specific aspects to focus on.
  • Template: requesting-code-review/code-reviewer.md.

Review Standards

When providing feedback to a Chinese-speaking user, adopt a constructive, polite, and inquiry-based tone:

  • Use suggestions instead of commands (e.g., "建议考虑用 X,因为 Y" instead of "你必须改成 X").
  • Use questions instead of negations when unsure of intent (e.g., "这里用 sync 是出于什么考虑?" instead of "不应该用 sync").

Always classify findings by severity:

  • [必须修复] (Critical): Security vulnerabilities, data loss risks, logical errors. Fix first, then continue.
  • [建议修改] (Important): Performance issues, maintainability, missing validation. Usually should be fixed before continuing.
  • [仅供参考] (Minor): Naming improvements, style suggestions, alternative approaches. Record and fix when convenient.
  • [问题] (Question): Unclear intent, need clarification from the author.
  • If the review judgment is wrong: Provide evidence to refute it; do not argue emotionally.

Trae / Windows Conventions

  • Prefer using independent review capabilities available in the current environment; in this environment, use discovering-subagent-capabilities first to find the review-capable subagent, then dispatch with Task.
  • If no suitable review subagent is available, perform a self-review in the current session using the same standards, maintaining a "findings-first" report structure.
  • Use PowerShell-compatible commands when getting git information on a Windows host.
  • Once review conclusions are ready, hand off to receiving-code-review if fixes need to be applied based on the feedback.

Failure Handling

  • No git baseline: Switch to file-level review and explicitly state the scope limits.
  • No independent subagent: Self-review in the current session, but keep the findings-first output.
  • Review scope too large: Break it into multiple independent scopes to avoid reviewing too much at once.
  • Unclear conclusions: Return to receiving-code-review to clarify before implementing.

Output Contract

The final output must include:

  • The scope that was reviewed.
  • The context provided to the reviewer.
  • The review findings categorized by severity.
  • Recommended next steps (e.g., fix critical issues, proceed to commit).
  • If no issues found, explicitly route to verification-before-completion before proceeding to commit.

Integration

  • verification-before-completion: Upstream — review starts after verification evidence is collected.
  • receiving-code-review: Downstream — how to validate, clarify, and apply feedback after receiving it.
  • verification-before-completion: Downstream — final validation after review feedback is fixed.
  • code-reviewer.md: The independent review prompt template.

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.