Work on issue loop

From richkuo/rk-skills · View interactive version

Work on issue loop is an AI agent skill from the GitHub repository richkuo/rk-skills. Implements a GitHub issue through work-on-issue, triggers the first review from the selected bot (@claude by default, @codex when selected), and resolves each review with fix-pr-review until an LGTM. Use for "work on issue and loop until approved" or "work-on-issue-loop", or as the automatic follow-

How to use this skill

Skill file

work-on-issue-loop

Drive an issue from "validated" to "PR reviewed to convergence" without stopping. fix-pr-review-loop owns the loop mechanics (bot selection, preflight, wait, stop conditions, cycle cap, resolution, terminal table). With an existing PR and no issue to implement, use fix-pr-review-loop directly.

Input

Steps

1. Implement, open the PR, and trigger the first review

Record the issue as the full reference owner/repo#N: a caller's owner/repo#N or URL as given, else the repository of the user's reference, else gh repo view --json nameWithOwner -q .nameWithOwner in the current checkout. Invoke the work-on-issue skill (Skill tool, skill: work-on-issue), passing that full reference explicitly; a bare number resolves against the current checkout. Every gh call this loop makes itself passes -R <owner>/<repo>. It never requests review; this loop does. Gate on its outcome:

Which trigger. validate-issue step 6 owns the first-review table with its Claude and Codex columns; this file states no boundary of its own. The score source is the issue just implemented: a stamped PR review: line in its Execution block overrides the band, else its [C<score>] title prefix. A missing score routes to the heaviest row.

Map a stamped model before posting it. fix-pr-review-loop step 1 ("Map a stamped model before posting it") owns the Claude and Codex mappings, the ignore-and-report rule for a stamp outside them, and the re-review ladder pointer; apply it as written. Never post a stamp as written: an unadmitted shorthand becomes the Action's route keyword and can select the write-capable fix-pr job, which pushes commits.

Bot selection and preflight. Apply fix-pr-review-loop step 1's two rules: @claude by default, @codex only on explicit selection, never switch bots mid-cycle; before waiting, confirm by its contents that an installed workflow answers the selected bot, whatever its filename (with the Codex secret and variable checks when Codex is selected).

Record that comment's id and created_at as the pending trigger. Both counts start at zero on the new PR: review_count and pr_cycle_count come only from completed rounds in the PR history, per Round counts in skills/fix-pr-review/rereview-routing.md, and a posted trigger changes neither.

2. Run the convergence loop

Run fix-pr-review-loop steps 2 through 4 against the PR, carrying the pending trigger; both counts are recomputed from the PR history, never carried in memory:

On a "Done" terminal state continue with step 3; on any other terminal state go to step 4.

3. File named follow-on issues (mandatory before reporting success)

On either "Done" state, sweep the PR body, commit messages, and any docs the diff changed for follow-on work the implementation named ("follow-on", "own issue", "future work", "next step", "not yet wired/deployed", "needs a follow-up"). This is separate from the review's Create Follow-up Issue section, which fix-pr-review handles.

4. Report

Report per fix-pr-review-loop step 5: same terminal-state table and same **Verification limitation:** handling (a Verification limitation line is not a finding; list each unverified source outside the word cap, omit when none). Three deltas:

Red Flags — STOP

fix-pr-review-loop's Red Flags table applies while the loop runs. Additional rows:

| Situation | Action |

|---|---|

| work-on-issue stopped with no PR | Do not trigger a review or enter the wait loop; report per step 4 |

| About to report "Done" while the PR or docs name follow-on work with no issue filed | Run step 3 first |

Common Mistakes

fix-pr-review-loop's Common Mistakes list applies unchanged, including the cycle-cap rules its step 3 owns.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.