Review

From tetherto/qvac · View interactive version

Review is an AI agent skill from the GitHub repository tetherto/qvac. Run a comprehensive code review with 4 specialized reviewers (security, correctness, performance, consistency) in parallel.

How to use this skill

Skill file

Code Review

Run a comprehensive code review using 4 specialized review agents: security, correctness, performance, and consistency.

Usage

/review              # review current branch changes vs main
/review #1561        # review a PR by number
/review branch-name  # review a specific branch vs main
/review --only security,correctness  # run only specific reviewers
/review #1561 --depth max            # maximum-depth pass (every reviewer on the session model)

Arguments

Workflow

Step 1: Determine review target

Parse $ARGUMENTS to determine the review target:

Extract --only flag if present to filter which reviewers to launch.

Extract --depth flag if present. If absent, read review.depth from packages/ocr-ggml/.agent/config.json; if the file or field is missing, use standard.

Determine the session model family — the model this session is itself running on — from the session's own model identity (Claude Code states it in context, e.g. "powered by the model named Opus 5", exact ID claude-opus-5[1m] → family opus). Map it to one of haiku, sonnet, opus, fable. If it cannot be determined, skip the clamping in Step 3 and use the table defaults as-is.

Step 2: Get the diff

PR review mode:

gh pr diff <number> --repo tetherto/qvac
gh pr view <number> --repo tetherto/qvac --json title,body,commits,headRefOid,headRefName,baseRefName

Branch review mode:

git diff main...<branch>
git log main..<branch> --oneline
git rev-parse <branch>

Current branch mode:

git diff main...HEAD
git log main..HEAD --oneline
git rev-parse HEAD

If the diff is empty, report "No changes to review" and stop.

Record the exact commit reviewed. Keep headRefOid (or the git rev-parse output) — it goes in the

report header in Step 5. Findings cite file:line as the file reads at that commit, so without the SHA

nobody can later tell a stale line number from a fixed finding.

Step 3: Launch specialized reviewers in parallel

Launch the selected review agents in parallel as sub-agents.

For each agent, set:

Model per reviewer and depth:

| Reviewer | --depth standard (default) | --depth max |

|---|---|---|

| security-reviewer | opus | session model |

| correctness-reviewer | opus | session model |

| performance-reviewer | sonnet | session model |

| consistency-reviewer | sonnet | session model |

Agents to launch (all 4 unless --only filters):

  1. security-reviewer — injection, auth bypass, credential exposure, OWASP patterns
  2. correctness-reviewer — logic bugs, edge cases, race conditions, test coverage
  3. performance-reviewer — allocations, blocking calls, memory leaks, N+1
  4. consistency-reviewer — cross-addon pattern enforcement, architecture alignment

Prompt template — adapt [target], [diff-command], and [domain] for each reviewer:

Review the code changes on [target] in repo tetherto/qvac.
To get the diff, run: [diff-command]
Focus only on [domain] issues.
Report each finding with: severity, file path and line, description, impact, and fix recommendation.
If no issues found, report: "No [domain] issues identified."
Do NOT fix code — report findings only.

Where [diff-command] is:

Step 4: Check for forbidden files

While reviewers run, do a quick check:

Step 5: Collect and present results

Collect results from all reviewers and present a unified report.

Every written report opens with this header block, immediately under the H1, before any prose. It is a

required part of the output, not decoration — see the note below:

# Code Review — <target>

**PR:** [<title>](https://github.com/<owner>/<repo>/pull/<n>)
**Reviewed at:** `<owner>/<repo>@<head-sha>` · **Base:** `<base-branch>` · **Head:** `<head-branch>`
**Reviewed:** <YYYY-MM-DD> · **Depth:** <standard|max> · **Reviewers:** security, correctness, performance, consistency

For branch or current-branch mode, drop the **PR:** line and use

**Reviewed at:** \<repo>@<sha>\ · **Base:** \main\ · **Head:** \<branch>\``.

For a report covering several PRs, repeat the block under each per-PR heading rather than once at the top —

each PR has its own head SHA, and a stack's shared summary table is not a substitute for it.

Then the findings themselves:

### Security
[findings or "No issues"]

### Correctness
[findings or "No issues"]

### Performance
[findings or "No issues"]

### Consistency
[findings or "No issues"]

### Summary
- Total findings: X (Y critical, Z warnings)
- Recommendation: [ready to merge / needs fixes / needs discussion]

Step 6: Write the feedback document

Always write the report to a file — do not ask first. The chat summary is ephemeral; the file is what

/post-feedback consumes to file line-anchored PR comments, and what a human re-reads days later.

Path — repo root of the working repo (alongside the existing PR*-feedback.md docs):

| Mode | Filename |

|---|---|

| PR review | PR<number>-claude-feedback.md |

| Branch / current branch | <branch-slug>-claude-feedback.md (slashes → -, e.g. feature-QVAC-22734-claude-feedback.md) |

The claude segment is the tool that produced the review. On Cursor it is cursor instead. This is not

cosmetic: both tools review the same PRs, and a shared PR<n>-feedback.md would have one silently

overwrite the other. A plain PR<n>-feedback.md is reserved for a human-merged consolidation of both.

Re-reviewing the same PR with the same tool overwrites the same path — /post-feedback keeps its own

run state keyed on the PR, so a fresh document is not a fresh conversation.

Required shape. /post-feedback parses this document, and it **refuses documents whose findings are

only table rows or only bullets**. Every finding must be a heading with a ref line:

#### [SEVERITY · domain] one-line title
`path/to/file.ext:17-18`

*First whole sentence, in italics, on its own line.*

<prose body: evidence, why it is wrong, impact, then the fix>

verbatim. Nothing may sit between the ref line and that sentence.

headings without a severity tag, so it is never offered as a comment.

Also carry over into the file, beyond the chat summary:

entry per reviewer that found it.

wrong often enough that silently dropping a bad finding loses the correction.

Verify every line number before writing it. Reviewers report anchors that do not exist — a sed -n

or grep -n against the file at the reviewed SHA costs seconds and these anchors become PR comment

positions. If you corrected any, say so in a note near the top of the document so nobody "restores" them.

Then tell the user the path in your chat reply.

Step 7: Offer to fix

After presenting the report, ask the user:

Found X issues. Want me to fix the actionable ones? (y/n)

If the user says yes:

  1. Fix each actionable issue directly
  2. Commit each fix: fix: [description]
  3. Re-run build/tests to verify
  4. Report what was fixed

Do NOT fix:

Notes

The chat report is a summary of it, not a substitute

comments. **Reviewed at:** gives it the commit the file:line references were written against, so it can

say "this document is 12 commits stale" up front instead of discovering it one rejected comment at a time;

**PR:** gives it a machine-readable target instead of guessing from the filename. Do not drop either line

as boilerplate — a report without them still reads fine to a human and silently degrades the tool that

consumes it.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.