The page you are reading went through the pipeline it describes. When the pipeline reviewed the pull request that added this Writing section, it found a bug in the "On this page" list: any post that showed a markdown sample would have gotten links pointing at nothing. It posted the bug on the pull request with a tested fix, and the fix went in before the page shipped.
I run every pull request through it. I make a change and run one command. The pipeline opens the pull request, reviews it, posts what it found, and works through the fixes. What it leaves to me is deciding what to build, approving what it changes, and deciding to merge.
It is not one big prompt. It is an orchestrator: a skill that decides which smaller skills to run,
in what order, and when to stop. I run it in Claude Code as /pr-pipeline, but every skill is a
plain markdown file of instructions, so any coding agent that can read files and run git and gh
can follow it. They are all open source in my
claude-code-configs repo.
Where the time goes
With a coding agent, writing the change is rarely what takes longest anymore. The time goes to everything around the pull request, on both sides of it.
Before anyone reviews it, the author has to package the work. Small, focused commits mean one bad change can be reverted without taking the rest of the work with it. A description with a summary, a diagram, and test steps gets a reviewer oriented before they open the diff. Both take real effort by hand, so most pull requests ship as one big commit with a one-line description, and the reviewer pays for it by reading the diff cold.
Then the pull request waits. A reviewer might get to it in an hour or in two days. When comments arrive, they arrive one at a time, and the author keeps checking back to answer them, which pulls them off whatever they had moved on to.
The pipeline takes on both sides. It writes the commits and the description, it reviews its own pull request before a person has to, and it can watch the pull request and work through comments as they come in while I build the next thing.
1. I make a change
This post follows two changes through the pipeline.
The first is this Writing section: post pages, the diagrams in this post, and the "On this page" list, spread across a couple dozen files. It lives in a private repo, so I quote from it instead of linking.
The second is about as small as a change gets. One sentence in my configs repo's README named internal tools, and I rewrote it to describe them generically. That repo is public, so you can open the pull request yourself: #11.
Both started the same way, as ordinary edits on a branch. The pipeline takes over once there is work to ship.
2. One command reads the situation
When I run it, it looks at the branch before doing anything: git status, any unpushed commits, the
open pull request if there is one, and whether I am its author. That picks the mode.
It names the mode before it starts, so I can correct it if the guess was wrong, and I can steer it
in plain language, like "review only, skip the validate passes".
Two rules sit above every mode:
- Never silently change someone else's pull request. On a PR you do not own, the pipeline is advisory: it reads, analyzes, and comments. It does not commit, push, or force-push.
- Review effort that stays in the terminal did not happen. Every review pass ends with something visible on GitHub.
The first means it only changes code on my own pull requests. On a teammate's, it reviews and comments, and that is all. The second means a run is not finished until something is on GitHub.
3. Ship: focused commits and a real description
For new work, ship mode runs pr-smart-commit to split the change into focused commits, pushes the
branch, and opens the pull request with pr-create. The description is the part a reviewer reads
first, so pr-create holds it to a structure:
A docs fix or a bug fix gets the short form. The README fix got exactly that: a summary, a small table showing the line before and after, and what was checked. A feature can get more: a diagram of how the parts connect, a table of the decisions with the alternatives that lost, test steps with real values, and known limitations. Each one goes in only when it helps the reviewer, so a small feature does not carry empty headings. Any change to the UI needs screenshots inline in the description, not a link to them.
4. It reviews its own pull request
As soon as the pull request exists, the pipeline reviews it. Reviewing after the PR is open keeps the diff equal to the real change and leaves a review on it for anyone who looks later. Each review round is two skills, in order:
First, validate reads the diff through six independent lenses: correctness, integration, an
adversarial pass that tries to make the change fail, observability, test quality, and operational
readiness. A final pass reads them together for what no single lens could see. Then pr-review
turns the findings into a draft comment for each specific line, with a severity label, plus one
summary with a verdict.
One round under-reports, so the pipeline repeats the round until a round finds nothing new, three rounds at most. Before anything is posted, every finding goes through one filter:
Findings survive only if you can state a concrete failure: specific inputs or state producing a wrong result, a crash, a security hole, or an operational failure. A finding you cannot make fail is a question, not a defect. Either ask it as a question or drop it.
5. The findings land on the pull request
The surviving comments go on the lines they are about, then one summary comment. Then the pipeline
checks with gh pr view that the comment actually landed.
On the Writing section pull request, the review settled after two rounds with three findings. The main one was the bug from the top of this post. This is the comment it left on the line that built the list:
lib/notes.ts:35MAJORSidebar headings are picked up from inside code samples
headingsOf keeps every line that starts with ## , including lines inside a <CodeBlock>
template literal or a fenced code block. Those lines never render as headings, so they never get
an id.
Failure: a post that shows a PR description template in a <CodeBlock> with a ## Summary
line gets an "On this page" entry linking to #summary, and nothing on the page has that id.
Clicking it does nothing.
Below that came a suggested fix, tested before the comment went up. The review also flagged four sections missing from the description, because I had opened that pull request by hand instead of through ship mode. The skill required those sections at the time. It has since made them optional, added only when they help.
The README fix shows the other side of the second rule. Its review found nothing, and the pipeline still posted a comment saying what it had checked, what it left out of scope, and what it skipped:

