agentleFS
dgrissen2dgrissen2/persona-review-kit/skills/claude-review/SKILL.md

claude-review

Skill0 starsChanged 3 months agoMITView on GitHub

Run an independent Claude Code review using Claude Opus 5 with xhigh effort and tools enabled. Use when the user says 'claude review', 'run Claude on this', 'cross-model review', or wants a second-model review of a file, directory, branch, or uncommitted diff.

  • Reads credentials

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use addskill, apply-firmware 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.
  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +10 more from ryanportfolio

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not add --bare for normal use.

    line 22
  2. Very specific:

    If $ARGUMENTS contains a file path or directory: review that path.

    line 26
  3. Very specific:

    If $ARGUMENTS contains pr, branch, or panel: review current branch changes versus main.

    line 27
  4. Very specific:

    If $ARGUMENTS is empty: review all uncommitted changes.

    line 28
  5. Very specific:

    call Claude Code with --model claude-opus-5 --effort xhigh --tools default --no-session-persistence --permission-mode auto

    line 44
  6. Distinctive:

    run Claude in stream-json mode by default and emit heartbeat/progress updates to stderr

    line 45
  7. Very specific:

    write durable run artifacts under ~/.cache/agent-review-runs/

    line 46
  8. Distinctive:

    treat untracked files as content-first review targets, not empty diffs

    line 48
  9. Very specific:

    If Claude times out or all retries fail, report TOOLING FAILURE with the artifact path.

    line 53
  10. Very specific:

    Default permission mode: auto

    line 72
  11. Distinctive:

    Default timeout: dynamic. The soft timeout is auto-estimated per attempt from payload size and effort.

    line 75
  12. Very specific:

    Default review mode is automatic: full → diff-only → per-file / diff-segment

    line 86

“Common” is measured: kept by at least 6 in 10 of the 19 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

Claude Review

Independent code review using Claude Code, pinned to claude-opus-5 with --effort xhigh. The runner is size-aware: it starts with the richest payload that fits, then automatically falls back to diff-only, per-file batching, or segmented single-file review when the scope is too large.

It is also untracked-file aware. Brand-new files that have no git diff are reviewed from their current file contents, with content segmentation when needed; the runner must not retry an empty diff-only payload for an untracked file.

Why This Exists

Claude reviews from a different model family than Codex. The value comes from anti-anchoring: pass the code and diff to Claude, never prior reviewer notes or planning context. The runner keeps Claude tools enabled so it can inspect files, run read-only diagnostics, run tests, and use web tools when useful, but the prompt instructs Claude to review rather than modify.

Do not add --bare for normal use. Claude Code bare mode intentionally ignores OAuth/keychain login and requires ANTHROPIC_API_KEY or an API-key helper, so it fails after ordinary claude auth login. Isolation comes from independent input selection and disabled session persistence, not from disabling tools.

Scope Rules

  • If $ARGUMENTS contains a file path or directory: review that path.
  • If $ARGUMENTS contains pr, branch, or panel: review current branch changes versus main.
  • If $ARGUMENTS is empty: review all uncommitted changes.

Workflow

  1. Run:
python3 ~/.codex/skills/claude-review/scripts/claude_review.py [scope]
  1. The script will:
    • collect the relevant git diff
    • include current file contents only when the payload is small enough
    • log review planning details to stderr
    • estimate a soft timeout upfront from payload size and effort, then keep extending the deadline while Claude is still streaming output (a stall watchdog and hard cap bound it)
    • call Claude Code with --model claude-opus-5 --effort xhigh --tools default --no-session-persistence --permission-mode auto
    • run Claude in stream-json mode by default and emit heartbeat/progress updates to stderr
    • write durable run artifacts under ~/.cache/agent-review-runs/
    • retry in smaller modes on timeout
    • treat untracked files as content-first review targets, not empty diffs
    • aggregate batched Claude findings back into one structured review
  2. Present Claude's findings directly.

If Claude times out or all retries fail, report TOOLING FAILURE with the artifact path. A tooling failure is not a PASS, CONDITIONAL PASS, or FAIL review verdict.

Output Contract

The script asks Claude to return:

## Claude Review — Verdict: <PASS / CONDITIONAL PASS / FAIL>

plus a findings table, or No issues found. when clean.

Notes

  • Default model: claude-opus-5
  • Default effort: xhigh
  • Allowed effort values: low, medium, high, max, xhigh
  • Default tools: default
  • Default permission mode: auto
  • Allowed permission modes: auto, default, dontAsk, plan; edit-accepting and permission-bypass modes are intentionally rejected for review runs over untrusted code
  • Exit code 0 means the wrapper completed and emitted a review; callers must parse the PASS / CONDITIONAL PASS / FAIL verdict from stdout. Exit code 1 means wrapper/tooling failure.
  • Default timeout: dynamic. The soft timeout is auto-estimated per attempt from payload size and effort; past it, the deadline keeps extending while Claude is still streaming output. The run is killed only when output stalls for 300s past the soft budget (CLAUDE_REVIEW_STALL_SEC) or total elapsed time hits the 3600s hard cap (CLAUDE_REVIEW_MAX_TIMEOUT_SEC). Pass --timeout-sec N (or CLAUDE_REVIEW_TIMEOUT_SEC) to pin the soft budget instead of estimating it.
  • Liveness contract for the calling agent: the wrapper streams heartbeats, partial-output progress, and deadline-extension notices to stderr at least every heartbeat interval (default 20s). Treat those as proof the review is alive — do not impose a shorter outer shell timeout and do not kill the process on brief silence; the wrapper enforces its own watchdog and always exits on its own.
  • Default review mode is automatic: full → diff-only → per-file / diff-segment
  • Untracked file mode is automatic: untracked-file → untracked-file-segment
  • No-diff explicit file mode is automatic: context-only → context-segment
  • Progress is written to stderr with payload sizes, selected mode, PID/PGID, heartbeats, and artifact paths
  • Each Claude attempt writes prompt.txt, stdout.stream, stderr.stream, events.jsonl, result.md, and timeout diagnostics under ~/.cache/agent-review-runs/
  • On SIGINT/SIGTERM/timeout, the wrapper terminates only its own Claude process group
  • Troubleshooting flags:
    • --no-stream
    • --heartbeat-sec N
    • --safe-mode
    • --disable-slash-commands
  • You can override with:
    • CLAUDE_REVIEW_MODEL
    • CLAUDE_REVIEW_EFFORT
    • CLAUDE_REVIEW_TOOLS
    • CLAUDE_REVIEW_PERMISSION_MODE
    • CLAUDE_REVIEW_MAX_FILES
    • CLAUDE_REVIEW_MAX_PAYLOAD_BYTES
    • CLAUDE_REVIEW_DIFF_ONLY_BYTES
    • CLAUDE_REVIEW_TIMEOUT_SEC
    • CLAUDE_REVIEW_STALL_SEC
    • CLAUDE_REVIEW_MAX_TIMEOUT_SEC
    • CLAUDE_REVIEW_SEGMENT_BYTES
    • CLAUDE_REVIEW_HEARTBEAT_SEC

Intent and focus (automatic)

Derive these from the user's request — they should not need to type flags. From how they phrase the ask, infer intent (what the work is trying to do) and focus (what to weight) and pass them as --intent / --focus. For example, "review the auth refactor on this branch, focus on whether the logic is right and skip style" -> --intent "auth refactor" --focus "logic correctness, skip style".

The text is appended to the prompt as author framing, never as another reviewer's findings (the review stays independent). A guardrail still surfaces every CRITICAL/HIGH finding even when it falls outside the 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.