Agent skill

Iterate PR

by ReviewStage in ReviewStage/stage-cli

A skill your agent uses when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to…

MITAuto-check passedDevelopment

Install Iterate PR

skills CLI
$ npx skills add ReviewStage/stage-cli --skill iterate-pr -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ReviewStage/stage-cli iterate-pr --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ReviewStage/stage-cli.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/iterate-pr .claude/skills/iterate-pr && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
iterate-pr
GitHub stars
274
Token cost
~1.1k tokens
SKILL.md length
224 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to…

  • A PR is open and the user wants to autonomously monitor and fix PR review comments
  • SKILL.md covers WHEN INVOKED — Do These Two…, Iteration Sequence, Condition Checks and Invocation
  • Calls gh, git and jq
  • Rebase conflicts on a recurring loop

What it does

Iterate PR is an agent skill from ReviewStage/stage-cli. Use when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to babysit/iterate on a PR

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Pull requests and Failing and flaky tests. The repository describes itself as: A viewer for reviewing local code changes in small individual chapters. Works with any AI agent. The licence is MIT.

When your agent uses it

  • A PR is open and the user wants to autonomously monitor and fix PR review comments
  • Rebase conflicts on a recurring loop
  • Asked to babysit/iterate on a PR

Example prompts

  • “/iterate-pr”

What it can do on your machine

Read from SKILL.md and the folder at commit 59b977b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • gh
    • git
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Iterate PR loads about 1.1k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 224 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ReviewStage/stage-cli at commit 59b977b, republished under its MIT licence (© ReviewStage). 224 words, ~1,056 tokens.

Download SKILL.mdSave it as .claude/skills/iterate-pr/SKILL.md (or your agent's skills folder).
name
iterate-pr
description
Use when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to babysit/iterate on a PR
metadata.internal
true

Iterate PR

Recurring loop that checks a PR each iteration and fixes what's broken. Combines /fixing-pr-comments, /fixing-ci, and /rebase-origin-main.

WHEN INVOKED — Do These Two Steps Immediately

STEP 1: Run the iteration checklist once right now (before setting up the loop).

Execute all condition checks, run the appropriate sub-skills, and report results. Do not skip this — the first pass must happen immediately in the current session.

STEP 2: After reporting results, always kick off the loop using /loop at the requested interval (default 10m):

/loop <INTERVAL> For PR #<NUM> (<OWNER>/<REPO>): run the iterate-pr iteration sequence — check PR state, check for merge conflicts, check for unresolved comments, check for failing CI. Fix what's broken. Cancel the loop when the PR is closed or merged, OR when ALL of the following are simultaneously true: no merge conflicts with origin/main, zero unresolved review threads, no failing CI checks, no pending CI checks, and no commit was pushed this iteration.

Replace <INTERVAL> with the interval passed to /iterate-pr (default 10m), and <NUM>, <OWNER>, <REPO> with the actual values resolved in Step 1. Do not leave placeholders.

The loop is mandatory. Never ask the user whether to set it up — always set it up.

Both steps are mandatory. The loop is not a substitute for Step 1 — it is in addition to it.


Iteration Sequence

Each iteration (including the first one in Step 1 above) follows this sequence:

1. VERIFY   → gh pr view; stop loop if closed/merged
2. REBASE   → If merge conflicts with origin/main → /rebase-origin-main
3. COMMENTS → If unresolved threads → /fixing-pr-comments
4. CI       → If CI failing → /fixing-ci
5. REPORT   → Summarize what was checked and what was done (or skipped).
               Cancel the loop when ANY of the following is true:
               - PR is closed or merged
               - ALL of the following are simultaneously true:
                 - No merge conflicts with origin/main
                 - Zero unresolved review threads
                 - No failing CI checks
                 - No pending CI checks
                 - No commit was pushed this iteration

Only invoke sub-skills when their condition is met. Skip clean steps.

Fully autonomous. No user approval needed — triage, fix, commit, push, reply, resolve.

Do not ask the user whether to continue or cancel the loop. Apply the cancellation rule mechanically.

Exception: Ambiguous merge conflicts pause for manual resolution.

Condition Checks

bash
OWNER=$(gh repo view --json owner -q '.owner.login')
REPO=$(gh repo view --json name -q '.name')
NUM=$(gh pr view --json number -q '.number')

# 1: PR open?
gh pr view --json state -q '.state'
# CLOSED or MERGED → stop loop immediately

# 2: Merge conflicts with main?
git fetch origin main
git merge-tree --write-tree --no-messages HEAD origin/main > /dev/null 2>&1
# Non-zero exit code → conflicts exist → run /rebase-origin-main

# 3: Unresolved comments?
# gh -f/-F flag parsing mangles ! (non-null type annotations); use --input - to pass JSON directly
gh api graphql --input - <<EOF | jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved==false)] | length' || echo 0
{"query":"query(\$owner:String!,\$repo:String!,\$pr:Int!){repository(owner:\$owner,name:\$repo){pullRequest(number:\$pr){reviewThreads(first:100){nodes{isResolved}}}}}","variables":{"owner":"$OWNER","repo":"$REPO","pr":$NUM}}
EOF
# Non-zero count → run /fixing-pr-comments

# 4: CI failing?
gh pr checks $NUM --json name,bucket -q '[.[] | select(.bucket == "fail")]'
# Non-empty → run /fixing-ci

# 5: CI pending?
gh pr checks $NUM --json name,bucket -q '[.[] | select(.bucket == "pending")]'
# Non-empty → keep loop alive (do not cancel)

Invocation

  • /iterate-pr — 10m default
  • /iterate-pr 5m — every 5 minutes
  • /iterate-pr 2m — every 2 minutes

