Loop/goalRefactoringmedium riskintermediatesafety B · 85looprepo

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
/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
claude-code · codex · cursor

Implementation note

The delete-verify-revert rhythm makes this safe on codebases with good test coverage; be more cautious on repos with reflection or dynamic imports.

Source: looprepo

More refactoring loops

Keep refactoring this module until it is clean…

Loop/loop

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
refactoringmedium riskclaude-code

Run full dev cycle autonomously

Loop/loop

Execute the complete development cycle repeatedly until completion or encountering a blocking issue.

prompt
→ Claude
/loop /dev-cycle # runs the full loop autonomously until done or blocked
refactoringmedium riskclaude-code

Repair React issues in small batches

Baseline the scan, fix a small batch of real errors or warnings, and verify each change improves it without regressions.

prompt
→ Claude
Run `pnpm exec react-doctor . --verbose --yes --offline --fail-on none` to record the baseline, then rerun with `--fail-on error`. Fix at most five genuine findings, run the same scan and relevant project checks, and keep only verified improvements. Clear errors before high-confidence warnings. Stop when clean, blocked, approval is required, a finding is false-positive, or another pass makes no measurable progress. Finish with baseline and final results, retained fixes, reverted attempts, checks, and remaining findings.
refactoringmedium riskclaude-codecodex