cleanuplisted
Install: claude install-skill gitgitWi/council-flow
# flow:cleanup — Post-task teardown
The end of a flow task leaves transient state behind: a dev server or e2e run still holding a port, a Playwright/agent-browser process, an isolated worktree, and (for deployable projects) preview deployments piling up per branch. Cleanup reclaims all of it in one deliberate pass.
**Recommend-only.** No skill auto-invokes cleanup — `flow:deploy` and `flow:orchestrate` *mention* it as the next step, but the user starts it. It is destructive (removes a worktree, kills processes), so it always runs by explicit intent, usually in its own session after the PR is merged.
## When to run
- The task's **PR is merged** (or explicitly abandoned) — the branch's work is durable in `main`, or intentionally dropped.
- You have background resources from the task still running (dev server, e2e watcher, browser automation).
- Worktrees / preview deployments from finished phases are accumulating.
Do **not** run cleanup on a task still in progress, or on a PR awaiting review whose worktree you still need.
## Preconditions (check first)
1. **Confirm the work is durable.** The PR is merged, or the user confirms the branch is being abandoned. If unmerged commits exist that aren't on any remote, **stop and surface them** — do not remove a worktree that would lose work.
2. **Confirm the worktree is clean** (`git -C <worktree> status --porcelain`). Uncommitted changes → show them and ask before removing. **Note:** `.flow/tasks/` is gitignored, so its contents