Loop/Prompt Library / Loops from builders on X
๐ Fix it until the build is green
When the build or tests fail, the AI sorts out why, makes a small fix, and keeps going until everything passes.
Use it when: Your automatic build or tests (CI) keep failing and you want the AI to keep fixing until they pass.
๐ Stops when: The build and tests pass, or it tries [3] fixes for the same failure and stops.
Copy this loop
My build is failing: [link to the run or paste the error]. First, sort the failure: real bug, flaky test, or setup problem. Show the log lines that prove it. Then make the smallest fix on a new branch and run the build again. If it fails again, sort the new failure and try again. Never delete tests, skip checks, or turn off warnings to make it pass. If the same failure survives [3] fixes, stop and explain what you tried. Don't merge or deploy. Stop when the build is green; then list each fix and why it worked.
Review every change the agent makes before you keep it. Set a budget or round limit โ the prompt includes one.
Found on X ยท by @wuweiweiwu. Prompt rewritten in plain English by FixKit AI.
More loops like this
One useful thing every night
You give the AI a short mission, and each night it picks one task that moves you closer and leaves it for you to check in the morning.
Two watchers keep your agent healthy
Two separate AI helpers read your main agent's logs, find what broke, and must both agree on a fix before it is used.
Weekly skill cleanup
Once a week, the AI grades every saved skill or saved prompt it uses, removes the dead ones, and merges the repeats.
Overnight drafts that learn from results
Each night the AI drafts tomorrow's post from your content plan, and reads your notes about what worked before it writes the next one.
Split the work, keep only what passes
Splits a big job across several AI helpers working side by side, checks each one's work, and keeps only the work that passes.
Practice a website task until it's reliable
The AI tries a website chore, learns from each failed try, and keeps adjusting until it has steps that work every time.
