Skip to content

Automated loop that fixes a PR's CI failures and review feedback until all checks are green.

CCM score
67 of 100
skills.sh installs
245
GitHub stars
34.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full feedback-fix-push-wait cycle, reading CI status, review comments, and bot comments before each commit
  • Investigates failures from real logs via gh run view --log-failed, then validates each item before changing code
  • Waits on pending Sentry, Codecov, and Cursor/Bugbot/Seer checks so bot feedback is not handled twice
  • Asks for help after 3 failed attempts on the same check, or when feedback needs a decision or the failure is infrastructure-related

Install

$ npx -y skills add davila7/claude-code-templates --skill iterate-pr -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Iterate on PR Until CI Passes

Continuously iterate on the current branch until all CI checks pass and review feedback is addressed.

Requires: GitHub CLI (gh) authenticated and available.

Process

Step 1: Identify the PR

gh pr view --json number,url,headRefName,baseRefName

If no PR exists for the current branch, stop and inform the user.

Step 2: Check CI Status First

Always check CI/GitHub Actions status before looking at review feedback:

gh pr checks --json name,state,bucket,link,workflow

The bucket field categorizes state into: pass, fail, pending, skipping, or cancel.

Important: If any of these checks are still pending, wait before proceeding:

  • sentry / sentry-io
  • codecov
  • cursor / bugbot / seer
  • Any linter or code analysis checks

These bots may post additional feedback comments once their checks complete. Waiting avoids duplicate work.

Step 3: Gather Review Feedback

Once CI checks have completed (or at least the bot-related checks), gather human and bot feedback:

Review Comments and Status:

gh pr view --json reviews,comments,reviewDecision

Details

Repository
github.com/davila7/claude-code-templates
Categories
Git & Releases, Testing & QA, DevOps & Cloud
First seen
Jun 3, 2026

Questions

What does the iterate-pr skill do?

The iterate-pr skill repeatedly works on the current branch's pull request until all CI checks pass and review feedback is addressed. It follows a feedback-fix-push-wait cycle, reading CI logs and review comments before making minimal fixes. It stops when checks are green or when it needs your help.

What do I need to use iterate-pr?

iterate-pr requires the GitHub CLI (gh) to be installed and authenticated. It works on a branch that already has an open pull request, and it stops if no PR exists for the current branch.

How do I install the iterate-pr skill?

Run this command in your project: npx -y skills add davila7/claude-code-templates --skill iterate-pr -y. Once installed, the agent can check CI status, gather feedback, and push fixes to your PR.

Where does iterate-pr stand in the Git & Releases category?

iterate-pr is listed in the Git & Releases category on Claude Marketplaces, alongside triage, git-guardrails-claude-code, setup-pre-commit, caveman-commit and pr. Its focus is the loop of fixing CI failures and review comments until a PR is green.

More from davila7/claude-code-templates

All 398

Similar to Iterate Pr

More Git & Releases