Loop directory

148 published loops. Copy one, swap in your repo, run it.

Execute feature phases autonomously

Loop/ralphGitHubB

Run Claude Code through all planned phases of a feature until completion or max iterations.

prompt
→ Claude Code
/ralph-loop my-feature # Run until all phases complete (max 50 iterations
automationmedium risk
⧉ 1

Draft a sprint plan from the backlog

Loop/goallooprepoB

Turn the open issue backlog into a proposed two-week sprint plan with estimates, a dependency ordering, and an explicit cut line, written as a document for the team to edit.

prompt
→ Claude Code
/goal SPRINT-PLAN.md contains a proposed 2-week plan — read all open issues labeled `ready`, estimate each as S/M/L based on the code it touches, order them by dependency and value, draw a cut line at a realistic capacity, and list what falls below it with reasons; make no changes to the issues themselves; stop after 6 turns
planninglow risk
⧉ 1

Fix code review blockers until convergence

Loop/goalGitHubBnew

Run a full review pass inline, apply validated blocking findings at their owning layer, re-run fresh until the gate clears or blockers plateau—capped at 3 rounds with escalation.

prompt
→ Claude Code
/goal why-review fix-loop convergence: repeatedly run the full-mode /why-review pass INLINE over {target}. After each review, apply only VALIDATED findings that block the current round (all open severities in round 1 — Round-1 LOW closure; CRITICAL/HIGH/MEDIUM from round 2) at their owning layer, then re-run a FRESH full review pass over the CHANGED target. If the current round's blocking findings >0 → apply fixes and run another round; if a fresh full review pass clears the current bar (round 1: zero open findings; round 2: zero CRITICAL/HIGH/MEDIUM, LOW deferred) → CONVERGED, clear the gate. Do NOT open another round for LOW-only findings from round 2. Cap at {N=3} review rounds; a failing test gate is outside the cap and the no-progress rule — keep fixing and re-running until the tests pass, never forcing green; if review blockers do not shrink across 2 consecutive rounds or increase, or the review budget (round 3) is spent with review blockers still open → STOP and escalate via AskUserQuestion. Never loop open-ended
reviewmedium risk

Loop operator: watch an autonomous run and escalate on stall

Loop/loopGitHubAnew

A second, read-only loop that babysits a first one. Every ten minutes it reads the run's state file and latest log, runs the test suite so its evidence is an exit code rather than a self-report, and applies four explicit escalation triggers (no progress across two checks, repeated identical stack trace, budget exceeded, merge-queue conflict). On any trigger it prints ESCALATE and stops so a human looks; it never restarts, edits, merges, or pushes. Exits when the state file reports PASS or DONE, and after twelve checks regardless. Adapted from ECC's loop-operator agent (affaan-m/ECC, MIT), which lists the same triggers but has no cadence, cap, check command, or exit.

prompt
→ Claude Code
/loop every 10 minutes act as the loop operator for the autonomous run in this repo: run `cat state/loops/*.md`, `tail -100 logs/latest.log`, and `npm test` each pass, then report the active loop pattern, current phase, last successful checkpoint, the npm test exit code, failing checks, and cost drift against the budget in the state file. Print ESCALATE and stop this loop if any of these is true: no progress across two consecutive checks, the same stack trace repeats, cost exceeds the budget, or a merge conflict is blocking the queue — escalate to me, never fix it yourself. Otherwise print CONTINUE with one line of evidence. Report-only: never edit code, never restart or kill processes, never merge or push — any PR the run opens waits for me. Exit when the state file says Status: PASS or DONE. Stop after 12 checks regardless.

Fifteen-minute verification report while you work

Loop/loopGitHubAnew

A recurring six-phase check (build, types, lint, tests with coverage, secret and debug-log grep, diff size) that prints one fixed-format report every fifteen minutes so you catch drift before the PR, not in review. It is strictly read-only: the loop reports, you decide what to fix. It exits when the tests pass and the report reads READY twice running, escalates instead of retrying when the same check fails three times, and stops after eight checks no matter what. Adapted from ECC's verification-loop skill (affaan-m/ECC, MIT), whose 'continuous mode' names the cadence but has no turn cap, exit, or failure path; all three are added here.

prompt
→ Claude Code
/loop every 15 minutes while I work: run `npm run build`, `npx tsc --noEmit`, `npm run lint`, and `npm test -- --coverage`, then grep src/ for `sk-`, `api_key`, and `console.log`, then `git diff --stat`. Print a VERIFICATION REPORT with Build / Types / Lint / Tests (X/Y passed, Z% coverage) / Security / Diff as PASS or FAIL and an overall READY or NOT READY for PR verdict, plus an Issues to Fix list. Report only — never edit files, never commit. Exit when `npm test` exits 0 and the report says READY twice in a row. If the same check FAILs on three consecutive passes, stop and escalate to me with the failing output instead of retrying. Stop after 8 checks regardless.

