Flywheel Cleanup — Git skill for Claude Code
Clean up orphaned git worktrees from crashed or stopped sessions.
How to install Flywheel Cleanup
Installs to ~/.claude/skills/burningportra-agent-flywheel-plugin-flywheel-cleanup/SKILL.md
mkdir -p ~/.claude/skills/burningportra-agent-flywheel-plugin-flywheel-cleanup && curl -fsSL https://raw.githubusercontent.com/burningportra/agent-flywheel-plugin/HEAD/commands/flywheel-cleanup.md -o ~/.claude/skills/burningportra-agent-flywheel-plugin-flywheel-cleanup/SKILL.md Restart Claude Code, or start a new session, for it to be picked up.
What Flywheel Cleanup does
description: Clean up orphaned git worktrees from crashed or stopped sessions. argument-hint: ""
**First action:** Run `git worktree list --porcelain` via Bash and diff the result against `.pi-flywheel/checkpoint.json` to identify orphaned worktrees before prompting the user.
Clean up orphaned git worktrees.
- Run
git worktree list --porcelainvia Bash to list all active worktrees. - Compare against tracked worktrees in
.pi-flywheel/checkpoint.json(if any). - Identify orphaned
Alternatives in Git
- 使用 Git Worktrees — 创建孤立的 Git worktrees,带有智能目录选择与安全验证 115.1k ★
- Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
- Worktree Parallel Init — Create multiple git worktrees for parallel development: $ARGUMENTS 23.4k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Flywheel Doctor
One-shot diagnostic of every flywheel dependency. Reports MCP connectivity, Agent Mail, br/bv/ntm/cm, node, gi
Branch Cleanup
Clean up merged, stale, and orphaned git branches. Protects main/develop/release/ automatically. Supports --dr
Mise Clean
Sweep the project for hygiene cruft — junk tracked in git, backup/scratch files, stale branches and orphaned w
Manage Worktrees
List, create, clean up, and manage git worktrees across all project repositories
Clean Gone
Cleans up all git branches marked as [gone] (branches that have been deleted on the remote but still exist loc
Cleanup Merged
Clean up worktree and local + remote branch for a merged PR
Related Agents
Deadcode Reaper
Use this agent to clean up after code changes — removing the imports, helpers, exports, and files that THIS se
Noor
Engine engineer. Owns the main process: sessions on the Claude Agent SDK, hooks, approvals, git worktrees, scr
Branch Hygiene
MUST be used whenever the user asks to find stale, merged, or orphaned git branches, or asks to review/clean u