agentleFS
DonaldMurilloDonaldMurillo/gofastr/.claude/skills/review-gate/SKILL.md

review-gate

Skill24 starsChanged 2 days agoMITView on GitHub

Review a change before it is committed or pushed with three independent reviews that block only when all three request changes. Use when asked to review before committing or pushing, gate a push, check "is this safe to push", explain or skip a block from the pre-commit hook's model review, or run a pre-push review. Runs three reviews through review3.py (the Codex CLI, or the Claude CLI on Haiku when Codex is missing), and three Haiku subagent reviews (or one advisory review) when neither CLI is available.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use workflow-router, afk and 6 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.
  • parcadeiSkill

    workflow-router

    Goal-based workflow orchestration - routes tasks to specialist agents based on user goals

    Also in 3 projects that use this

  • jaaxkSkill

    afk

    Toggle AFK (Away From Keyboard) mode. When enabled, a PostToolUse hook sends a summary of every tool (that involves writing to files or changing settings) Claude runs to a dedicated Slack thread so the user can monitor remotely. Toggle on with /afk, toggle off with /afk again.

    Also in 3 projects that use this

  • AnthropicSkill

    performance-review

    Structure a performance review with self-assessment, manager template, and calibration prep. Use when review season kicks off and you need a self-assessment template, writing a manager review for a direct report, prepping rating distributions and promotion cases for calibration, or turning vague feedback into specific behavioral examples.

    Also in 3 projects that use this

  • yakatotechSkill

    advisor

    Provide improvement suggestions and advice on work content. Use for document review, efficiency suggestions, and best practices

    Also in 3 projects that use this

  • SentrySkill

    security-review

    Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.

    Also in 4 projects that use this

  • MicrosoftSkill

    diagnose

    Use to systematically diagnose why scenarios fail — identifies root causes by analyzing agent traces, codebase, and behavioral patterns

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Run python3 .claude/skills/review-gate/review3.py --check (on Windows, python).

    line 14
  2. Distinctive:

    Exit 0: script mode: Use it.

    line 26
  3. Very specific:

    Run review3.py from the repository.

    line 33
  4. Distinctive:

    No Codex does not block: the same three runs go to the Claude CLI on Haiku.

    line 63
  5. Very specific:

    When it blocks: fix the findings and commit again.

    line 80
  6. Distinctive:

    Start three reviewers. Give each one the filled prompt and nothing else: no conversation history, no summary of the change, no hint of what …

    line 94
  7. Very specific:

    Use the same model for all three.

    line 98
  8. Distinctive:

    If your environment caps how many agents run at once, run them in batches.

    line 101
  9. Distinctive:

    Read each answer's JSON object.

    line 103
  10. Distinctive:

    Add a second pass that verifies or re-judges the findings.

    line 126
  11. Distinctive:

    Add extra context to the prompt, such as fact packets or code-graph pointers.

    line 129
  12. Distinctive:

    Run the review as one request with no tools.

    line 131
  13. Very specific:

    Use codex exec review with only P0 and P1 counted as blocking.

    line 132

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

Review gate

Three reviews of the same change, same prompt, same model, each started fresh. Block the push only if all three request changes. Report the blocking findings from every run, not just the ones they agree on.

Pick a mode

Run python3 .claude/skills/review-gate/review3.py --check (on Windows, python). It prints the reviewer binary it found and exits 0, or exits 3. For Codex it looks at --codex PATH, then CODEX_BIN, then PATH, then the usual install spots: on macOS the ChatGPT app's own CLI (ChatGPT.app/Contents/Resources/codex-cli/bin/codex under /Applications or ~/Applications), then every nvm node version newest first ($NVM_DIR/versions/node/*/bin/codex), and on Windows nvm-windows (%NVM_HOME%\v*\codex.cmd) and npm's global dir (%APPDATA%\npm\codex.cmd). With no Codex it falls back to the Claude Code CLI: --claude PATH, then CLAUDE_BIN, then claude on PATH. The exit-3 message names each place tried.

  • Exit 0: script mode. Use it.
  • Exit 3, or you cannot run commands or Python: subagent mode.
  • You cannot start other agents either: single mode. One review, advisory only.

