iterate-pr
This skill automates PR iteration by fetching CI check statuses and review feedback, then fixing actionable failures and high/medium priority comments until…
Identity proven by GitHub's verified organisation badge (getsentry)
- Agents
- Claude Code
- License
- Apache-2.0 (permissive)
- Pin
- d18b7aapinned Oct 9, 2026
- Context cost
- about 1,200 tokenswhen the skill loads
- GitHub stars
- 1,041on getsentry/skills
- Scripts
- 4 scripts
What it does
“Iterate on a PR until actionable CI passes and high/medium review feedback is addressed. Use for PR CI failures, review feedback, or green-check loops; do not wait for human approval, draft status, or merge gates.”
Generated summary from the skill's own text
This skill automates PR iteration by fetching CI check statuses and review feedback, then fixing actionable failures and high/medium priority comments until CI passes. It uses bundled Python scripts to parse GitHub PR data and monitors checks while the agent applies fixes and pushes commits.
When to use it
- PR has CI failures or actionable review feedback to address
- Automating repetitive check-fix-push cycles on a branch
- Distinguishing actionable CI states from human approval gates
- Need to batch high and medium priority feedback before low priority
When not to
- Waiting for human approval or merge gate decisions
- PR is in draft status with no checks yet
- Only low-priority style suggestions remain unaddressed
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add getsentry/skills --skill iterate-prInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install getsentry/skills iterate-pr@d18b7aa8ba878354e5c348310230e652f7690f9cInstalls the commit we checked (d18b7aa).
Copy by hand
Download the folder at d18b7aa and put it in .claude/skills/iterate-pr for Claude Code and in .agents/skills/iterate-pr for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install sentry@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install sentry-cli@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "iterate-pr" by Sentry. Source, pinned to commit d18b7aa8ba878354e5c348310230e652f7690f9c: https://github.com/getsentry/skills/tree/d18b7aa8ba878354e5c348310230e652f7690f9c/skills/iterate-pr 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/iterate-pr/ for Claude Code and .agents/skills/iterate-pr/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/sentry/iterate-pr
SKILL.md at the pin
---
name: iterate-pr
description: Iterate on a PR until actionable CI passes and high/medium review feedback is addressed. Use for PR CI failures, review feedback, or green-check loops; do not wait for human approval, draft status, or merge gates.
disable-model-invocation: false
---
# Iterate on PR Until CI Passes
Goal: fix actionable CI failures and high/medium review feedback. Stop and report human approval, draft-readiness, and merge-readiness gates.
Requires:
- authenticated `gh`
- `uv`
- target repository root as cwd
- skill-root-relative script paths, for example `scripts/fetch_pr_checks.py`
## Bundled Scripts
| Script | Run | Output |
|--------|-----|--------|
| `scripts/fetch_pr_checks.py` | `uv run scripts/fetch_pr_checks.py [--pr NUMBER]` | JSON: `pr`, `summary`, `checks`, failure snippets |
| `scripts/fetch_pr_feedback.py` | `uv run scripts/fetch_pr_feedback.py [--pr NUMBER]` | JSON buckets: `high`, `medium`, `low`, `bot`, `resolved` |
| `scripts/monitor_pr_checks.py` | `uv run scripts/monitor_pr_checks.py [--pr NUMBER]` | terminal marker plus tab-separated checks |
| `scripts/reply_to_thread.py` | `uv run scripts/reply_to_thread.py THREAD_ID BODY [...]` | JSON reply results |
Check summary fields include `failed`, `pending`, `actionable_pending`, and `human_gate_pending`.
Monitor markers:
- `ALL_CHECKS_PASSED`
- `CHECKS_DONE_WITH_FAILURES`
- `NO_CHECKS_REGISTERED`
- `DRAFT_PR_WITH_NO_CHECKS`
- `CHECKS_BLOCKED_BY_REVIEW_GATE`
## Workflow
### 1. Identify PR
Run:
```bash
gh pr view --json number,url,headRefName,isDraft,reviewDecision
```
Stop when:
- no PR exists
- draft PR has no checks after monitor grace period: report `DRAFT_PR_WITH_NO_CHECKS`
Draft rule: inspect existing checks/feedback only. Do not mark ready for review unless asked.
### 2. Handle Feedback
Run `uv run scripts/fetch_pr_feedback.py [--pr NUMBER]`.
| Bucket | Action |
|--------|--------|
| `high` | fix |
| `medium` | fix |
| `low` | ask user which to address |
| `bot` | skip informational comments |
| `resolved` | skip |
Feedback fix checklist:
- verify root cause
- search related code
- fix all instances
- for `review_bot: true`: fix real issues, explain false positives
Low-priority prompt format:
```text
Found 3 low-priority suggestions:
1. [l] "Consider renaming this variable" - @reviewer in api.py:42
2. [nit] "Could use a list comprehension" - @reviewer in utils.py:18
3. [style] "Add a docstring" - @reviewer in models.py:55
Which should I address? ("1,3", "all", or "none")
```
### 3. Check CI Status
Run `uv run scripts/fetch_pr_checks.py [--pr NUMBER]`.
| State | Action |
|-------|--------|
| `failed > 0` and `actionable_pending == 0` | fix failures |
| `actionable_pending > 0` | wait; poll feedback while waiting |
| `pending > 0` and `actionable_pending == 0` | report `CHECKS_BLOCKED_BY_REVIEW_GATE` |
| no checks after grace period | report `NO_CHECKS_REGISTERED` or `DRAFT_PR_WITH_NO_CHECKS` |
| all actionable checks passed | run post-CI feedback check |
Wait for actionable review bots: sentry, warden, cursor, bugbot, seer, codeql.
Do not wait for approval, `isDraft`, `REVIEW_REQUIRED`, Codecov, or informational bots.
### 4. Fix CI Failures
For each failure:
1. read full log: `gh run view <run-id> --log-failed`
2. trace from assertion/exception/lint rule to source
3. state the cause before editing: "fails because X, affected by Y"
4. search related call sites/patterns
5. fix root cause, not symptom
6. add focused test coverage when needed
### 5. Verify Locally, Then Commit and Push
Before commit:
- test fix: rerun specific test
- lint/type fix: rerun affected checker
- code fix: rerun covering tests
- local failure: fix before pushing
```bash
git add <files>
git commit -m "fix: <descriptive message>"
git push
```
### 6. Monitor CI and Address Feedback
Loop:
1. run `uv run scripts/fetch_pr_checks.py`
2. handle table in step 3
3. while `actionable_pending > 0`, run `uv run scripts/fetch_pr_feedback.py`
4. fix new high/medium feedback immediately
5. if changed, verify, commit, push, restart loop
6. otherwise sleep 30 seconds and repeat
7. after checks pass, wait 10 seconds, fetch feedback once more
8. if new high/medium feedback exists, return to step 4
Claude Code optional: run `uv run scripts/monitor_pr_checks.py` through `MonitorTool` with `persistent: false`; set timeout to normal repo CI duration. Restart the monitor after every push.
## Exit Conditions
| Exit | Conditions |
|------|------------|
| Success | actionable CI passed; post-CI feedback clean; low-priority choice handled |
| Ask user | same failure after 2 attempts; feedback unclear; infrastructure issue |
| Stop | no PR; branch needs rebase; no checks; draft no-checks; only human gates remain |
## Fallback
If scripts fail, use `gh` CLI directly:
- `gh pr view --json number,url,headRefName,isDraft,reviewDecision`
- `gh pr checks --json name,state,bucket,description,link`
- `gh run view <run-id> --log-failed`
- `gh api repos/{owner}/{repo}/pulls/{number}/comments`
From getsentry/skills at d18b7aa, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at d18b7aaFiles
- SKILL.md5.0 KB · d57ecb10e3f0
- SPEC.md5.4 KB · 0e7a049e4670
- agents/
- openai.yaml292 B · 5db7b84a7106
- scripts/
- fetch_pr_checks.py9.9 KB · f028ff19a203
- fetch_pr_feedback.py15 KB · f38cbcb2900f
- monitor_pr_checks.py6.7 KB · 9b1b7bcbb3a9
- reply_to_thread.py4.6 KB · 7117ea36cf23
7 files, 47 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at d18b7aaMore from Sentry
claude-settings-audit
This skill analyzes a repository to detect its tech stack, build tools, and service integrations, then generates recommended Claude Code settings.json…
Claude Code · about 2.9K tokens · pinned 6 days ago
commit
This skill enables the agent to create conventional commit messages following Sentry's style guide.
Claude Code, Codex, Cursor +4 · about 430 tokens · pinned 6 days ago
django-access-review
This skill guides agents through investigating Django and Django REST Framework code for IDOR and access control vulnerabilities.
Claude Code, Codex, Cursor +4 · about 2.5K tokens · pinned 6 days ago
django-perf-review
This skill audits Django codebases for performance problems by validating issues through code tracing before reporting.
Claude Code, Codex, Cursor +4 · about 2.8K tokens · pinned 6 days ago
pr-writer
This skill helps agents write clear, reviewer-focused PR titles and descriptions by inspecting the branch, diff, and existing PR state, then crafting concise…
Claude Code, Codex, Cursor +4 · about 1.3K tokens · pinned 6 days ago
secret-serialization
This skill detects credential leaks through generated serialization when types storing secrets are converted to strings or dictionaries by logging, tracing…
Claude Code, Codex, Cursor +4 · about 2.4K tokens · pinned 6 days ago
Related in Coding workflow
planning
This skill orchestrates multi-workflow projects with dependencies and shared data tables by creating a task graph in the orchestrator via the create-tasks tool.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.4K tokens · pinned 6 days ago
progressive-building
This skill implements incremental workflow development for agents building or extending workflows.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 1.4K tokens · pinned 6 days ago
workflow-builder
Builds and edits n8n workflows using the TypeScript SDK.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 14.2K tokens · pinned 6 days ago
remotion-upgrade
This skill upgrades Remotion and its related packages to the latest stable version.
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 460 tokens · pinned 6 days ago
remotion-upgrade
This skill upgrades Remotion and related packages across a project, automatically detecting the package manager and workspaces.
by RemotionOfficial publisher
Claude Code, Codex, Cursor +3 · about 460 tokens · pinned 6 days ago
final-release-review
Audits Python SDK release candidates or plans against the previous release, comparing diffs for regressions, API changes, and version compatibility.
by OpenAIOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 5.4K tokens · pinned 6 days ago