Loop/Prompt Library / Code quality & refactoring
๐ Learn from recent complaints
Reviews the problems you reported lately, finds the patterns behind them, and fixes every other place the same mistake shows up.
Use it when: You have been reporting the same kinds of mistakes for days and suspect they repeat elsewhere.
๐ Stops when: Every reported issue is fixed with proof, and a fresh audit for the same patterns finds nothing.
Copy this loop
Look at every conversation from the last [time window] where I reported a problem with [project]. Make a list with duplicates removed, and group the problems into patterns, like 'dates shown in the wrong timezone'. Check which are still broken. Then search the whole project for every pattern, fix each real case, and add a test where you can. Re-run the full search after fixes. Repeat for at most [3] rounds. Stop when a full search is clean or you need my approval. Show the list, fixes, and anything still open.
Review every change the agent makes before you keep it. Set a budget or round limit โ the prompt includes one.
Idea from Forward Future's Loop Library ยท by Matthew Berman. Prompt rewritten in plain English by FixKit AI.
More loops like this
Safe refactor (keep the shape)
Improves one part of the code, one small change at a time, without changing how the rest of the system talks to it.
Refactor until the design feels right
Reshapes a messy codebase step by step, testing and saving a checkpoint after each big step.
Tidy-up pass
Finds small messes like unused code, old comments, and broken links, and cleans them up one safe fix at a time.
Change it everywhere
After you change a value like a version number or a name, it hunts down every old copy so nothing is left out of date.
Branch and worktree cleanup
Sorts through old branches, pull requests, and work-in-progress, rescues anything useful, and removes what is truly dead.
React Doctor: perfect score
Uses the React Doctor tool to push every React app in a project to a real 100 out of 100 health score.