Dual-reviewer convergence gate before opening a PR

Loop/goalGitHubAnew

Two reviewers from different model families, each in a fresh context, must both pass an objective rubric before a PR is opened — the maker-checker split with real model diversity. Each failed round fixes only what was flagged and re-reviews with reviewers that have no memory of the last round, so nothing anchors on prior findings. Hard cap of three rounds, tests may never be edited to pass, and the loop ends by opening a PR rather than pushing. Adapted from ECC's /santa-loop (affaan-m/ECC, MIT), which auto-pushes on agreement and has no verifiable exit; this version adds the test-exit condition and the human merge gate.

prompt
→ Claude Code
/goal Ship the current diff only after two independent reviewers both PASS. Scope is `git diff --name-only HEAD` (or the path in $ARGUMENTS). First write a rubric with objective PASS/FAIL criteria: correctness, security (no secrets, injection, OWASP top 10), error handling, completeness, internal consistency, no regressions. Each round launch two reviewers in parallel with fresh context and no memory of earlier rounds: Reviewer A is a Claude subagent, Reviewer B is a different model via `codex exec --sandbox read-only` (fall back to a second Claude subagent and say so in the report). Both return a JSON verdict with per-criterion PASS/FAIL and critical issues. If either FAILs: fix only the flagged issues with minimal diffs, never modify the tests to make them pass, commit "fix: address review findings (round N)", run `npm test`, and re-review with fresh reviewers. Exit when both reviewers PASS and `npm test` exits 0 — then open a PR for me to merge; never push to main or merge. Stop after 3 rounds; if still failing, print the unresolved issues and escalate to me instead of shipping.

Work a task to completion, then open a PR

Loop/looplooprepoA

The generic persistent-task Ralph pattern: iterate on one named task until its acceptance criteria are met and the suite is green, bounded by a 15-turn cap and a no-progress stop. Anti-reward-hacking clauses keep it from editing tests to go green, and it hands off via a PR instead of merging. Swap the check command for your stack's.

prompt
→ Claude Code
/loop Work the named task to completion. Each turn: pick the next incomplete subtask, make the smallest change that advances it, then run `npm test && npm run lint` and fix whatever breaks before moving on. Stop when every acceptance criterion for the task is met and `npm test` exits 0 — or stop after 15 turns, whichever comes first. Never modify, skip, or weaken a test to make it pass, never delete a failing assertion, and keep each diff minimal and scoped to the named task. If two consecutive turns produce no progress, stop and report what is blocking. When the task is done, open a pull request for review — never merge it yourself.
automationmedium risk

Ship avatar endpoint to spec

Loop/goalGitHubB

Build and test a new /users/:id/avatar route until it passes tests, lint, and matches the OpenAPI schema.

prompt
→ Claude Code
/goal until grep -q "users/:id/avatar" src/routes/users.ts AND pnpm test -- tests/integration/users.avatar.spec.ts passes AND grep -q "/users/{id}/avatar" openapi.yaml AND pnpm lint passes, or stop after 15 turns
testingmedium risk

Get the build green, every time

Loop/goalGitHubB

Work through each task in .toh/plan.md, fix blockers, until the build command succeeds or you hit 40 turns.

prompt
→ Claude Code
/goal every task in .toh/plan.md is checked and the build command exits 0 — or stop after 40 turns . A Haiku evaluator judges the condition FROM THE TRANSCRIPT — one more reason the QC gate quotes actual output: unquoted results are invisible to the evaluator. |

Run pilot verdicts until rejection

Loop/goalGitHubB

Keep executing /flow-next:pilot until it returns PILOT VERDICT=NO WORK or 20 turns elapse, routing deferrals to /flow-next:land and parking async questions.

prompt
→ Claude Code
/goal keep running /flow-next:pilot until it prints PILOT_VERDICT=NO_WORK, or stop after 20 turns - note PILOT_VERDICT=DEFERRED_TO_LAND is its own terminal (an all-done spec whose open PR land owns); route it to /flow-next:land, not a pilot re-run. In backlog mode the grammar also carries PILOT_VERDICT=ASKED <id> (<n>) - a durable park, not a stop: the loop simply continues to the next item next tick, and the human answers async in the spec / tracker
productmedium risk
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 →