Script mode

  1. Run review3.py from the repository. With no arguments it reviews the unpushed commits, @{upstream}...HEAD, falling back to origin/HEAD...HEAD on a branch with no upstream. Pass --range A...B for another range, --staged for what the next commit holds (git diff --cached), or --uncommitted for git diff HEAD.
  2. It starts three reviewer sessions in parallel. With Codex: codex exec, read-only sandbox, model gpt-6-luna (--model or PUSH_REVIEW_MODEL to change), high effort, web search off, user config ignored, nothing saved. Without Codex: claude -p, model haiku (--model or PUSH_REVIEW_CLAUDE_MODEL to change), limited to reading and searching files (no shell, so no git: a long diff is saved to a file for it), no settings or MCP servers loaded, nothing saved. The result line names the reviewer and model used.
  3. It prints the decision, the vote and every blocking finding with the runs that raised it. --json prints the same as JSON.
  4. Exit codes: 0 approve, 1 block, 2 fewer than three usable answers or any other failure (a git error, a reviewer that will not start, a crash), 3 no reviewer (neither Codex nor Claude). Only the vote exits 1. On 2, read the run logs it names, then rerun or fall back to subagent mode. Never count a failed run as a vote either way.

In the pre-commit hook

.githooks/pre-commit runs review3.py --staged on every commit, so an agent that commits gets the review without asking for it:

  • It starts after vet and the repo analyzers pass and runs beside the test sweep, so it adds little to the hook's time. Its result prints last.
  • 3 of 3 request changes fails the commit and prints the findings.
  • No Codex does not block: the same three runs go to the Claude CLI on Haiku.
  • With neither CLI the hook warns, names the places it looked, and lets the commit through. Run subagent mode yourself before you push.
  • Anything else lets the commit through too: an approve, an incomplete review, or no Python.
  • A run that takes longer than ten minutes counts as incomplete (GOFASTR_COMMIT_REVIEW_TIMEOUT sets the seconds). If the hook exits early, it stops the review and the commands its runs started.
  • It skips merge, cherry-pick and revert commits, and commits that stage only Markdown.
  • It reviews the index the commit is built from, so git commit <paths> is reviewed as committed.
  • The reviewer runs start without git's per-repo variables (GIT_INDEX_FILE, GIT_DIR and the rest): a reviewer that runs git or the tests must not write into the commit's index.

When it blocks: fix the findings and commit again. If you read a finding and it is wrong, commit with GOFASTR_SKIP_COMMIT_REVIEW=1 and say in the commit message which finding you rejected and why. Never use --no-verify: it skips every other check too.

Subagent mode

  1. Work out the range the same way the script does, and fill in prompt.md yourself: {repo} is the repository's directory name, {range} the range, {log} the output of git log --format='%h %s%n%n%b' <A>..<B>, and {diff} the output of git diff <range> inside a diff fence. If the diff is over about 120,000 characters, put git diff --stat <range> there instead, with a line telling the reviewer to read the full diff with git.
  2. Start three reviewers. Give each one the filled prompt and nothing else: no conversation history, no summary of the change, no hint of what you suspect. Each must be able to read the repository and run git. Tell them not to edit files.
    • Use the same model for all three. In Claude Code, use the Agent tool with model: haiku. If you can delegate to a Codex model instead, use gpt-6-luna.
    • If your environment caps how many agents run at once, run them in batches. The three must be independent; they need not be concurrent.
  3. Read each answer's JSON object. An answer with no JSON object, or a reviewer that failed, is not a vote: start a replacement until you have three answers.
  4. Vote and report as in script mode, and say the result came from subagent mode.

Single mode

Review the change yourself against the filled prompt.md, in the same JSON shape. Report it as one vote: list the findings, recommend a look at any blocking one, and do not call it a block.

Report

  • 3 of 3 request changes: block. List every blocking finding with the runs that raised it. A finding only one run raised still belongs in the list.
  • 2 of 3 or fewer: approve. List the minority's blocking findings as worth a look, not as blockers.
  • Fewer than three usable answers: say so. Do not decide on two.

Do not

  • Add a second pass that verifies or re-judges the findings.
  • Change the prompt to a skeptic prompt, a checklist, or a different lens per run. All three runs get the same plain prompt.
  • Add extra context to the prompt, such as fact packets or code-graph pointers.
  • Run the review as one request with no tools.
  • Use codex exec review with only P0 and P1 counted as blocking. If you use it, count P2 as blocking.

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.