handofflisted
Install: claude install-skill MrToAster13/mrtoaster13-plugins
# Handoff
Write the state of this session to disk so a fresh session can pick it up cold. This is the alternative to `/compact`: instead of degrading the current context with a lossy summary, you persist what matters, the user runs `/clear`, and the resume skill reads it back into clean context.
You cannot run `/clear` yourself — a skill can't invoke slash commands. Your job is to write a handoff doc good enough that the next session needs nothing else, then tell the user to clear.
## Steps
1. **Resolve the handoff root once, and use it everywhere.** The handoff folder must live at a stable anchor so the resume skill looks in the same place, no matter which directory either skill runs from.
- In a git repo: `root="$(git rev-parse --show-toplevel)"`.
- Not a git repo: anchor to the current working directory, `root="$(pwd)"`, and say so in your closing message.
- The folder is `"$root/docs/handoffs/"`. Create it if missing. Use this absolute `$root/docs/handoffs/` path in every step below, in the `gh` command, and in the message to the user. Never mix "repo root" prose with a bare `docs/handoffs/` that resolves against the current directory.
2. **Pick the next number, numerically.** Look only at files in `$root/docs/handoffs/` whose names match `^[0-9]+-` (this ignores unrelated files, and ignores the repo's own `docs/example-handoff.md`, which lives outside `docs/handoffs/`). Parse the integer before the first hyphen, take the numeric maximum, add one, and zero-p