/fleet:cleanup [workspace ids or lane paths]from fleet
Clean up finished fleet lanes — list every lane with a verdict (ready, waiting or keep), ask which ones to remove, then exit their agents, archive their .fleet/ records, remove their worktrees, delete their merged local branches and run the project's own cleanup. Use when the user asks to clean up lanes, worktrees, panes or workspaces, or after pull requests merge.
Ships in fleet. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A lane is a linked git worktree that is open as a Herdr workspace, that sits in Herdr's worktrees directory, or that has a .fleet/ folder. Removing a lane deletes its folder. Remove nothing until the user picks the lanes in step 2.
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fleet" conventions. Note each cleanup command under ## Projects.python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fleet" sweep. It only reads. It puts every lane on this machine in a group, with the reason on its row, and, once a lane has an owner, the orch of each lane (orch <name> or unowned):
.fleet/ folder does not count) and no existing path outside .fleet/ marked assume-unchanged or skip-worktree (absent paths of a sparse checkout do not count). Ignored files do not count and go with the worktree, and with core.fileMode false a mode-only change is not seen. No agent works in it, and no commit is missing from the merge. cleanup removes these.python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fleet" retire PANE exits an idle agent there if the user wants the memory back..fleet/ marked assume-unchanged or skip-worktree, an agent at work, an agent that the helper cannot exit, a program running in a pane, a locked worktree, a checkout of the default branch, a detached HEAD whose commits no branch holds, commits that no merge or remote holds, no pull request, a closed pull request, or this session.python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fleet" board, and read the old .fleet/FLEET.md if you still keep one. A lane that is still in progress there (working, review, ready, blocked) stays, whatever the sweep says: a READY lane without a pull request (in main) can be a lane that has not committed yet.Show the groups in a short table. Then ask with AskUserQuestion. Name the lanes in each question: the user may see only the dialog.
--unmerged. Their worktrees go and their branches stay.## Projects names a cleanup command for a repository among the chosen lanes: "Run in afterwards (Recommended)", "Skip it".python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fleet" cleanup <target> [<target> ...]. Targets are the workspace ids and paths that the sweep printed. Add --unmerged only for lanes that the user chose under that option. Add --other-orch only when the user picked, in step 2, a lane that another orch owns; never add it on your own.
--other-orch was not passed, it changes nothing and prints refused with lane <path> belongs to orch <name>; pass --other-orch to remove it. Show that to the user, and ask whether to remove that lane anyway. From a pane that is no orch, in a project with several, every owned lane refuses that way: pass --orch <name> for the orch whose lanes they are, or --other-orch for lanes the user picked.error says that the orch changed. Sweep again and ask the user.git cannot tell the project of <path>; the worktree stays), it changes nothing. Run the sweep again later; never remove that worktree another way.lane <path> is being removed by a cleanup (process <pid>), another cleanup is at work: wait for it. Remove the removing key from that lane.json only when the user confirms that no cleanup runs.refused with the reasons. Show them, and sweep again. It checks each lane once more after its agents exit, right before the removal: a change or a flagged path that appears then keeps that worktree, with the count in the lane's error. It never forces a removal. That check is the main guard: with status.showUntrackedFiles=no, herdr worktree remove does not refuse a worktree with untracked files, and deletes them. For a lane without a workspace, the helper runs git worktree remove with -c status.showUntrackedFiles=all, so git refuses a worktree with an untracked file whatever the configuration.herdr worktree remove fails, that lane's worktree and branch stay, and its result has the error and, in by_hand, the command that would remove it. Show both to the user; never run that command yourself..fleet/ (without panes.json) to the archive path that it prints (the lanes/ folder of the project home, ~/.fleet/projects/<project>/), removes the worktree (Herdr closes the workspace and its panes), and deletes the local branch only when the merge holds every commit. It never pushes, and never deletes a remote branch.--unmerged) it releases it. When git cannot tell, for example because reflog expiry removed the creation entry, it releases: an error can turn a close into a release, never the reverse, so that another lane can take it (follow_ups_closed, follow_ups_released). Without a project or a PROJECT.md there is nothing to do. When it cannot change PROJECT.md (a busy lock, a file that is not UTF-8, an ID on two lines, a counter or log that cannot be read), the lane is still removed, nothing changes in PROJECT.md, and follow_up_error says why: fix the cause, then close them with follow-up done <ID> or free them with follow-up release <ID>. --dry-run lists the follow-ups under follow_ups.herdr pane read <pane> --source recent-unwrapped --lines 80, and tell the user.board and digest show the lane as removed. Add a follow-up that the cleanup leaves (a kept branch, a failed project cleanup command) with python3 "${CLAUDE_PLUGIN_ROOT}/scripts/fleet" follow-up add "<text>" --source "cleanup of <branch>". An old FLEET.md, if you keep one, marks each removed lane as cleaned.follow_up_error). Then the result of each project cleanup command.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rubycatco/herdr-fleet --plugin fleet9 skills in this plugin
/accountsShow remuda accounts, cached usage and the account of each agent pane; choose an account for new work by the user's rules; or move this session or a lane to another account. In plain mode (no remuda) it explains that accounts are not switched. Use when the user asks about accounts, usage, limits, or switching accounts./contextKeep agent context small in a fleet — decide between continuing, /compact with a focus, /clear with a re-brief from .fleet/ files, or a handoff to a new pane, for this session or a lane, and then do it. Use when context passes about 60 %, after a long run, when a lane gets slow or forgets rules, or when the user asks about compact, clear or context./fleetOrchestrate a fleet of coding-agent lanes in Herdr panes — open lanes in worktrees, brief and watch them, run critic rounds, reset or hand off lanes, pick remuda accounts, and clean up. Use whenever you drive other agents through Herdr (HERDR_ENV=1), or the user mentions lanes, a fleet, critic panes, or moving work to another pane.