FixKit AI

Loop/Prompt Library / Testing & QA

๐Ÿ” Fix flaky tests

Finds tests that pass sometimes and fail other times, and fixes the real cause instead of just retrying.

Use it when: Your test results change from run to run even when nothing changed.

๐Ÿ›‘ Stops when: The full test suite passes [N] times in a row under the same conditions.

Copy this loop

Run [test suite] [N, e.g. 10] times under the same conditions and list tests that sometimes fail. Take the flakiest one and find the real cause: shared state, timing, test order, or an outside service. Fix that cause. Never add a blind wait or an automatic retry to hide it. Run that test [N] times, then the full suite. Repeat for at most [5] flaky tests. Stop when the full suite passes [N] times in a row, or progress stalls. Report each flake, its cause, and the fix.

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 hungtv27 (@hungtv27). Prompt rewritten in plain English by FixKit AI.

More loops like this

Full test coverage

Keeps adding useful tests until every line of code is tested.

Win-streak testing

Tests real-world scenarios one after another; any failure gets fixed and the streak starts over.

Test everything, end to end

Lists every screen, button, and workflow in the app, tests each one like a real user, fixes the bugs, and tests it all again.

Brand-new-computer setup test

Pretends to be a new developer: follows only the README on a clean machine and fixes every step that does not work.