Keep refactoring this module until it is clean…

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

prompt
→ Claude
/loop keep refactoring this module until it is clean, then stop
claude-code

Source: mcrescenzograded C · 60/100 — how grades work →

More refactoring loops

Convert codebase to TypeScript

Loop/ralphGitHubB

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

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

Dead code elimination

Loop/goallooprepoB

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

prompt
→ Claude
/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

Tidy code, one safe change at a time

Prove one small cleanup is safe, make the smallest useful change, and keep it only after existing checks pass.

prompt
→ Claude
Review [repository or code project] for dead code, meaning unreachable or unused code; stale files or comments; unused dependencies; duplication; broken links; inconsistent names; and confusing structure. Protect unrelated, active, uncommitted, generated, and uncertain work. Prove one low-risk cleanup, make the smallest coherent change, then rerun the build, tests, runtime checks, and diff review. Keep only verified improvements. Stop when none remain, progress stalls, verification is unavailable, or approval is required. Return changes, evidence, and deferred candidates.