The
/pr-review-loopskill for Claude Code — request your repo's@claudeCI review and drive the fix loop event-driven, in the same session. No polling, no webhook, no daemon.
When you finish a change on a feature branch, you normally: push → comment @claude on the PR →
wait → read the review → fix → maybe re-review. This skill does the whole loop for you, and the
waiting is event-driven — a background watcher blocks on gh run watch and the harness wakes
your session the moment CI finishes. You burn zero turns waiting.
Install the skill once into your Claude Code user scope so it works in every repo:
npx github:adevra/claude-pr-review-loopThat drops the skill into ~/.claude/skills/pr-review-loop/. Restart any open Claude Code session
to pick it up, then run /pr-review-loop on a feature branch.
The skill drives the standard @claude GitHub Action review. Any repo you want to review needs
.github/workflows/claude.yml. Scaffold it from the repo root:
npx github:adevra/claude-pr-review-loop initThen add the one secret the workflow needs:
claude setup-token # generate a Claude Code OAuth token
gh secret set CLAUDE_CODE_OAUTH_TOKEN # paste it when promptedCommit the workflow and you're set.
On a feature branch with your work committed:
/pr-review-loop
It will:
- Refuse early if the tree is dirty or you're on
main/master. - Push the branch and open (or reuse) a PR.
- Comment
@claudeto trigger the CI review, then launch the background watcher and end the turn — your session goes idle. - Wake automatically when CI finishes, read the newest review output, and summarize the findings.
- Gate on a fix (
AskUserQuestion): Fix now or Leave it. Fixes followreceiving-code-reviewdiscipline — valid findings get fixed, declined ones get a one-line reason. - Optionally re-review once (round cap of 2, so CI never runs away).
| File | Role |
|---|---|
skill/SKILL.md |
The orchestrator Claude follows when you run /pr-review-loop. |
skill/watch-claude-review.sh |
Background watcher. Correlates your review run by the @claude comment's createdAt (timestamp, not head SHA — every claude.yml run shares main's SHA), blocks on gh run watch, then prints WATCH_RESULT: and exits, which re-invokes the session. |
template/claude.yml |
The standard anthropics/claude-code-action workflow init scaffolds. |
The CI workflow itself is never modified by the skill.
npx github:adevra/claude-pr-review-loop # install the skill (default)
npx github:adevra/claude-pr-review-loop init # scaffold claude.yml in the current repo
npx github:adevra/claude-pr-review-loop uninstall # remove the global skill
npx github:adevra/claude-pr-review-loop help
- Claude Code
gh(GitHub CLI), authenticated- A POSIX shell for the watcher (Git Bash on Windows — Claude Code's Bash tool already uses it)
- Node ≥ 16 (only to run the installer)
MIT