CI loops

Keep the build green: loops that watch CI, diagnose failures, and stop when checks pass.

15 graded loops in this category.

Get the build green

Loop/goal

Run the build, fix the first error, and repeat until npm run build exits 0, with a 10-turn cap.

prompt
→ Claude
/goal `npm run build` exits 0 — run the build, fix the first error, repeat until it succeeds; stop after 10 turns

Re-run PR review on schedule

Loop/schedule

Re-invoke a specific PR review skill every 20 minutes until the review completes or you stop it.

prompt
→ Claude
/loop 20m /review-pr 1234 , to re-run that skill each iteration. {/ min-version: 2.1.196 /}As of v2.1.196, a scheduled fire only runs skills that Claude is [allowed to invoke on its own](/en/skills#control-who-invokes-a-skill). The following reach Claude as plain text instead of executing

Ship specs through code review

Loop/loop

Run spec-driven workflow loop every 10 minutes: plan work, collect reviews, execute tasks, open pull requests.

prompt
→ Claude
/loop 10m /flow-next:pilot # build loop: ready spec → plan → reviews → work → draft PR Cap the run at 15 passes.
cimedium riskclaude-codecodex

Babysit many PRs at once

Loop/loop

Keep every PR labeled codex-watch healthy: fix CI failures, rebase behind-main branches, and nudge pending reviewers on a 15-minute cadence.

prompt
→ Claude
/loop 15m check every open PR labeled `codex-watch` and keep each healthy: fix CI failures, rebase when behind main, and nudge if a review is pending
cihigh riskcodexclaude-code

Ship a PR through CI and reviews

Loop/loop

Draft a PR, run CI, collect reviews, merge, and release—repeat every 30 minutes until land criteria are met.

prompt
→ Claude
/loop 30m /flow-next:land # ship loop: draft PR → CI green → reviews converged → merged → released Cap the run at 15 passes.
cihigh riskclaude-codecodex

Wait for CI so you don't have to

Loop/loop

Poll gh pr checks every 10 minutes and get told when the PR is ready to merge, or a summary of which checks failed and why.

prompt
→ Claude
/loop 10m run `gh pr checks 1234`; if all pass, tell me it's ready to merge; if any fail, summarize which and why

CI pipeline speedup

Loop/goallooprepo

Profile the CI pipeline and cut wall-clock time under a target by improving caching, splitting slow jobs, and removing redundant steps, verifying every run stays green.

prompt
→ Claude
/goal the CI pipeline completes in under 10 minutes on a typical PR — analyze the slowest recent runs with `gh run view`, apply one speedup per turn (better dependency caching, job parallelization, removing duplicated steps, trimming artifacts), push to a test branch, and confirm the workflow still passes; stop at the target or after 10 turns
cimedium riskclaude-codecodex

Triage, review, and merge PRs

Loop/loop

Run CI checks and merge pull requests after triage and review until the queue clears.

prompt
→ Claude
/loop /leader-tick ) that triages, reviews, runs CI checks, and merges PRs. See docs/team-orchestration.md for the full lifecycle and docs/leader-runbook.md for operator notes Cap the run at 15 passes.

Enforce all checks before agent stop

Loop/ralph

Run verification commands until all pass, preventing Check Agent from stopping prematurely.

prompt
→ Claude
# Ralph Loop Quality enforcement mechanism for Check Agent. --- ## Overview Ralph Loop prevents Check Agent from stopping until all verification commands pass. ┌─────────────────────────────────────────────────────────────────────────┐ │ RALPH LOOP │ │ │ │ Check Agent completes │ │ │ │ │ ▼ │ │ SubagentStop hook fires ──► ralph-loop.py runs │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────┐ │ │ │ Run verify commands from worktree.yaml: │ │ │ │ │ │ │ │ pnpm lint → exit 0 ✓ │ │ │ │ pnpm typecheck → exit 0

Codex CI Autofix Loop (Fix Failing GitHub Actions)

Loop/ralph★ OpenAI

An event-triggered loop where a red GitHub Actions build invokes `codex exec` non-interactively with the failing logs and repo, and Codex proposes a fix as a PR or patch artifact — one bounded iteration per CI failure.