© ReviewStage, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/iterate-pr of ReviewStage/stage-cli.

Open the folder on GitHubat commit 59b977b

Compare with similar skills

Iterate PR next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Iterate PR compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Iterate PR this skillReviewStage/stage-cli274—~1.1kAutomated safety check: PassMIT
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Iterate PRmeshery/meshery-operator1517 repos~2.2kAutomated safety check: PassApache-2.0
Exposed Bug Fix WorkflowJetBrains/Exposed9.3k—~3.8kAutomated safety check: PassApache-2.0
PlotJuggler Ship CheckPlotJuggler/PlotJuggler6.2k—~1.3kAutomated safety check: PassMPL-2.0
PR Reviewwysaid/android-gpuimage-plus1.9k—~1.4kAutomated safety check: PassMIT

Similar skills

  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Iterate PR

    meshery/meshery-operator

    Iterate on a PR until CI passes. An agent skill from meshery/meshery-operator.

    151 GitHub starsUsed in 7 repos~2.2k tokens
    DevelopmentAuto-check passed
  • Exposed Bug Fix Workflow

    JetBrains/Exposed

    Official

    Takes a GitHub or YouTrack issue for the Exposed project through reproduction, a failing test, a fix, validation and a pull request.

    9.3k GitHub stars~3.8k tokensUpdated today
    DevelopmentAuto-check passed
  • PlotJuggler Ship Check

    PlotJuggler/PlotJuggler

    Runs a gated finish-line checklist before committing a PlotJuggler PJ4 change: build proof, red-test triage, hooks, docs freshness and a diff self-review.

    6.2k GitHub stars~1.3k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • PR Review

    wysaid/android-gpuimage-plus

    Address review comments and CI failures for the current branch's PR

    1.9k GitHub stars~1.4k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Skillhone

    Tencent/SkillHone

    Local Issue, pull-request, and Wiki workbench for agent skills.

    169 GitHub stars~3.4k tokensUpdated 20 days ago
    DevelopmentAuto-check passed

More from ReviewStage/stage-cli

All 10 skills in this repo
  • Fixing CI

    ReviewStage/stage-cli

    A skill your agent uses when CI is failing on a branch and you need to diagnose failures from GitHub, fix them locally with iterative verification, and re-push clean commits.

    274 GitHub stars~977 tokensUpdated 1 mo ago
    Auto-check passed
  • Fixing PR Comments

    ReviewStage/stage-cli

    A skill your agent uses when a pull request has unresolved review comments that need to be addressed, or when asked to fix PR feedback

    274 GitHub stars~953 tokensUpdated 1 mo ago
    Auto-check passed
  • Linear Issue

    ReviewStage/stage-cli

    A skill your agent uses when creating a Linear issue from the current coding context, or when the user invokes /linear-issue.

    274 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Quality Review

    ReviewStage/stage-cli

    A skill your agent uses when reviewing code changes against AGENTS.md implementation quality standards, or when asked to do an implementation quality review

    274 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Rebase Origin Main

    ReviewStage/stage-cli

    A skill your agent uses when rebasing the current branch onto origin/main, including resolving merge conflicts along the way

    274 GitHub stars~927 tokensUpdated 1 mo ago
    Auto-check passed
  • Trade Off

    ReviewStage/stage-cli

    Use at any stage — planning, before implementing, or reviewing code that's already written — to surface high-level trade-offs that could significantly simplify the work.

    274 GitHub stars~3k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Iterate PR

What does Iterate PR do?

A skill your agent uses when a PR is open and the user wants to autonomously monitor and fix PR review comments, CI failures, and rebase conflicts on a recurring loop, or when asked to…. Iterate PR is an agent skill from ReviewStage/stage-cli.

When should I use Iterate PR?

Iterate PR fits situations like: A PR is open and the user wants to autonomously monitor and fix PR review comments; rebase conflicts on a recurring loop; asked to babysit/iterate on a PR.

How do I install Iterate PR in Claude Code?

Run `npx skills add ReviewStage/stage-cli --skill iterate-pr -a claude-code`. Or copy the skill folder (.agents/skills/iterate-pr in ReviewStage/stage-cli) into .claude/skills/iterate-pr in your project. Claude Code loads it when a task matches its description.

How do I install Iterate PR in Codex?

Run `npx skills add ReviewStage/stage-cli --skill iterate-pr -a codex`. Or copy the skill folder (.agents/skills/iterate-pr in ReviewStage/stage-cli) into .agents/skills/iterate-pr in your project. Codex loads it when a task matches its description.

Can I use Iterate PR in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ReviewStage/stage-cli --skill iterate-pr -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/iterate-pr, .gemini/skills/iterate-pr, .github/skills/iterate-pr and .opencode/skills/iterate-pr in your project.

What does Iterate PR need to run?

Going by SKILL.md and its folder, Iterate PR needs the command-line tools its instructions call (gh, git and jq).

Does Iterate PR access the network?

SKILL.md contains no URLs. Its commands use gh and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Iterate PR safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Iterate PR use?

Iterate PR is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Iterate PR use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Iterate PR?

Skills that share tags, products or a category with Iterate PR: PR Babysitter (openinterpreter/openinterpreter, 69k stars), Iterate PR (meshery/meshery-operator, 151 stars), Exposed Bug Fix Workflow (JetBrains/Exposed, 9.3k stars) and PlotJuggler Ship Check (PlotJuggler/PlotJuggler, 6.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Iterate PR?

ReviewStage (a GitHub organization) maintains it in ReviewStage/stage-cli, which has 274 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 7, 2026.

Source: ReviewStage/stage-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.