Loop/loopRefactoringmedium riskintermediatesafety B · 85Forward Futurepre-dates current gate · under review

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

Use this when

Use this when a React codebase has actionable React Doctor errors or warnings and the safest repair strategy is to work in small, verified batches.

How it runs

  1. Record the complete React Doctor baseline before editing.
  2. Choose up to five genuine errors, trace their causes, and make the smallest coherent repairs.
  3. Rerun the same scan and relevant repository checks, reverting changes that do not produce a verified improvement.
  4. Repeat for remaining errors and then high-confidence warnings until a terminal state is reached.

Done when

React Doctor improves without introducing regressions. Compare the baseline and final scan under the same command and confirm each retained change with the repository checks relevant to the files touched.

Why it works

Small batches keep the causal link between a repair and the resulting scan clear. Repeating the same scan and repository checks prevents a cleaner diagnostic score from masking a product regression.

Implementation note

Do not manufacture a clean result by disabling rules, excluding files, adding suppressions, or deleting meaningful behavior. Ask before dependency upgrades, destructive changes, or actions outside the repository.

Source: Forward Future

More refactoring loops

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

Convert codebase to TypeScript

Loop/ralphnew

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

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