Rollback
Emergency cleanup of all autoimprove experiment worktrees. Use this if a session was interrupted, Claude crashed mid-experiment, or you want to abort the loop and clean up all branches and worktrees.From its SKILL.md
npx -y skills add benmarte/autoimprove --skill rollbackAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 8 commands, including `git worktree list` and 7 more.
SKILL.md
1.9 KB, 418 tokens by cl100k_base, as published. Nobody here has run it
Rollback / Cleanup Skill
Since experiments run in isolated worktrees, there's nothing to "rollback" from the main branch — it was never touched. This skill cleans up any leftover experiment worktrees and branches from an interrupted or aborted session.
Step 1 — Show what will be removed
echo "=== Active worktrees ==="
git worktree list
echo "=== Experiment branches ==="
git branch | grep "autoimprove/experiment"
echo "=== Worktree directory ==="
ls .claude/autoimprove/worktrees/ 2>/dev/null || echo "(empty or missing)"
Show the user what will be removed and confirm before proceeding.
Step 2 — Remove all experiment worktrees
# Remove worktrees
for wt in .claude/autoimprove/worktrees/experiment-*; do
[ -d "$wt" ] && git worktree remove "$wt" --force && echo "Removed worktree: $wt"
done
# Prune any stale worktree references
git worktree prune
Step 3 — Delete experiment branches
git branch | grep "autoimprove/experiment" | xargs -r git branch -D
echo "Experiment branches deleted"
Step 4 — Remove the container directory
rm -rf .claude/autoimprove/worktrees
echo "Cleaned up .claude/autoimprove/worktrees/"
Step 5 — Verify clean state
echo "=== Main branch status ==="
git status
git branch --show-current
echo "=== Remaining worktrees ==="
git worktree list
Report: "✅ Cleanup complete. Main branch is clean and untouched."
Safety notes
- This skill never touches the main branch
- Already-merged winning experiments stay in the main branch history — only pending/discarded experiments are removed
- If a worktree can't be removed cleanly, use
--force(already included above)
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.