Keep QA tests passing

Loop/loopGitHubB

Run pre-QA tests repeatedly, diagnose and fix failures, report only on blockers or green.

prompt
→ Claude Code
/loop 2m Read tasks/qa-config.md to get the pre-QA test command and log command. Run the pre-QA test command. If it fails or any infrastructure issue is detected: read logs using the log command, diagnose the root cause, fix it, and re-run. Report to the user only when something fails or when all checks pass clean. Do not interrupt QA for passing tests
testingmedium risk

Ship infrastructure readiness gates

Loop/goalGitHubB

Shape and execute infrastructure readiness objectives by gathering evidence, seeking approval at decision boundaries, then validating provisioning, configuration, and rollback in non-production before production deployment.

prompt
→ Claude Code
/goal Use the installed shape-goal and goal-engine skills to discover, approve, and complete this repository's next Infrastructure / Deployment Readiness objective. During shaping, load shape-goal's required-input specification for Infrastructure / Deployment Readiness; exhaustively inspect repository instructions, Git state and history, infrastructure-as-code, environment and secret references, build artifacts, deployment workflows, health checks, runbooks, rollback paths, supported environments, prior incidents and goals, the project harness, and connected authoritative systems before asking the user. Resolve every material input from evidence where possible. Continue inside this /goal only when an already-approved Goal Contract or authoritative artifact resolves every owner decision. Otherwise create or resume SHAPING.md, save the unresolved decision and one recommended question, stop as Approval required, and tell the user to resume shape-goal outside /goal; do not ask the question or take another autonomous turn, and do not make production changes before approval. Then hand off within this same goal to goal-engine to reconcile infrastructure and application assumptions, validate provisioning and configuration in approved non-production or simulated environments, verify artifact provenance, migrations, smoke and health gates, observability, failure handling, and rollback, and remove verified readiness blockers; apply relevant assurance overlays, repository-native verification, regression protection, independent review where warranted, durable progress state, and reusable closeout. Do not declare success when shaping is complete. Finish only when every approved readiness gate passes with surfaced evidence, environment differences and residual risks are documented, rollback remains viable, and no production deployment or mutation has occurred without explicit authority. Stop only for a contract-defined blocker, approval boundary, budget, material goal drift, or two consecutive no-progress cycles

Measure and ship performance gains

Loop/goalGitHubB

Discover and execute a benchmark optimization goal, freeze the protocol, compare candidates under identical conditions, and deploy only validated improvements with regression protection.

prompt
→ Claude Code
/goal Use the installed shape-goal and goal-engine skills to discover, approve, and complete this repository's next Measured Optimization / Benchmark objective. During shaping, load shape-goal's required-input specification for Measured Optimization / Benchmark; exhaustively inspect repository instructions, Git state and history, requirements, architecture, plans, tests and CI, runtime behavior, prior goal state, the project harness, and any connected authoritative sources before asking the user. Resolve every material input from evidence where possible; ask only unresolved owner decisions, one at a time with a recommended answer, and do not make production changes until the user approves a Goal Contract. Then hand off within this same goal to goal-engine to freeze the benchmark protocol, compare champion and challengers under identical conditions, and retain only meaningful improvements; apply relevant assurance overlays, repository-native verification, regression protection, independent review where warranted, durable progress state, and reusable closeout. Do not declare success when shaping is complete. Finish only when every approved acceptance and overlay gate passes with surfaced evidence and protected behavior has not regressed. Stop only for a contract-defined blocker, approval boundary, budget, material goal drift, or two consecutive no-progress cycles
performancemedium risk

Review and self-fix changes to clean

Loop/goalGitHubB

Review diffs iteratively, validate findings, self-fix each one, and restart until zero critical/high/medium issues remain.

prompt
→ Claude Code
/goal changes-review self-recursive loop: review the full diff → run /why-review --validate-findings on every finding → SELF-FIX each validated finding → restart /changes-review from Phase 0 over the WHOLE updated diff (combined with the prior fixes, not just the last fix) → loop until one complete review pass clears that round's bar (rounds 1-2: zero findings; round 3+: zero CRITICAL/HIGH/MEDIUM, a LOW-only round ENDS the loop with the LOWs recorded as deferred) → then run Phase 7.5: one standalone FULL-mode /why-review over the whole target+diff (NOT --validate-findings), fixing and re-running until it is clean → only then run the Phase 8 /docs-update. Do not stop while any validated finding is unfixed, any review pass is non-clean, or the holistic full-mode /why-review has unaddressed findings

Complete the task, ship it

Loop/ralphGitHubB

