agentleFS
T0mSIlverT0mSIlver/skills/cross-review/SKILL.md

cross-review

Skill1 starsChanged 2 months agoMITView on GitHub

Get a finished code change reviewed by a model from another vendor (GLM 5.3 through opencode, else GLM 5.3 on the Mistral API through Vibe, else Codex), headless and read-only, running in the background while you do the slow remaining steps. Use when you have committed a change that is ready to ship and the repo expects review before a PR is marked ready or merged; also for a follow-up review of fixes, which covers only the commits since the last review. Decides whether a review is worth running, when to launch it, and how to act on findings.

  • Reads credentials

9 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 8

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Always review, however small, a change that touches concurrency, persistence or migrations, secrets or auth, parsing of untrusted input, …

    line 21
  2. Distinctive:

    Write the brief to a file (not in the repo) in 5–15 lines: the issue or task text, the constraints that apply, and what you claim the …

    line 38
  3. Very specific:

    Run it in the background (Bash run_in_background: true):

    line 41
  4. Very specific:

    Default range: merge-base with origin/HEAD to HEAD.

    line 47
  5. Distinctive:

    Do not mark the PR ready, merge, or report the work as done until the notification has arrived and you have acted on it.

    line 54
  6. Distinctive:

    Check it against the current code first (you may have committed since the reviewed SHA, which the summary prints).

    line 62
  7. Distinctive:

    Put one line in the PR body: reviewer, number of findings, what you fixed, what you rejected and why.

    line 68
  8. Distinctive:

    Commit first; a WIP commit is fine.

    line 97
  9. Very specific:

    Run directories live in ~/.cache/cross-review (CROSS_REVIEW_DIR) and are pruned after 14 days.

    line 123
  10. Distinctive:

    No review of uncommitted work or of a PR you haven't checked out.

    line 128
  11. Distinctive:

    No inline PR comments; the output is a summary for you to act on.

    line 129

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

Cross-vendor review

scripts/cross-review (on PATH as cross-review) freezes HEAD in a throwaway worktree, sends the diff with the task brief to a reviewer from another vendor, checks the JSON it returns, and prints ranked findings. Because it reviews the frozen copy, you can keep working while it runs.

1. Decide whether to review

Review once per change, not per commit. Skip the review when the change is only:

  • docs, comments, copy or formatting;
  • generated files, or a dependency bump whose CI lane proves it;
  • under ~15 changed lines of plain logic, with a test that shows it works.

Always review, however small, a change that touches concurrency, persistence or migrations, secrets or auth, parsing of untrusted input, process spawning, trust boundaries or invariants the repo documents, or that deletes or weakens a validation or a test assertion.

Above ~800 changed lines, review per commit range (--since) or split the change first.

2. Launch at the right moment

Launch when the code is complete, committed, and the fast local tests pass, and before the slow steps that follow: pushing and waiting for CI, remote or device test lanes, e2e checks, benchmarks, the PR body, docs. The review takes 5–20 minutes; those steps fill that time, so the review costs you nothing extra. Launching at the very end doubles your wall time; launching before tests pass wastes the review on code that is about to change.

  1. Write the brief to a file (not in the repo) in 5–15 lines: the issue or task text, the constraints that apply, and what you claim the change does and how you verified it. Never paste your transcript.
  2. Run it in the background (Bash run_in_background: true):

    cross-review --brief /path/to/brief.md

    Default range: merge-base with origin/HEAD to HEAD. --base REF changes it. --effort low|medium|high sets the reasoning effort of all three reviewers (Vibe runs medium as high, the level below high that GLM on the Mistral API accepts being low). Use low under ~100 lines, high for the risk areas above.

  3. Carry on with the slow steps. Don't wait, poll or sleep: the harness notifies you when it exits.
  4. Do not mark the PR ready, merge, or report the work as done until the notification has arrived and you have acted on it. On repos where pushing to a ready PR restarts expensive CI, apply the fixes before marking ready.

3. Act on the result

Exit 0 prints the verdict and findings, most severe first. For each finding:

  • Check it against the current code first (you may have committed since the reviewed SHA, which the summary prints). A finding you can't reproduce by reading the code is rejected, with the reason.
  • Fix P0 and P1 findings, one at a time, testing each.
  • Fix P2 and P3 when the fix is small and certain; otherwise note them in the PR body or open a follow-up issue.
  • Put one line in the PR body: reviewer, number of findings, what you fixed, what you rejected and why.

Review the fixes again only when a fix is itself non-trivial (over ~30 lines, or in a risk area). Rerun cross-review with a brief that replies to each finding: fixed, or rejected and why. The script finds the last completed review of the branch, even across a rebase, and sends only the commits since then, with the earlier findings; a HEAD already reviewed returns that review. With --vendor, only reviews by that vendor and model count. One follow-up round; never loop.

Gotchas

  • Exit 2 is not a pass. Empty or invalid output, or a crash, means nobody reviewed the change. Say so in the PR; don't report it as clean. With --vendor auto the script already tried each reviewer that had headroom, and asked each once to fix an invalid answer.
  • Exit 4 means the reviewer hit --timeout (default 30 minutes); the script stops it rather than starting the next reviewer from scratch, and prints its work so far: what it read or ran, and what it said. Continue when that work is closing in on specific risks in the diff: cross-review --continue RUN_DIR [--timeout SECONDS] resumes the same session on the same frozen copy, and can be repeated. When it is re-reading files, crawling code the diff doesn't touch, or said nothing useful, don't continue: report the review as incomplete, or rerun with another --vendor. Either way, exit 4 is not a pass.
  • Exit 3 means no quota left on any reviewer. Report it and ship without the review only if the repo allows that.
  • Uncommitted changes abort the run, because the review pins HEAD. Commit first; a WIP commit is fine.
  • The vendor order is deliberate. GLM on the Z.ai plan first, because its 5-hour window has no weekly cap and idle headroom is lost; then GLM 5.3 on the Mistral API through Vibe, whose monthly plan credits also expire unused; Codex last, because its weekly cap is the scarcest. Vibe is skipped at 95% of its monthly credits; when quota has no Mistral line, a spent Vibe plan shows up as a failed run and Codex takes over. Don't override the order with --vendor codex to get a "better" review.
  • Never review with Vibe's default model (mistral-medium-3.5). The script gives Vibe a private VIBE_HOME that pins zai-glm-5-3, with the Vibe plan key from ~/.vibe/.env (or VIBE_MISTRAL_API_KEY), never an exported MISTRAL_API_KEY; don't run vibe for a review outside the script.
  • Don't widen the rubric. Asking for style, design or test-coverage comments, or for a full fix per finding, raises false positives (reference/sources.md).
  • A follow-up under 300 changed lines defaults to --effort low, because the reviewer's reading, not the diff, is what costs. Effort is the only control; nothing limits the reviewer's turns. Pass --effort medium|high when the new commits touch a risk area or code the earlier review never opened. The summary's first line prints the effort used. Pass --full only when the new commits change what the earlier ones mean (a redesign, a reverted approach); --since SHA sets the start by hand.
  • Findings whose lines fall outside the diff's hunks are dropped into findings.json under dropped_outside_diff; read them only if one names a real break.
  • Run directories live in ~/.cache/cross-review (CROSS_REVIEW_DIR) and are pruned after 14 days. Each holds the prompt, raw events and stderr.

Not possible

  • No review of uncommitted work or of a PR you haven't checked out.
  • No inline PR comments; the output is a summary for you to act on.

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.