Loop/loopGithigh riskadvancedsafety C · 55GitHub

Mutable-Queue Worktree Loop

Drains a LIVE task queue; each task runs implement->review->fix in its own git worktree and auto-merges; the queue can be edited mid-run; stops when the queue is empty. ~9 stars.

Prompt
→ Claude Code
Run a mutable task queue. For each task at the head: (1) create an isolated git worktree; (2) implement it; (3) review the result with a separate review agent; (4) fix any blocking issues; (5) merge the worktree back and delete it; (6) mark it complete. After each task, RE-READ the queue file -- the operator may have appended or reordered tasks mid-run. Never merge while the reviewer has outstanding blockers; loop back to step 4. Stop when the queue is empty.
claude-code

Source: keysersoose/loop-library ↗MITgraded C · 55/100 — how grades work (Safety Score v2) →

Similar loops

All git loops →
/goalGitmedium risk

Ship a PR until green

Implement a change, open the PR with gh, then keep fixing CI failures until every check passes, all in one goal loop.

prompt
→ Claude Code
/goal a PR is open for this change and every CI check passes — implement it, test locally, push, open the PR with `gh pr create`, then keep fixing failures (re-check with `gh pr checks`) until green; stop after 10 turns
/loopGitmedium risknew

The Ralph (Ralph Wiggum) Loop

Feed the same prompt to an agent in an infinite shell loop; fresh context each pass, state lives in files + git.

prompt
→ Claude Code
You are running inside an infinite shell loop and get a FRESH context every pass. Do not rely on memory of previous runs — all state lives in the repo, in TODO.md, and in git history. Each pass: 1. Read TODO.md and pick the single most important unchecked item. 2. Implement only that item. 3. Run the full test suite. If green, commit with a clear message and check the item off in TODO.md. If red, fix before committing. 4. Append a one-line note of what you did to PROGRESS.md. Stop only when every item in TODO.md is checked and the suite is green.

Rewrite the commit messages on your feature branch to conventional-commit format with meaningful bodies before opening the PR, leaving the code untouched.

prompt
→ Claude Code
/goal every commit on this branch (ahead of main) has a conventional-commit subject under 72 characters and a body explaining why — use interactive rebase to reword only (no code changes, no commits dropped), verify with `git log main..HEAD`, and confirm the diff against the original branch tip is empty; stop after 5 turns