pre-pr-review
Skill0 starsChanged 20 days agoMITView on GitHub
Review a change request locally in crit before it becomes a PR or MR. Claude drafts the description (following the repo's PR template), opens it in one crit session together with every changed file as a diff, revises both until the user approves, then hands over the exact PR or MR command, using the approved text as the body. Runs only when the user invokes it with "/pre-pr-review" or asks for a "pre-pr review" in the prompt.
- Commits and pushes
9 other projects use a version of this.
Adopted by
Most recently taken up by
- valkey-io/valkey-operatortheir own version, first seen Nov 30, 2026
- magnusrodseth/dotfilestheir own version, first seen Nov 29, 2026
- redis/redis-vl-pythontheir own version, first seen Nov 2, 2026
- kenchris/review-looptheir own version, first seen Nov 1, 2026
- osac-project/osac-ai-skillstheir own version, first seen Oct 13, 2026
- wisnuwiry/padutheir own version, first seen Oct 8, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- redis/redis-vl-python★ 435same name
- valkey-io/valkey-operator★ 432same name
- wisnuwiry/padu★ 27same name
- kenchris/review-loop★ 4same name
- magnusrodseth/dotfiles★ 3same name
- SirGuanZz/claude-skills★ 2same name
- osac-project/osac-ai-skills★ 1same name
- racoonamatatas/claude-skills★ 0same name
- tchughesiv/osac-ai-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- browser-selectSkill
- claude-usageSkill
- diagram-styleSkill
- docs-sweepSkill
- mac-disk-cleanupSkill
- md-tocSkill
- session-exportSkill
- tracker-pageSkill
- whats-upSkill
- wrap-upSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Read the state: Run pre-pr-review info. Check it with the user in one line: branch, base, number of commits and files.
- Very specific: line 33
Sweep the docs: if the repo is one docs-sweep covers (infrastructure code with a README or docs/), and fix what it finds before drafting.
- Very specific: line 35
Draft the description: Run pre-pr-review init, then write description (the path info gives, under the git dir, so it's never committed):
- Very specific: line 39
If the repo has a template, fill it in.
- Distinctive: line 42
Write it for the reviewers: what changed and why, how it was tested, the risk and the rollout, and anything the reviewer must look at.
- Very specific: line 45
Put screenshots and diagrams in assets_dir and link them with relative paths (!plan).
- Very specific: line 47
Open crit: Run crit from the repo root in the background, with the arguments from crit-args:
- Very specific: line 57
Revise: When crit exits, read what it printed.
“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.
Files
pre-pr-review
You review the whole change request before anyone else sees it: what the PR or MR will say, and what it changes. Both are in one crit session. You comment, Claude revises, and the loop repeats until you approve. Then the PR is opened with exactly the text you approved.
Run it only when asked. The user invokes it. Never start it yourself, even right before a PR. It doesn't replace the user's go-ahead for opening the PR.
pre-pr-review info [BASE] # JSON: branch, base, merge base, changed and deleted files, draft paths, PR template
pre-pr-review init [BASE] # create the draft folder; copy in the repo's PR template if there is exactly one
pre-pr-review crit-args [BASE] # crit's arguments, one per line: the description, then every changed fileIt is bin/pre-pr-review in this skill's folder (Python 3.9+, standard library). BASE defaults to
origin/HEAD, then origin/main, origin/master, main, master. If the user passed a base
(/pre-pr-review develop), use it. Exit 2 means git failed, usually because the BASE doesn't
exist. Fix the BASE; don't carry on.
Steps
- Read the state. Run
pre-pr-review info. Check it with the user in one line: branch, base, number of commits and files. Ifuncommittedis true, say so. The review shows the working tree, so uncommitted edits are included, but the PR will contain only what gets committed and pushed. Ask whether to commit first or to review as it is. - Sweep the docs if the repo is one
docs-sweepcovers (infrastructure code with a README ordocs/), and fix what it finds before drafting. The review should show the finished branch. - Draft the description. Run
pre-pr-review init, then writedescription(the pathinfogives, under the git dir, so it's never committed):- The first line is
# <PR title>, followed by the body. At hand-off the title is taken from this line. - If the repo has a template, fill it in. If there are several, choose the one that fits and
say which one you used. Read the repo's
CONTRIBUTING,AGENTS.mdandCLAUDE.mdfor PR rules, plus any naming rules from the user's skills (e.g. a Jira key in the title). - Write it for the reviewers: what changed and why, how it was tested, the risk and the rollout, and anything the reviewer must look at. List deleted files by name, because the diff view can't show them (see below).
- Put screenshots and diagrams in
assets_dirand link them with relative paths ().
- The first line is
Open crit. Run crit from the repo root in the background, with the arguments from
crit-args:cd "$(git rev-parse --show-toplevel)" && pre-pr-review crit-args | tr '\n' '\0' | xargs -0 critPass the user the URL crit prints: "crit is open at http://localhost:NNNN: the description is the first file, then the diff. Comment, then click Finish Review." Wait for crit to exit. Don't read the review early.
- Revise. When crit exits, read what it printed. For each comment, edit the description or
the code, then reply in crit (
crit comment --reply-to <id> --author 'Claude Code' '<what you did>'; use--jsonfor several replies). Don't resolve comments yourself. If a code change adds or removes a file, runcrit-argsagain. Then start the next round with the same command and wait again. Stop when a round finishes with no comments. Hand over. Show the final title, the source and target branch, and the exact command, with the approved body passed as a file:
Forge Command GitHub gh pr create --base <base> --title "<title>" --body-file <body>GitLab glab mr create --target-branch <base> --title "<title>" --description "$(cat <body>)"Bitbucket bkt pr create, with the title and the body from<body>(checkbkt pr create --helpfor the flags)<body>is the description without its# titleline. Write it next to the description asbody.md. Opening the PR needs the user's go-ahead, as always. Approving the review is not that go-ahead. If the user says to open it, push first if the branch isn't on the remote.- Attachments: forges don't accept local relative image paths. List each file in
assets_dirfor the user to drag into the PR or MR once it exists, and say where each one goes. Don't upload them anywhere yourself.
- Attachments: forges don't accept local relative image paths. List each file in
What crit shows, and what it doesn't
Tested with crit 1.8.0:
- One session, two parts: passing the description and the changed files as file arguments gives one crit session. The description is rendered as markdown and each code file as a diff against the base branch.
- Uncommitted edits are included. crit diffs the working tree, and its scope picker switches
between all changes, the branch's changes and the unstaged ones. Don't use
crit --rangehere: it ignores file arguments, so the description wouldn't show, and it leaves out uncommitted edits. - Deleted files are not shown, because crit can't open a file that's gone.
infolists them underdeleted, and the description must name them. - New files are labelled "modified" in crit's file list. That's cosmetic, and the diff is still correct.
- Images in the description render. crit rewrites a relative image link in a reviewed
markdown file to its
/files/endpoint, relative to that file. It serves files from inside.git/, soin the description shows the file inassets_dir.
Afterwards
The draft folder stays in the git dir so a second review can start from the approved text. When
the PR is merged or abandoned, offer to delete it (rm -r on draft_dir, after the user says
yes).
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
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.

