shutdown
Skill1 starsChanged 21 days agoMITView on GitHub
Wind down one ticket's footprint on the user's request: stop lingering background tasks, remove its recoverable worktrees and branches, close the ticket. Anything unrecoverable or ambiguous is kept and asked about. For an MVP ticket, also release its environment hold and close it as decomposed. Use when asked to clean up or close out a ticket. Main session only; never from a `/sy:ship` worker or other subagent.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- Chadlenberg/chief-of-stafftheir own version, first seen Nov 8, 2026
- MarvinJWendt/skillstheir own version, first seen Oct 15, 2026
- mathruffian-dot/cross-device-agent-skillstheir own version, first seen Sep 4, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- mathruffian-dot/cross-device-agent-skills★ 27same name
- MarvinJWendt/skills★ 1same name
- Chadlenberg/chief-of-staff★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Only when a ticket is named or inferred from the current branch, run the tracker preflight …
- Very specific: line 35
Stop lingering background tasks this session started and no longer uses: TaskStop, CronDelete, ending a /loop, killing the dev servers and …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clean up after one ticket without losing work. The user's request is the approval: act directly on everything recoverable, and ask only about what is ambiguous or unrecoverable, which is listed as kept by default.
$ARGUMENTS
1. Preflight
Only when a ticket is named or inferred from the current branch, run the tracker preflight (${CLAUDE_PLUGIN_ROOT}/skills/shared/references/preflight.md); a failure stops here with its single ## Action needed block. With no ticket there is no tracker work and no preflight.
2. Inspect — read-only, scoped
- Scope. The ticket's
<ticket>/branches and worktrees (with or without a worktree), the detached worktrees whose directory name starts with<ticket>-under the resolvedworktree.root(get_config {"key": "worktree.root"}, per${CLAUDE_PLUGIN_ROOT}/skills/shared/references/config-values.md). With no ticket: the current worktree only. Never touch pre-existing untracked files, user files in/tmp, already-modified lockfiles, other sessions' worktrees, or branches with an open PR; the one allowed touch is retargeting a PR stacked on a branch being deleted (§ 4 step 4). - Worktrees.
git worktree list, andgit status --porcelain --ignoredin each. For a detached worktree alsogit branch -r --contains HEAD: empty means its HEAD is on no remote branch. - Branches. For each
<ticket>/branch,gh pr list --head <branch> --state all --json state,headRefOid; its tip is recoverable only if it equals a merged PR'sheadRefOid, or is an ancestor oforigin/mainor of the MVP ledger's newest harvest SHA (git merge-base --is-ancestor <branch> <ref>). - In-flight
/sy:ship.ship-state.yamlexists in the ticket's scratch dir and itspr:is unset or not yet merged (gh pr view <pr> --json state). - MVP ticket.
get-issueit: the newest# MVP ledgerentry's wholeagent_detail, its open hold and harvest SHA included, and whether a# MVP coverage manifestexists. A Task carrying a# MVP referencecomment brings its MVP ticket into scope the same way, for the MVP branch alone. - MVP branch. When a manifest exists,
get-issueevery Task named by any manifest: the MVP branch is retired only when each of them has reached delivered closure, following replacement links per${CLAUDE_PLUGIN_ROOT}/skills/tracker/SKILL.md§ Closure is not delivery, no manifest row is owned by a named group, a manifest is newer than the newestharvestledger entry, and its remote head equals the newest harvest SHA.
3. Kept, never deleted
Listed as kept, with the reason and the files named: a branch not judged recoverable and its worktree; a worktree with uncommitted changes; a worktree holding ignored files other than caches (__pycache__, .pytest_cache, .ruff_cache, .mypy_cache, node_modules, .pixi, .venv, target); a detached worktree on no remote branch; the worktrees and scratch directory of an in-flight /sy:ship, unless the user named that worktree or directory. Ask about these only if the user wants one gone, and ask through AskUserQuestion (${CLAUDE_PLUGIN_ROOT}/skills/shared/references/user-interaction.md).
4. Execute, in this order
- Stop lingering background tasks this session started and no longer uses:
TaskStop,CronDelete, ending a/loop, killing the dev servers andci_poll.shpollers it started. A task still doing work the user asked for is kept. - Primary checkout, as one Bash call (a lone
cdoutside the session's directories does not persist):cd <primary> && test -z "$(git status --porcelain)" && git switch main && git pull --ff-only. - Worktrees, except the one this session runs in:
git worktree removewithout--force, thengit worktree prune. The session's own worktree and its local branch are listed as kept, for the user to remove after/exit. - Branches. Skip the local branch checked out in this session's worktree, which git refuses to delete. A local branch whose tip equals a merged PR's
headRefOid:git branch -D(-dfails on squash merges). Any other recoverable branch:git branch -d, else keep it. A remote branch is deleted only when it still exists (git ls-remote --heads origin <branch>), its PR is merged, and the remote head equals thatheadRefOid. Before deleting it, retarget each open PR based on it (gh pr list --base <branch> --state open) to that merged PR's own base withgh pr edit <n> --base <base>, since the delete auto-closes them, and list each retarget in the closing report. The one other remote branch deleted is a retired MVP branch; nothing else remote. - Scratch: remove this session's scratchpad. Keep the ticket's shipyard
scratch_dir— it is the run record — unless the user asks. - Tracker. A merged non-MVP ticket:
set-status doneif it is not already. An MVP ticket not already done: post the hold-release# MVP ledgerentry per${CLAUDE_PLUGIN_ROOT}/skills/mvp/references/loop.md§ The ledger entry, only when the newest entry's hold is open, carrying the newest entry's snapshot forward withchange: holdandhold: none; then, only when a# MVP coverage manifestexists, the canonical decomposition closure, steps 3-5 of${CLAUDE_PLUGIN_ROOT}/skills/tracker/SKILL.md§ Canonical decomposition, with the reference SHA beside the replacement IDs inagent_detail. With no manifest, ask throughAskUserQuestion: keep the ticket open, or close it as abandoned (post-commentthe reason, thenset-status done). - Offer a memory write if the session taught a lesson; optionally name the next ready ticket.
5. A denied action stays denied
Apply the denied-write boundary in ${CLAUDE_PLUGIN_ROOT}/skills/shared/references/write-integrity.md: never retry a denied action another way. Finish everything else, then end with one ## Action needed block listing each denied action as an exact ! <command> line the user can run.
6. Summary
Re-read git worktree list and — for a ticket — get-issue; confirm no stopped task is still running (pgrep -f '[c]i_poll.sh poll <PR>', CronList) and git branch --list '<ticket>/*'. End with what is left and why, and "type /exit".
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