That comment is a trimmed version of the report every run ends with:
"Checked and clean" is the section I would keep if I could only keep one. "No blockers" on its own reads the same whether the review was careful or a skim. A list of what was verified and came back fine turns it into a claim I can check. "Skipped" does the same job from the other side, so an incomplete run looks incomplete instead of looking like a pass.
6. Respond: fix, reply, check again
When a pull request has open review comments, the same command switches to respond mode.
pr-comments-fix gathers everything that needs an answer: comment threads, review summaries, and
failing CI checks along with their actual logs. It proposes to accept or decline each item with a
reason. Once I approve, it makes the fixes, pushes them, and replies in each thread. Then it checks
again. If new comments came in, or a check is still failing because of this pull request, it goes
around again, up to three times, and stops early if it gets blocked. The pipeline then reviews the
changed code, because a fix applied without re-checking is how regressions ship, and runs
pr-update if the description no longer matches the code.
On the Writing section pull request, one pass took about 13 minutes, from the review comments landing to all three fixes pushed in one commit and every thread answered with what changed and how it was checked. This is the reply on the sidebar thread, posted from my account:
lib/notes.ts:35Fixed in 1c57fad. headingsOf now skips lines inside fenced blocks and <CodeBlock> samples.
Checked against a test body with a multi-line sample, a one-line sample, and a fenced block, and in
the browser: all 10 sidebar entries on the post resolve to an element.
Accepting a finding did not mean hiding its cost. Making the
diagrams reachable by keyboard adds a tab stop to each one on desktop, where nothing scrolls, and the
reply on that thread says so. The second review, of just the fix, found nothing new, and pr-update
added the four missing sections to the description.
Respond mode answers comments that are already there. The wait for them is the other half, and that
is what pr-babysit is for. It checks one pull request for new feedback and failing checks, and on
its own it only reads and reports. When I tell it to act, that instruction is the approval: it runs
pr-comments-fix on that pull request, pushes only to my own branch, and replies in the threads. It
never pushes to someone else's branch, force-pushes, merges, or closes.
It does not schedule itself. I pair it with Claude Code's /loop, which reruns a command on an
interval:
/loop 15m /pr-babysit owner/repo#42 and fix what you canThen I go work on the next feature. When the reviewer gets to the pull request, their comments get answered and fixed without me checking back, and the next round of review starts from code that already reflects the last one.
7. I merge
The pipeline has no merge step, and it is written down as a rule: never merge, close, or force-push a pull request. Everything up to this point is reversible and visible on the pull request. Merging is the decision that ships it, and that one stays with me.
Things to know before you run it
- It posts as you. Comments and replies go up under your GitHub account, and nothing in them says an agent wrote them. Read what it posted, and tell your teammates how you work.
- I start the loop on purpose. The loop pushes commits on its own to answer feedback, so I only start it on a pull request I own, when I mean to. At work I deliberately left it out of the hook that runs on every new pull request, because reviewing every PR automatically is a much smaller ask than pushing to every PR automatically.
- It only watches while the session is open.
/loopruns inside a Claude Code session. Close the session, and nothing is watching the pull request. For a review that might take two days, leave the session running or check back yourself. - It doesn't chase approvals. Often the slowest part of a pull request's life is waiting for someone to look at it at all. The pipeline handles comments once they arrive, but nothing reminds me to ping a reviewer who hasn't started, or warns me before a repo's rule for stale pull requests closes one. That part is still on me.
- Opening a pull request by hand skips the description. That is how the Writing section pull request ended up missing sections. Ship mode is what applies the structure.
- Check its suggested fixes. The fix suggested for the sidebar bug was wrong in its first draft. What caught it was the rule that every comment is checked against the real diff before it is posted. If you change anything in these skills, keep that rule.
- Big diffs cost time. Up to three rounds of six lenses on a large change is slow and uses a lot
of tokens. Scale it down in plain language, like
"review only, skip the validate passes".
Why it is built this way
The sidebar comment is a good example of where the effort in this pipeline goes. Finding the bug was the easy part. What made the comment worth reading was everything around it: it had to name the input that breaks the code, it came with a fix that had been checked, and it landed on the pull request instead of in my terminal.
A current model reading a diff will surface real issues without much help. Most of what I tuned is everything around that: how many passes before the findings stop being real, what a finding has to prove before it earns a comment, what the tool is never allowed to touch, and what counts as finished. None of that improves when the model gets better. It is ordinary product design, applied to a reviewer that is tireless, confident, and occasionally wrong.
Try it
The skills are plain markdown files. To install all of them for Claude Code:
git clone https://github.com/kevinreber/claude-code-configs.git
cd claude-code-configs
./install.sh --skillsThat copies every skill into ~/.claude/skills/, where Claude Code picks them up. With a different
agent, point it at
skills/pr-pipeline/SKILL.md
and the skills it names from the repo's
skills/ folder. Either way
you need the GitHub CLI installed and signed in, since everything it posts goes through gh.
Then make a change and run the pipeline. The orchestrator is about 150 lines. Read it before you run it: every rule in this post is in that file in plain sight, and changing one is a text edit.
← back to writing