بنقرة واحدة
iterate-pr
// Iterate on a PR until CI passes. Use when you need to fix CI failures, address review feedback, or continuously push fixes until all checks are green. Automates the feedback-fix-push-wait cycle.
// Iterate on a PR until CI passes. Use when you need to fix CI failures, address review feedback, or continuously push fixes until all checks are green. Automates the feedback-fix-push-wait cycle.
| name | iterate-pr |
| description | Iterate on a PR until CI passes. Use when you need to fix CI failures, address review feedback, or continuously push fixes until all checks are green. Automates the feedback-fix-push-wait cycle. |
Continuously iterate on the current branch until all CI checks pass and review feedback is addressed.
Requires: GitHub CLI (gh) authenticated, Python 3.9+, uv (for inline script deps).
Scripts are in the scripts/ directory relative to this skill file. Resolve paths against the skill directory.
scripts/fetch_pr_checks.pyFetches CI check status and extracts failure snippets from logs.
uv run scripts/fetch_pr_checks.py [--pr NUMBER]
Returns JSON:
{
"pr": {"number": 123, "branch": "feat/foo"},
"summary": {"total": 5, "passed": 3, "failed": 2, "pending": 0},
"checks": [
{"name": "tests", "status": "fail", "log_snippet": "...", "run_id": 123},
{"name": "lint", "status": "pass"}
]
}
scripts/fetch_pr_feedback.pyFetches and categorizes PR review feedback by priority.
uv run scripts/fetch_pr_feedback.py [--pr NUMBER]
Returns JSON with feedback categorized as:
high — Must address before merge (blocker, changes requested)medium — Should address (standard feedback)low — Optional (nit, style, suggestion)bot — Informational automated comments (Codecov, Dependabot, etc.)resolved — Already resolved threadsReview bot feedback (from CodeQL, Copilot, etc.) appears in high/medium/low with review_bot: true — it is NOT placed in the bot bucket.
Each feedback item may include:
thread_id — GraphQL node ID for inline review comments (used for replies)gh pr view --json number,url,headRefName
Stop if no PR exists for the current branch.
Run scripts/fetch_pr_feedback.py to get categorized feedback already posted on the PR.
Auto-fix (no prompt):
high — must address (blockers, security, changes requested)medium — should address (standard feedback)When fixing feedback:
This includes review bot feedback (items with review_bot: true). Treat it the same as human feedback:
Prompt user for selection:
low — present numbered list and ask which to address:Found 3 low-priority suggestions:
1. [nit] "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 would you like to address? (e.g., "1,3" or "all" or "none")
Skip silently:
resolved threadsbot comments (informational only — Codecov, Dependabot, etc.)After processing each inline review comment, reply on the PR thread to acknowledge the action taken. Only reply to items with a thread_id (inline review comments).
When to reply:
high and medium items — whether fixed or determined to be false positiveslow items — whether fixed or declined by the userHow to reply: Use the addPullRequestReviewThreadReply GraphQL mutation with pullRequestReviewThreadId and body inputs.
Reply format:
gh api call fails, log and continue — do not block the workflowRun scripts/fetch_pr_checks.py to get structured failure data.
Wait if pending: If review bot checks are still running, wait before proceeding — they post actionable feedback that must be evaluated. Informational bots (Codecov) are not worth waiting for.
For each failure in the script output:
log_snippet and trace backwards from the error to understand WHY it failed — not just what failedDo NOT assume what failed based on check name alone — always read the logs. Do NOT "quick fix and hope" — understand the failure thoroughly before changing code.
Before committing, verify your fixes locally:
If local verification fails, fix before proceeding — do not push known-broken code.
Use the commit skill to create polished commits — do not git commit -m "fix stuff".
Then push:
git push
Poll CI status and review feedback in a loop instead of blocking:
scripts/fetch_pr_checks.py to get current CI statusscripts/fetch_pr_feedback.py for new review feedback
b. Address any new high/medium feedback immediately (same as step 3)
c. If changes were needed, commit and push (this restarts CI), then continue polling
d. Sleep 30 seconds, then repeat from sub-step 1sleep 10, then run scripts/fetch_pr_feedback.py. Address any new high/medium feedback — if changes are needed, return to step 6.If step 7 required code changes (from new feedback after CI passed), return to step 2 for a fresh cycle. CI failures during monitoring are already handled within step 7's polling loop.
Success: All checks pass, post-CI feedback re-check is clean (no new unaddressed high/medium feedback including review bot findings), user has decided on low-priority items.
Ask for help: Same failure after 2 attempts, feedback needs clarification, infrastructure issues.
Stop: No PR exists, branch needs rebase.
If scripts fail, use gh CLI directly:
gh pr checks --json name,state,bucket,linkgh run view <run-id> --log-failedgh api repos/{owner}/{repo}/pulls/{number}/commentsSolo-native planning workflow. Use when asked to "plan", "brainstorm", "design", "create a plan", "I want to build", or "let's build". Runs a scout, opens a planner that is interactive through approach selection, creates Solo todos, then automatically executes and reviews through Solo subagents and scratchpads.
Start a fresh Solo Pi session from the current conversation. Use when asked to hand off, continue in a clean context, or run `/handoff <new prompt>`. Writes a Solo scratchpad summary of the important current-session context, then launches an interactive Solo agent in the same project with that handoff and the new prompt.
Write clear Solo todos that workers can execute without losing architectural intent. Use when asked to "create todos", "write todos", "break into tasks", "plan todos", or create work items from a plan. Ensures each todo has outcomes, examples, constraints, and verification criteria.
Read this skill before making git commits
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, planning, writing, registration, and verification.
Efficiently read and analyze pi agent session JSONL files. Use when asked to "read a session", "review a session", "analyze a session", "what happened in this session", "load session", "parse session", "session history", "go through sessions", or given a .jsonl session file path.