Work autonomously through subtasks, verify lint and tests pass, then commit and push to main until done.

prompt
→ Claude Code
# Persistent Task Loop Task: $ARGUMENTS --- ## Loop Protocol You are in a persistent development loop. Work autonomously until the task is 100% complete. ### Each Iteration: 1. Assess - Track subtasks with the task tools (TaskCreate/TaskUpdate — TodoWrite no longer exists) - Check current state: git status , test results - Identify what remains 2. Execute - Do the next step - Follow the auto-loaded MeshForge rules (CLAUDE.md + .claude/rules/security.md ) - Walk .claude/rules/honest failure modes.md over every error path you write - Write tests for new functionality 3. Verify — capture real exit codes; never judge from truncated streams bash python3 scripts/lint.py --all 1>/tmp/lint.log 2>&1; echo LINT EXIT=$? python3 -m pytest tests/ -q 1>/tmp/pytest.log 2>&1; echo TEST EXIT=$? tail -5 /tmp/pytest.log 4. Continue - If not done, loop back to Assess - Mark completed tasks as you go --- ## Exit Conditions ALL must be true: - [ ] Task is 100% complete - [ ] scripts/lint.py --all exits 0 - [ ] All tests pass (exit code 0, not a "passed" line in a truncated stream) - [ ] Changes committed on main (solo workflow — PR/feature-branch flow retired 2026-04-19) - [ ] Pushed: git push origin main (then pull the fleet boxes) --- ## MeshForge Context Key paths: src/ (source) · tests/ · src/gateway/ · src/launcher tui/ · src/utils/ Security rules are auto-loaded from .claude/rules/security.md — don't restate, just follow them (lint + pre-commit hook enforce). --- ## Completion Signal When ALL exit conditions verified: <promise>DONE</promise> Do NOT output the promise until fully verified complete. --- "I'm in danger!" - Ralph Wiggum (but you're not, keep looping
refactoringhigh risk

Build the user profile page

Loop/ralphGitHubB

Ralph autonomously constructs the user profile page and halts on completion promise signal.

prompt
→ Claude Code
/ralph-loop "Build the user profile page. Output <promise>DONE</promise> when complete." --completion-promise "DONE" --max-iterations 20
productmedium risk

Test all endpoints

Loop/goalGitHubB

Run tests against every API endpoint until coverage is complete or you hit 30 iterations.

prompt
→ Claude Code
/goal all endpoints tested or stop after 30 turns
testingmedium risk

Ship production-grade apps autonomously

Loop/ralphGitHubB

Hand an idea to Claude Code; it authors specs, designs, builds, tests, secures, and ships until enterprise done or budget exhausted.

prompt
→ Claude Code
# dare-to-be-stupid — Design (v2, refined) > A Claude Code plugin. One command, /dare , hands an idea or PRD to an autonomous > loop that authors specs, designs, builds, tests, secures, ships, fixes, and iterates > until the app passes an enterprise-production definition of done — or the budget dies. > > Named for the Weird Al song. The joke is that it runs the Ralph Loop on purpose , > with --dangerously-skip-permissions , and narrates the whole thing in the voice of an > '80s Junkion. Pre-production only. Never points at anything with users. This is v2. It keeps the strong core of the original spec (external reviewer, ratchet, guard hook, Junkion style) and adds the three phases the original left thin relative to the actual goal: PRD authoring, a design phase, and a real enterprise DoD including security, CI, docs/observability, and design quality (with quality plugins auto-installed). --- ## 0. The premise, in one paragraph The User builds documentation-first: spec → system docs → API contracts → CLAUDE.md → code. dare-to-be-stupid is the deliberate inverse, packaged as comedy that also solves two real engineering problems. It is a real build , not a joke ar

Convert codebase to TypeScript

Loop/ralphGitHubB

Refactor all files to TypeScript and run tests until the full suite passes.

prompt
→ Claude Code
/ralph-loop "Refactor codebase to use TypeScript. Output COMPLETE when all files converted and tests pass." --completion-promise "COMPLETE" --max-iterations 100
refactoringhigh risk

Implement feature X autonomously

Loop/ralphGitHubB

Ralph runs until it outputs DONE, implementing the feature end-to-end over up to 20 iterations.

prompt
→ Claude Code
/ralph-loop "Implement feature X. Output DONE when complete." --completion-promise "DONE" --max-iterations 20
planningmedium risk
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 →

Build a REST API with tests

Loop/ralphGitHubB

Run autonomous iterations to ship a complete REST API with full test coverage until completion is promised.