prompt
→ Claude
CI job: on workflow failure, run `codex exec` non-interactively with the failing logs + repo, have it generate and propose a fix (PR or patch artifact) automatically. `codex exec` runs one task and exits, so each CI failure is one bounded iteration.
cimedium riskclaude-code
Sponsored · ConnectMyEmail

Loops that read your inbox.

Email is the missing tool in your harness. ConnectMyEmail gives Claude Code and Codex a clean MCP into Gmail, Outlook, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →

Continuous Claude — PR-gated Ralph loop

Loop/ralph

The Ralph loop for teams: every iteration ships as a pull request that must pass CI before merging, giving each cycle a verifiable checkpoint. Keep branch protection and human PR approval enabled rather than letting it auto-merge to main unattended.

prompt
→ Claude
Run Claude Code in a continuous loop that opens a PR per iteration, waits for CI checks, and merges when green, then starts the next iteration. Cap the run at 25 iterations; leave remaining work for the next session.
cimedium riskclaude-code

Check CI and fix failures

Loop/loop

Community loop loop for ci, sourced from github. Verified exit condition, evaluator-gated.

prompt
→ Claude
/loop 5m check CI and fix failures Cap the run at 15 passes.

Get lint and E2E tests passing

Loop/goal

Execute work from PLAN.md until npm run lint and npm run test:e2e pass, scoping changes per AGENTS.md.

prompt
→ Claude
/goal Implement the work described in PLAN.md. Stop only when npm run lint and npm run test:e2e pass. Follow AGENTS.md, keep changes scoped, and report verification evidence Stop after 25 turns even if the goal is not reached.
cimedium riskcodex

Issue-to-Merge GitHub-Native Loop (Engineer the Reload)

Loop/ralph

A full-lifecycle loop where every piece of workflow state lives in GitHub — issues, labels, PR comments — and repo files, so each cold-start session rehydrates from GitHub rather than a conversation. Built on the official claude-code-action.

prompt
→ Claude
Run Claude Code across the full lifecycle — issue intake → branch → implement → PR → review fixes → merge — with ALL workflow state externalized to GitHub (issues, labels, PR comments) and repo files. Each session starts cold and rehydrates from GitHub state; "the chat being gone doesn't cost you anything." Cap the run at 25 iterations; leave remaining work for the next session.
cimedium riskclaude-code

Morning-triage harness with adversarial reviewer

Loop/ralph

A cron-fired skill that finds its own work (failed CI, new issues, recent commits), fans each finding out to an isolated worktree, gates every fix behind an adversarial reviewer that assumes the code is broken, and leaves draft PRs — merging stays human.

prompt
→ Claude
# .claude/skills/morning-triage/SKILL.md — fired by cron at 06:00 READ (discovery inputs): CI runs that failed since the last run (gh run list --status failure); issues opened in the last 24h; commits merged since yesterday; the previous ./state/triage.md. JUDGE: for each candidate decide actionable NOW vs noise; blocks a release → P0; already tracked → skip. Keep only what is worth a worktree today — the loop picks, you don't hand it a list. WRITE: append findings (finding | source | priority | status) to ./state/triage.md and commit it so tomorrow's run can read it. HANDOFF: one git worktree per finding (git worktree add ../wt-<slug> -b fix/<slug>), MAX_PARALLEL=3 — capped by how many PRs a human can actually review, not by the machine. VERIFY: a second subagent as adversarial reviewer — ROLE: adversarial code reviewer. ASSUME this code is BROKEN until proven otherwise; do not praise. CHECK in order: does it run (execute, don't read); run the tests and paste real output; edge cases the author skipped; does behavior match the ticket. VERDICT: PASS only if every check holds, otherwise REJECT with each reason listed. Maximum 3 attempts per finding, then log as blocked. STOP (red lines): never merge, never delete, never push to main; anything uncertain goes to ./inbox/ for a human, NOT into a PR. Caps set before the first run: per-run timeout 45 minutes, daily budget $20. PRs open as drafts; merging stays human.
cimedium riskclaude-code