Stop prompting.
Start looping.
Copy closed-loop workflows for coding agents. Each loop includes triggers, feedback gates, and exit conditions so agents self-pace until the job is done.
Trending loop
Ship PR Until Green
Implement on a branch, run tests, push, open a PR, wait for CI, and loop until checks pass and the PR is ready to merge.
Start the "Ship PR Until Green" loop.
146 copies
Built for agentic coders
Loops for the AI coding tools you already use.
Copy kickoffs, open in your IDE, or install hook bundles. Works best with Cursor and Claude Code; compatible with more.
Featured loops
Battle-tested loops with copy-paste kickoffs and optional install bundles.
Start the "Ship PR Until Green" loop. Goal: PR is open with all CI checks passing Max iterations: 10 Between iterations run: gh pr checks Exit when: all PR checks are success Step 1: Implement the change, test locally, push, open PR, and fix CI until green. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "De-Sloppify Pass" loop. Goal: recent changes are clean, minimal, and convention-aligned Max iterations: 4 Between iterations run: npm run lint && npm test Exit when: review finds no slop and checks pass Step 1: Review the diff for debug code, dead branches, and naming issues. Fix them with minimal diffs. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
/loop 15m Start the "PR Babysitter" loop. Goal: open PRs labeled codex-watch are healthy (CI green, rebased, not stale). Max iterations: 20. Between iterations run: gh pr list --label "codex-watch" Exit when: each watched PR is green and current, or escalated. Step 1: List watched PRs. Fix CI once, rebase if behind, comment if stale. Escalate repeated failures.
Start the "Coverage Until Threshold" loop. Goal: coverage meets the target threshold (default 80%) with all tests passing Max iterations: 12 Between iterations run: npm test -- --coverage Exit when: coverage threshold is met and tests exit 0 Step 1: Run coverage. Add focused tests for the biggest uncovered gaps, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Build Until Green" loop. Goal: production build succeeds Max iterations: 10 Between iterations run: npm run build Exit when: npm run build exits 0 Step 1: Run the build. If it fails, fix the first error, then repeat until green. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Start the "Spec-First Ship" loop. Goal: every requirement in spec.md is implemented and checked off Max iterations: 15 Between iterations run: npm test Exit when: spec.md has no unchecked requirements Step 1: Read spec.md, implement the first unchecked item, verify it, mark [x], and stop this iteration. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.