rse/ase / plugin/skills/ase-repo-review
ase-repo-review
VerifiedPerform a holistic, human-reviewer-style critique of the currently staged Git changes (or, with `--unstaged`, of the unstaged and untracked changes, with `--branch`, of a branch against its base, or, with `--commit`, of a single commit) and emit an approve/reject verdict with prioritized, severity-tagged, line-cited findings. Use when the user wants the staged diff, a branch, or a commit "reviewed", "critiqued", or "code-reviewed".
@${CLAUDE_SKILL_DIR}/../../meta/ase-control.md @${CLAUDE_SKILL_DIR}/../../meta/ase-skill.md @${CLAUDE_SKILL_DIR}/../../meta/ase-getopt.md
$ARGUMENTS
Procedure
-
-
Set to the uncommitted changes to review: to
staged and unstagedif both and are equaltrue, tostagedif only is equaltrue, tounstagedif only is equaltrue, and to empty otherwise. Here, theunstagedchanges always include the untracked files. -
-
Run the command
git rev-parse --verify --quiet "<getopt-option-branch/>^{commit}". If it fails, only output the following and then STOP immediately: -
Determine the candidate base branches by running the command
git for-each-ref --format="%(refname:short)" refs/heads/(taken exactly as given), excluding itself. For each , run the commandgit rev-list --count "<candidate/>..<getopt-option-branch/>"to count the commits of the branch since its fork point from , and drop every candidate with a count of0, as it already contains the branch. Set to the remaining candidate with the smallest count (the nearest fork point); on a tie, prefer the checked-out branch (the output ofgit branch --show-current), and then the first candidate. If no candidate remains, only output the following and then STOP immediately: -
Run the command
git merge-base "<base/>" "<getopt-option-branch/>"and capture its output into . -
Only output the following :
-
-
Determine whether there are changes at all by running the corresponding command(s) (taken exactly as given) and capturing their combined output - the bare list of changed file names - into . This is a lightweight gate; the full diff is fetched by the sub-agent in STEP 2, so capturing only the file-name list here is sufficient:
If is not empty, set branch since base commit plus the changes in worktree and run:
-
If is equal
staged and unstaged:git -C "<worktree-dir/>" diff --name-only "<base-commit/>"git -C "<worktree-dir/>" ls-files --others --exclude-standard -
If is equal
staged:git -C "<worktree-dir/>" diff --cached --name-only "<base-commit/>" -
If is equal
unstaged:git diff --name-only "<base-commit/>..<getopt-option-branch/>"git -C "<worktree-dir/>" diff --name-onlygit -C "<worktree-dir/>" ls-files --others --exclude-standard
From the output of the
ls-filescommand, skip every listed entry below the.ase/directory -- it carries ASE's own state, and hence is never part of the user's change set.Otherwise, set branch since base commit and run:
git diff --name-only "<base-commit/>..<getopt-option-branch/>"Set branch since base commit and run:git diff --name-only "<base-commit/>..<getopt-option-branch/>"Set commit and run:git show --format= --name-only --diff-merges=first-parent "<commit-id/>"Set staged and unstaged and run:git diff --name-only HEADgit ls-files --others --exclude-standardFrom the output of the second command, skip every listed entry below the
.ase/directory -- it carries ASE's own state, and hence is never part of the user's change set. Set unstaged and run:git diff --name-onlygit ls-files --others --exclude-standardFrom the output of the second command, skip every listed entry below the
.ase/directory -- it carries ASE's own state, and hence is never part of the user's change set. Set staged and run:git diff --cached --name-only HEAD -
-
-
The project source artifacts are classified as a black box, so the user does not want the changes scrutinized or their findings surfaced (an explicitly given severity floor lifts this skip). Skip the entire review investigation: do not invoke the
Agenttool and do not read any change, set to the empty list, set to0, set toSKIPPED (boxing: black), set to a one-line neutral restatement of the change intent derived solely from STEP 1, and proceed directly to STEP 3.First, use the following to give a hint on this step:
Dispatch the review investigation to a sub-agent via the
Agenttool so that no investigation details leak into the user-visible transcript. The sub-agent performs the silent reading, the read-only repository probing, and the critique; only its final structured return value is consumed here.Set thorough if is equal
true, and focused otherwise.For this, invoke exactly once the tool:
Agent( description: "Review Investigation", subagent_type: "ase:ase-repo-review", prompt: "Review in <mode/> mode the changes of scope: <scope/>", run_in_background: false )Parse the single result message of the
Agenttool as a JSON object, set to itssummaryfield (a single crisp sentence reconstructing the change's intent), and set to itsfindingsfield (a list).Then derive the overall from : set to
REJECT - DEMANDS CHANGESif any finding in has aseverityfield ofHIGH; otherwise set toAPPROVE. The verdict is derived before the severity floor below, so the floor only affects which findings are rendered, never the verdict.Then determine the effective severity floor and its origin : define the ordinal rank
LOW=1,MEDIUM=2,HIGH=3.Then apply the effective severity floor : Keep a finding in if and only if its
severityfield isACCEPTEDorrank(severity)is greater than or equal torank(<floor/>); drop all other findings, but set to the number of dropped findings. With the floorLOW, all findings are kept.ACCEPTEDfindings are never dropped. The floor affects only which findings are rendered, never the derived above.You MUST NOT output anything else in this STEP 2.
-
-
Use the following to output the overall review in and the reconstructed intent :
REVIEW VERDICT:
CHANGE INTENT:
You MUST NOT output anything else in this STEP 3.1.
-
NO FINDINGS: , nothing to flag.
-
Then render a three-column table with one row per finding by using the following output . For each finding, repeat the third line, set to its
severityfield, set to itsdimensionfield, set to itslocationfield, and set to itsfindingfield.In the column, mark up the
file:linereference as code (with backticks) and prepend it with▢- keep the sub-agent's own:N/:N-Mline citation intact and do not append any further line-count decoration.Because the text is free-form Markdown, before emitting any row you MUST escape every literal
|pipe character inside and as\|so it cannot break the table column structure.Keep the overall report concise and brief. Do not output any further explanation.
-
HIDDEN FINDINGS: finding(s) below severity suppressed ().
-
Finally, give the closing hints by expanding the following (which, depending on the configured , may expand into nothing and hence emit no output at all):
-
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |