Loop directory

198 loops match your filters.

Including grade C — stops on its own, but runs fewer checks than A or B. Back to A and B →

/goalPerformancemedium risk

Bundle size budget

Shrink the production JavaScript bundle under a hard budget by attacking the largest modules with code-splitting, lighter imports, and dead-weight removal.

prompt
→ Claude Code
/goal the main production bundle is under 250 KB gzipped — run the build with the bundle analyzer, address the single largest contributor each turn (code-split it, replace it with a lighter import, or drop it), and confirm the build and tests stay green; stop at the budget or after 10 turns
/goalDatabasemedium risk

N+1 query hunt

Instrument the test suite with query logging, find endpoints issuing N+1 queries, and fix them with eager loading or batching until the hot paths are clean.

prompt
→ Claude Code
/goal no endpoint in the integration test suite issues more than 10 SQL queries per request — enable query logging in the test environment, find the worst N+1 offender, fix it with eager loading or a batched query, verify the count dropped and tests still pass, then move to the next; stop after 12 turns
/goalMaintenancemedium risk

Upgrade dependencies one at a time

Walk through outdated dependencies one package per turn, upgrading, running the full check suite, and pinning back anything that breaks.

prompt
→ Claude Code
/goal `npm outdated` lists no minor or patch updates — upgrade exactly one package per turn, run tests, lint, and build after each, commit if green, and pin the previous version with a note in UPGRADE-BLOCKERS.md if it fails; stop after 20 turns
/goalRefactoringmedium risk

Dead code elimination

Hunt down unreferenced exports, unused files, and unreachable branches, deleting them in small verified steps until the analyzer reports clean.

prompt
→ Claude Code
/goal `npx knip` reports no unused files or exports — remove one cluster of dead code at a time, run the full test suite and typecheck after each removal, and revert any deletion that breaks them; stop after 15 turns
/loopMaintenancemedium risk

TODO burn-down

Chip away at the oldest TODO comments in the codebase, one per pass: either resolve it properly or convert it into a tracked issue.

prompt
→ Claude Code
/loop 30m find the oldest TODO or FIXME comment in the codebase, and either implement it (with a test) if it takes under 50 changed lines, or open a GitHub issue capturing its context and delete the comment; report which TODO you handled; stop when none remain
/loopGitmedium risk

Rebase train conductor

Keep a stack of feature branches rebased in order as their parents merge, resolving trivial conflicts and flagging risky ones for a human.

prompt
→ Claude Code
/loop 15m for each branch listed in .rebase-train (in order), rebase it onto its updated parent, resolve only trivial conflicts (imports, formatting, lockfiles), run the test suite, and push with `--force-with-lease`; if a conflict touches logic, stop that branch and leave a summary comment on its PR instead
/ralphAutomationmedium risk

Guardrails that learn from failure

A Ralph-style loop that writes its own rules: when a check fails the same way twice, the failure pattern gets appended to a guardrails file that every later iteration reads first.

prompt
→ Claude Code
/loop read .ralph/guardrails.md before doing anything, then run the full check suite and fix the first failure; if a check fails twice with the same error, append the failure pattern and a one-line rule for avoiding it to .ralph/guardrails.md before retrying; stop when all checks pass or after 15 turns
/loopCode Reviewhigh risk

The nested perfect loop

A loop wrapping a goal wrapping a review: every 30 minutes, drive all PR review comments to resolved via /review, 10 turns max per pass.

prompt
→ Claude Code
/loop 30m /goal all PR review comments resolved via /review, stop after 10 turns
/goalDatabasemedium risk

Apply database migrations cleanly

Run migrations, fix schema or SQL errors, and repeat until prisma migrate status reports clean, capped at 6 turns.

prompt
→ Claude Code
/goal all database migrations apply cleanly — run them, fix schema or SQL errors, repeat until `npx prisma migrate status` is clean; stop after 6 turns
/goalQualitylow risk

Clean up the slop

Review your recent diff for debug code, dead branches, and bad names, then fix with minimal edits until lint and tests pass.

prompt
→ Claude Code
/goal the recent diff is clean and convention-aligned — review it for debug code, dead branches, and bad names, fix with minimal edits until `npm run lint && npm test` passes; stop after 4 turns
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, iCloud and IMAP — triage, drafts, follow-ups, on a loop.

connectmyemail.com →
/goalCIlow risk

Get the build green

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

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

Reach a coverage target

Add focused tests for the least-covered files and re-measure each turn until coverage hits 80 percent or the turn cap.

prompt
→ Claude Code
/goal test coverage is at least 80% with all tests passing — add focused tests for the least-covered files, re-run coverage each turn, stop at the threshold or after 12 turns
/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
/goalRefactoringmedium risk

Migrate an API import by import

Sweep a codebase from a legacy API to its v2 replacement with tests and typecheck as the safety net, capped at 30 turns.

prompt
→ Claude Code
/goal every file importing from `./legacy-api` now imports from `./v2-api`, all tests pass, and `npm run typecheck` is clean — stop after 30 turns
/goalTestingmedium risk

Hit acceptance criteria

Drive a feature to done against explicit acceptance criteria: a working paginated endpoint, passing tests, clean lint, and a hard turn cap.

prompt
→ Claude Code
/goal the /users endpoint returns 200 with a paginated JSON body, all tests pass, and lint is clean — stop after 20 turns

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 Code
/loop 10m run `gh pr checks 1234`; if all pass, tell me it's ready to merge; if any fail, summarize which and why
/loopTestinglow risk

Watch tests while you work

A passive watchdog loop that reruns your test suite every 15 minutes and surfaces failing tests with their error output.

prompt
→ Claude Code
/loop 15m run the test suite, and if anything fails, show me the failing tests and the error output
/loopTestinghigh risk

Kill flaky tests

Run your test suite repeatedly, collect every intermittent failure, and fix or quarantine flaky tests until you get five consecutive green runs.

prompt
→ Claude Code
/loop run my test suite 20 times, collect every intermittent failure, fix or quarantine the flaky ones, and don't stop until you get 5 consecutive fully-green runs