a claude code skill
Then it says:
safe to shutdown.
Closing the tab does not wipe your files. It wipes everything Claude was holding in its head. shutdown flushes that to disk first, like an OS before power-off.
❯curl -fsSL https://raw.githubusercontent.com/jah2488/shutdown/main/install.sh | bash
Piping a script into a shell deserves a look first. Read it here.
❯/shutdown
✓ learning saved: 2026-06-25-retry-backoff.md
✓ handoff none, task complete
✓ git api: WIP commit · unpushed: 1
⚠ drafts reply-draft.md written, unsent
✓ background none
safe to shutdown
what gets lost
The working tree survives. The thinking does not.
Ctrl-C and a closed tab leave your uncommitted files right where they were. That part is safe.
What dies is in-context knowledge: the thing you just figured out, the dead end you ruled out, the decision and the reason behind it, the exact spot you stopped at in a half-done task.
Next session starts cold and reconstructs it, or never does. shutdown spends its effort there first, then makes git safe, then gets out of the way.
It is buffer-flush-before-power-cut, not a retrospective. Fast, silent, done.
the checklist
Four passes, run in parallel.
Each one skips itself when there is nothing to do. No busywork, no manufactured "learnings".
Learnings worth keeping
A durable, non-obvious fact a future session would want, and that the repo and git history do not already hold, gets written to your notes. Nothing durable? It says so and skips.
A handoff, only if mid-task
If a task was unfinished, it writes a tight handoff so the next session resumes cold: goal, state, the literal next action, open questions, key files, decisions and why.
verified against git status and the real files before writing
Git safety
Dirty repos get a local WIP commit so nothing is implicit. On a default branch it branches first. It never pushes, and it stops to ask if a commit would mix unrelated changes or looks like it holds secrets.
Drafts and loose ends
Any unsent draft gets confirmed to a file instead of stranded in chat. Any background task, loop, or cron still running gets listed so you know it outlives the session.
the report
One scannable block, then nothing.
It reports what it did in glyphs, ends on the line you are waiting for, and stops. If a gate tripped, it tells you to look before you close.
✓ learning saved: 2026-06-25-retry-backoff-finding.md
✓ handoff saved: 2026-06-25-search-index-handoff.md
✓ git api: WIP commit on wip/shutdown-2026-06-25 · unpushed: 1
⚠ drafts reply-draft.md written, unsent (your call)
✓ background none
safe to shutdown
install
One file. No settings touched.
The installer drops the skill into ~/.claude/skills/ and changes nothing else. Read it first if you like; it is short.
❯curl -fsSL https://raw.githubusercontent.com/jah2488/shutdown/main/install.sh | bash
- 1Run the line above, or clone and run
./install.sh. - 2Restart Claude Code so it picks up the new skill.
- 3End any session with
/shutdown, or just say "done" or "goodbye".
Prefer manual? Copy skill/SKILL.md to ~/.claude/skills/shutdown/SKILL.md. That is the whole install.