agentleFS
kumaran-iskumaran-is/claude-code-onboarding/.claude/skills/iterate-pr/SKILL.md

iterate-pr

Skill35 starsChanged 6 months agoMITView on GitHub

Iterate on a PR until CI passes and review feedback is addressed. Use when fixing CI failures, addressing PR review comments, or running the feedback-fix-push cycle autonomously. Covers LOGAF-scale feedback triage, CI polling, GitHub thread replies, and exit conditions.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use quota-axi, chrome-devtools-axi and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • layer5ioSkill

    quota-axi

    Report local Claude, Codex, Cursor, GitHub Copilot, and Grok quota windows via the quota-axi CLI - remaining percentages, reset times, and provider status read from local auth sources, with no routing, recommendation, or provider mutation. Use before deciding whether it is safe to keep spending a provider's quota, when the user asks about usage, rate limits, or remaining quota, or when comparing local provider headroom.

    Also in 4 projects that use this

  • kunchenguidSkill

    chrome-devtools-axi

    Control a Chrome browser session through the chrome-devtools-axi CLI - navigate, snapshot, click, fill forms, run JavaScript, inspect console and network, take screenshots, audit performance. Use whenever a task needs a real browser: opening or testing a web page, clicking through a flow, extracting page content, or debugging a website.

    Also in 4 projects that use this

  • kunchenguidSkill

    lavish

    Turn complex or visual agent responses into rich, reviewable HTML artifacts (HTML files) the user can annotate and send feedback on, using the lavish-axi CLI. Use when about to give a plan, comparison, diagram, table, code diff, report, or anything easier to grasp visually than as prose.

    Also in 4 projects that use this

  • layer5ioSkill

    gh-axi

    Operate GitHub through the gh-axi CLI - issues, pull requests, workflow runs, workflows, releases, repositories, labels, Projects (v2), Actions secrets and variables, search, and raw API access. Use whenever a task touches GitHub: listing or filing issues, reviewing or merging PRs, checking CI runs, triggering workflows, cutting releases, managing Projects boards, or managing Actions secrets/variables.

    Also in 4 projects that use this

  • AxDSanSkill

    no-mistakes

    Validate your code changes through the no-mistakes pipeline - automated code review, tests, lint, docs, push, PR, and CI - before they reach upstream. Use when the user asks to run no-mistakes, gate or ship or validate their changes, push safely, asks you to do a task and then validate it, or invokes /no-mistakes.

    Also in 4 projects that use this

  • MicrosoftSkill

    cut-release

    Use this skill to cut an APM release from the current worktree: assess whether the cycle since the last tag warrants a patch or minor bump (semver discipline against the merged-since-last-tag diff), assemble the changelog.d/ fragments and any legacy [Unreleased] CHANGELOG bullets into a dated version block and sanitize it so each change has one line in one section (dedupe across sections, condense, add Highlights, drop internal-only churn), bump pyproject.toml + uv.lock, run the CI-mirror lint chain, and open the release PR. Activate on "ship a release", "cut v0.x", "release prep", "bump and PR", "open release PR", "what kind of release do we need", or any phrasing that ends in opening a release PR -- even when the user does not say "skill". Stops BEFORE tagging; tagging stays a human gate that triggers the release workflow. Refuses to bump to a major (>= 1.0.0) version without explicit operator confirmation.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Iron Law: Never mark a PR iteration complete without all CI checks passing.

    line 15
  2. Very specific:

    Check CI status (fetch_pr_checks.py)

    line 37
  3. Distinctive:

    Verify locally, commit, push

    line 39
  4. Distinctive:

    Do NOT attempt a 7th cycle.

    line 71
  5. Distinctive:

    When CI fails, apply this decision tree before touching code:

    line 87
  6. Very specific:

    Never mark CI as "passing" based on local test output alone: Always wait for the actual CI run result from fetch_pr_checks.py before moving …

    line 112

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Iron Law: Never mark a PR iteration complete without all CI checks passing; always show actual CI output as evidence, not inference.

Iterate PR Until CI Passes

Autonomously fixes CI failures and addresses review feedback in a loop until all checks are green and feedback is resolved.

