Clean Up a Messy Repo
Coding
Audit branches, PRs, and worktrees; recover anything valuable and safely remove the stale rest. Inspired by Forward Future's Loop Library.
Prompt
Step 1 — Inventory the state List local and remote branches, open PRs, and worktrees. Ask the AI to group them into active, stale, and unclear. Step 2 — Recover the valuable For anything unclear, inspect it and decide whether it holds work worth keeping. Preserve what matters. Step 3 — Remove the stale Delete or archive branches, PRs, and worktrees that are clearly abandoned, one at a time. Step 4 — Confirm a clean state Verify that everything remaining is current, owned, and intentional. Stop when nothing stale is left.
Use this prompt in AIniverse
Tap to copy, run it on ChatGPT / Claude / Gemini, save to your stack, or remix.
Open in AppMore Coding prompts
Independent Verifier Pass
When implementation claims done, a separate verifier pass runs build, lint, and tests with no access to the implement...
API Contract Until Match
Loop until API responses match the OpenAPI or JSON Schema contract — catch drift between docs and implementation.
De-Sloppify Pass
After implementation, run a cleanup pass: remove debug code, tighten naming, delete dead branches, and align with pro...
Merge Conflict Resolver
Rebase or merge target branch, resolve conflicts file by file, and loop until the branch is current and tests pass.