Guide · Agent skill
How to use the PR Check Loop agent skill (prcheckloop)
Updated · written with AI from the project's own documentation and checked against our catalogue data
PR Check Loop (prcheckloop) is an agent skill that takes a GitHub pull request and keeps working on it until every automated check on the latest commit is green, or until it can name the exact blocker. It is for developers whose PR still has failing or stuck CI checks after review fixes. After this guide you will know what the skill does, how to install it, how to trigger it with a normal request, and what it needs and touches on your machine.
Quick start
- 1Download and unzip the skill. Download the prcheckloop ZIP from this page and unzip it into ~/.claude/skills/ for personal use or .claude/skills/ inside your project.
- 2Confirm gh and git access. Make sure GitHub CLI is authenticated with access to the repository and that git can push to the PR branch.
- 3Check out the PR branch. Switch to the branch that has the failing or pending checks, or name the PR number in your request.
- 4Ask in plain language. Tell the agent the PR still has failing or pending checks after review fixes and ask it to get them green.
- 5Review the result. Read the final report for the PR URL, head SHA, check summary, pushed commits and any blocker, then act on the escalation if one is listed.
What an agent skill is and what prcheckloop makes the agent do
An agent skill is a folder of instructions, packaged with a SKILL.md file, that an AI coding agent loads when a request matches the skill's description. prcheckloop is one such skill. Its SKILL.md describes a repair loop for GitHub PR checks.
Once installed, the agent reads the check results for the PR's latest head commit, looks at logs for failed checks, fixes problems in the code when it can, pushes the changes, and waits for the checks to run again. It repeats this until all checks are green, a blocker remains after reasonable repair effort, or the maximum number of iterations (default 5) is reached.
- Works only on the latest PR head SHA and ignores failing checks from older commits
- Classifies each failure as a code problem, a lint, type or build mismatch, a flake, an external service failure, or a missing secret or permission
- Reruns a failed job once without code changes, and does not loop on reruns
- Stops and writes a blocker report when the problem is outside the code
Install the prcheckloop skill
Download the prcheckloop ZIP from this page. The skill is distributed as a ZIP that contains SKILL.md. You can install it in one of three ways, depending on where you want the agent to find it.
For a personal install across all your projects, unzip the download into ~/.claude/skills/ so the skill folder sits there. For a single project, unzip it into the .claude/skills/ folder inside that project's repository. If you use the Claude apps instead, open Settings, go to Capabilities, then Skills, and upload the ZIP there.
- Personal: unzip into ~/.claude/skills/
- Project only: unzip into .claude/skills/ inside the repository
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Check the requirements before you start
prcheckloop depends on several tools being present and set up. The skill stops early if GitHub CLI is not authenticated, if the branch has no PR, or if the repository is not hosted on GitHub, so it is worth checking these first.
- GitHub CLI (gh), authenticated with access to the repository
- git, with push access to the PR branch
- jq, used to parse JSON output
- Network access to GitHub
- A GitHub repository. GitLab and other non-GitHub hosts are out of scope and the skill says to stop and use check-pr instead
gh pr view --json number,headRefName,headRefOid,url,isDraftTrigger the skill with a natural request
You do not need a special command. The skill's description says to use it when a PR still has failing or pending checks after review fixes, including after greploop. Describe the situation in plain language and name the PR if you have more than one open.
You can optionally give a PR number. If you do not, the skill detects the PR for the current branch. It also accepts a maximum iteration count if you want fewer or more passes than the default of 5.
- 'My PR still has red checks after the review fixes. Get CI green.'
- 'Keep working on PR 412 until the GitHub checks pass, and tell me what blocks it if they can't.'
- 'The lint job failed on my branch after I addressed the review. Fix it and push.'
- 'Run prcheckloop on this branch with a maximum of 3 iterations.'
What the loop does on each pass
Each pass inventories checks for the current head SHA, waits for checks that are still running, and then investigates failures. For GitHub Actions failures, the skill lists runs for that commit and reads the failed logs. It then classifies each failure and acts on it. Code and test regressions are reproduced locally and fixed. Lint, type and build mismatches are fixed by running the matching local command from the workflow.
After a fix, the skill makes a logical commit, pushes, refreshes the head SHA, and starts the inspection again. The loop is complete only when the remote checks for the new head SHA are green. Failures that need something outside the code, such as a missing secret, a permission gap, a branch protection name mismatch, or an external status app outage, are escalated with the PR URL, head SHA, failing check names, details URLs and a suggested next action.
- Flake or transient infra issue: rerun once only if the evidence supports flakiness
- External service failure: escalate with the details URL and owner guess
- Missing secret, permission or branch protection issue: escalate immediately
gh run view <RUN_ID> --log-failedSafety notes: scripts, network and pushes
prcheckloop runs scripts and uses the network. Its commands call GitHub through the gh CLI and GraphQL, read workflow logs, and run git push. It also runs local verification commands from your repository's workflow. Review the SKILL.md before installing if you want to see every command it can run.
The skill pushes commits to the PR branch and reruns failed jobs once. If you do not want an agent pushing or rerunning CI without review, do not use this skill on that repository, or review each push it makes.
- Runs scripts: yes
- Uses network: yes, to GitHub
- Pushes commits to the PR branch
- Reruns a failed job once without code changes
Tips for better results
Run the skill after review comments are addressed, not during them, because it focuses on CI and status checks rather than review comment cleanup. If you also need review comments handled, pair it with check-pr. If you already use greploop for review, run prcheckloop afterward, since a review tool can pass while CI is still red.
Give the agent a clean branch with a PR open and make sure your local gh login has access to the repository before you start. Read the blocker report at the end rather than rerunning the skill blindly, because escalations usually need a person with secret or permission access.
- Use it after greploop, not as a replacement for review
- Expect pending checks to be polled every 15 to 30 seconds
- Draft PRs are detected but the skill does not say it treats them differently
What people use it for
- Clearing lint or type errors that appear in CI after review fixes were pushed
- Fixing a build failure in a GitHub Actions workflow on a PR branch
- Identifying a missing secret or branch protection check name mismatch and writing a report for the repo admin
- Confirming a flaky job by rerunning it once before deciding whether to escalate
Frequently asked questions
How do I install the prcheckloop skill?
Download the prcheckloop ZIP from this page and unzip it into ~/.claude/skills/ for a personal install, or into .claude/skills/ inside a project for a project-only install. In the Claude apps, you can instead upload the ZIP under Settings, Capabilities, Skills.
What does prcheckloop require?
It requires GitHub CLI (gh) authenticated with access to the repository, git with push access to the PR branch, jq for parsing JSON, and network access to GitHub. It only works on GitHub repositories.
Is prcheckloop free to use?
The repository that contains the skill is published under the MIT licence, which is stated on this listing. Check the licence file in the repository for the full terms.
Does prcheckloop work with GitLab?
No. The skill is scoped to GitHub PRs. If the repository is on GitLab, the skill says to stop and use check-pr instead.
What is the difference between prcheckloop and greploop or check-pr?
prcheckloop is a repair loop for CI and status checks on a PR. greploop focuses on review, and check-pr covers review comments and PR template cleanup. The skill notes that Greptile can be perfect while CI is still red, so it is meant to run after greploop.
Will prcheckloop push code and rerun my CI without asking?
Yes, within its workflow it pushes commits to the PR branch after each fix and reruns a failed job once without code changes. If you want review before any push or rerun, do not use it on that repository.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use prcheckloop if you have a GitHub PR with red or stuck checks, your team uses GitHub Actions, and you are comfortable with an agent pushing commits and rerunning a job once. Pick something else if your code is on GitLab or another host, if you need review-comment cleanup, or if your policy forbids agent pushes or CI reruns without a person approving each one.
Download the skill