prompt
→ Claude Code
/ralph-loop "Build a REST API with tests" --max-iterations 30 --completion-promise "COMPLETE
testingmedium risk

Implement a spec end-to-end

Loop/ralphGitHubB

Run an autonomous agent loop to implement a complete spec file, iterating until all requirements are met and marked DONE.

prompt
→ Claude Code
--- description: Run the Ralph Wiggum loop for a spec (Claude Code) --- Use this command to run an autonomous Ralph loop for a spec: /ralph-loop:ralph-loop "Implement spec {spec-name} from specs/{spec-name}/spec.md. Complete ALL Completion Signal requirements. Output <promise>DONE</promise> when complete." --completion-promise "DONE" --max-iterations 30
automationmedium risk

Refactor API to use dependency injection

Loop/ralphGitHubB

Refactor src/api/ to use dependency injection, keep all existing tests passing, add tests for the new DI container, and output completion promise when done.

prompt
→ Claude Code
/ralph-loop "Refactor src/api/ to use dependency injection. Keep all existing tests passing. Add tests for new DI container. Output <promise>COMPLETE</promise> when done and all tests pass." --max-iterations 20
refactoringmedium risk

Implement spec.md with TDD

Loop/ralphGitHubB

Implement spec.md with test-driven development, loop until all tests pass and output COMPLETE.

prompt
→ Claude Code
/ralph-loop "Implement spec.md. TDD. Output <promise>COMPLETE</promise> when all tests pass." --max-iterations 30
testingmedium risk

Fix interpreter matching test failures

Loop/loopGitHubB

Run the test suite repeatedly, fixing InterpreterMatchingServiceTests failures until all pass.

prompt
→ Claude Code
/loop --max-turns 25 until tests pass: fix InterpreterMatchingServiceTests failures
testinglow risk

Newsletter cleanup

Loop/looplooprepoA

Move read promotional newsletters older than 30 days to Trash — promotional senders only, never receipts, security, or personal mail.

prompt
→ Claude Code
/loop clean up marketing newsletters in my inbox with the ConnectMyEmail MCP — move read promotional newsletters older than 30 days to Trash, only clearly promotional senders, never receipts, security, or personal mail and never permanently deleting. Stop after 500 messages or when none remain, verify each sender was a bulk list before moving it, and ask before trashing anything you're unsure about.

Email triage agent for Outlook

Loop/looplooprepoA

Triage an Outlook inbox across Focused and Other — labelling new mail and moving only newsletters and spam to Deleted Items, protecting receipts, security, and human messages.

prompt
→ Claude Code
/loop triage my Outlook inbox with the ConnectMyEmail MCP — read each unread message across Focused and Other, label it (newsletter, receipt, security, human, spam), and move only clearly promotional newsletters and spam to Deleted Items, never permanently deleting and never touching receipts, security, or human mail. Stop after 200 messages or when no untriaged unread remain, verify each pass by re-counting untriaged unread, and ask before archiving anything ambiguous.

Receipt & statement archiver

Loop/looplooprepoA

Scan the inbox for receipts, invoices, and statements and file each under a Receipts label — read-only on everything else, deleting nothing.

prompt
→ Claude Code
/loop scan my inbox with the ConnectMyEmail MCP for receipts, invoices, and statements and file each under a 'Receipts' label — read-only on everything else and never deleting anything. Stop after 200 messages or when no unlabeled receipts remain, verify each matched message was labeled, and ask before creating any new label.

Inbox-zero weekly sweep

Loop/schedulelooprepoA

A scheduled Friday pass that archives read newsletters, trashes spam, and surfaces what needs a reply — protecting unread human mail.

prompt
→ Claude Code
/schedule every Friday at 5pm, run an inbox-zero pass on my email with the ConnectMyEmail MCP — archive read newsletters, move spam to Trash, and surface anything that needs a reply, never permanently deleting mail and never touching unread human messages. Stop after 300 messages per run, verify the unread count dropped, and ask before archiving anything ambiguous.

Auto-unsubscribe agent

Loop/looplooprepoA

Find newsletters you never open and unsubscribe via the List-Unsubscribe header — bulk mailing lists only, never transactional or security senders.

prompt
→ Claude Code
/loop find marketing newsletters I never open in my inbox with the ConnectMyEmail MCP, and for each use the List-Unsubscribe header to unsubscribe — only bulk mailing lists, never transactional, receipt, or security senders. Stop after 50 unsubscribes or when no one-click-unsubscribe candidates remain, verify each unsubscribe returned success and keep a log, and ask before unsubscribing from anything that looks like an account or billing service.
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 →