Requires: GitHub CLI (gh) authenticated, Python uv installed.

GitHub access: This skill uses the GitHub CLI (gh) — NOT the GitHub MCP server. All GitHub operations (fetching PR status, posting review replies, reading CI logs) go through gh commands and the helper scripts in scripts/. No MCP tool calls are needed.

Quick Reference

uv run ${CLAUDE_SKILL_ROOT}/scripts/fetch_pr_checks.py [--pr NUMBER]
uv run ${CLAUDE_SKILL_ROOT}/scripts/fetch_pr_feedback.py [--pr NUMBER]

Workflow Summary (8 Steps)

  1. Identify PR (gh pr view)
  2. Gather review feedback (fetch_pr_feedback.py)
  3. Handle feedback by LOGAF priority — auto-fix high/medium, ask for low
  4. Check CI status (fetch_pr_checks.py)
  5. Fix CI failures — read logs, trace root cause, fix, run tests
  6. Verify locally, commit, push
  7. Monitor CI in a poll loop — address new feedback as it arrives
  8. Repeat from Step 2 if new feedback required changes

Circuit Breaker — 6-Cycle Limit

Track the number of full fix→push→CI cycles completed. After 6 cycles without reaching exit conditions, stop and escalate.

A "cycle" = one complete pass through Steps 2–8 (gather feedback → fix → push → CI result).

On hitting cycle 6 with no resolution:

ESCALATION — Cycle limit reached (6/6)

What was attempted:
- Cycle 1: [what was fixed, what CI returned]
- Cycle 2: [what was fixed, what CI returned]
- Cycle 3: [what was fixed, what CI returned]
- Cycle 4: [what was fixed, what CI returned]
- Cycle 5: [what was fixed, what CI returned]
- Cycle 6: [what was fixed, what CI returned]

Still failing:
- [check name]: [error description] — [log snippet or file:line]

Options:
A) Provide direction on the specific failure above
B) Approve the PR with known failures (describe what to accept)
C) Close the PR and start fresh with a different approach
→ Which do you prefer?

Do NOT attempt a 7th cycle. Do NOT make any more code changes. Wait for human direction.

LOGAF Scale

LevelLabelsAction
highh:, blocker, changes requestedAuto-fix
mediumm:, standard feedbackAuto-fix
lowl:, nit, style, suggestionAsk user
botCodecov, Dependabot informationalSkip
resolvedAlready resolved threadsSkip

Review bot feedback (review_bot: true) in high/medium/low — treat as human feedback.

CI Failure Error Path (D3)

When CI fails, apply this decision tree before touching code:

CI check fails
    |
    +-- Is the failure in YOUR changed files?
    |   YES → Read the failing log (`gh run view --log-failed`), trace to file:line, fix
    |   NO  → Flaky/pre-existing failure? Check: did this check pass on the base branch?
    |             YES (pre-existing) → Do not fix it yourself. Report: "CI check [X]
    |                                   was already failing on base branch. Skip or
    |                                   ask owner to fix before merge?"
    |             NO (new failure)   → Fix as if it's yours
    |
    +-- Fix applied, pushed — CI still fails same check?
    |   → This is now Cycle 2. Log it in the cycle tracker.
    |
    +-- CI log is truncated or unreadable?
    |   → Run: `gh run view <run-id> --log-failed 2>&1 | head -200`
    |     If still unreadable: report the check name + run URL to the human.
    |
    +-- CI passes locally but fails in CI environment?
        → Likely env/secret mismatch. Report: "Tests pass locally but fail in CI.
          Suspect missing env var or secret. Check CI env configuration."

Never mark CI as "passing" based on local test output alone. Always wait for the actual CI run result from fetch_pr_checks.py before moving to the next cycle.

Reference Files

FileContents
reference/workflow.mdFull 8-step procedure, GraphQL reply mutation, fallback commands, exit conditions
scripts/fetch_pr_checks.pyFetches CI check status + log snippets via gh CLI
scripts/fetch_pr_feedback.pyFetches PR review comments, categorizes by LOGAF scale

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.