handoff
An agent skill, for both Claude Code and Codex CLI, that ends a work session by writing a lean, resumable note, so a fresh session picks up the work without re-reading the whole conversation. Start cold, resume warm, keep your sessions short and cheap.
The problem
Long sessions get slow and expensive. Every turn carries the entire history along, the context eventually gets summarized or dropped, and continuing tomorrow means replaying hours of conversation. Keeping one giant session alive just to preserve context is the costly way to stay continuous, and it still loses the thread in the end.
The lean way is the opposite: capture the few things that actually matter in a durable note, then start a fresh, cheap session that reads a screenful and resumes. This matters most when you are watching a usage cap, but shorter sessions are faster and clearer for everyone.
What it does
The skill writes a handoff note when a session winds down, and reads it back to resume.
- Captures state, not transcript. Goal, what is done, what is in progress, decisions and why, the next step, and pointers to the key files and commits.
- Why over what. The repository already records what changed. The note records why a path was chosen, which is the expensive thing to rediscover.
- Points, does not paste. References
path:line, commit SHAs, and URLs instead of copying code, so the note stays correct and tiny.
- Evidence provenance. Separates freshly verified work, supplied historical results, and believed-but-unverified claims, so a resume never treats stale evidence as current.
- Lean by design. Targets a screenful. A handoff is an index, not a log.
File structure
handoff/
├── .claude-plugin/
│ ├── plugin.json # plugin manifest (name, version, metadata)
│ └── marketplace.json # one-plugin marketplace, so it installs from this repo
├── .codex-plugin/
│ └── plugin.json # Codex plugin manifest
├── .agents/plugins/
│ └── marketplace.json # Codex marketplace
├── hooks/
│ ├── hooks.json # Claude startup update check
│ └── codex-hooks.json # Codex startup update check
├── scripts/
│ └── check-update.mjs # dependency-free release checker
├── skills/
│ └── handoff/
│ ├── SKILL.md # the rules the agent loads (Claude Code or Codex)
│ └── references/
│ └── patterns.md # template, good/bad examples, storage, chaining
├── commands/
│ ├── save.md # /handoff:save, write the note now
│ └── resume.md # /handoff:resume, load the newest note and continue
├── examples/
│ ├── good-handoff.md # an exemplary note that obeys every rule
│ └── bad-handoff.md # the same work written as a transcript, and why it fails
├── README.md # this file
├── LICENSE # MIT
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── SECURITY.md
└── CITATION.cff
skills/handoff/SKILL.md carries the rules and triggers. skills/handoff/references/patterns.md holds the template, good-versus-bad example entries, the .handoffs/ storage layout, and how to chain notes across several sessions, which Claude reads when it needs the detail.
The architecture is Markdown-first: the skill, references, and commands define the product behavior. The only runtime code is the small, dependency-free Node.js update checker used by managed plugin installs. It remains JavaScript because a TypeScript migration would add a build and shipped dependencies without improving the current runtime boundary. CI uses Node 20 to test that checker, validate the reliability fixtures and JSON manifests, and inspect the package contents.
Examples
examples/ holds a complete handoff note and its badly-written twin, so the difference between a note you can resume from and one you cannot is concrete:
examples/good-handoff.md leads with the next step, labels fresh, historical, and unverified evidence, records why each decision was made, and points at path:line and commit SHAs instead of pasting code.
examples/bad-handoff.md is the same work as a transcript: relative dates, pasted code, no clear next step, and confirmed mixed with assumed. Its header comment lists exactly what makes it fail a resume.
Install
Two ways to install, depending on whether you want a managed plugin or a plain skill.
As a Claude Code plugin
In Claude Code, add the marketplace and install the plugin:
/plugin marketplace add codewithasnari/handoff
/plugin install handoff@handoff
You get version tracking, managed updates, startup update notices, and the namespaced commands /handoff:save and /handoff:resume. Claude Code manages the plugin; the notice itself is informational and does not ask yes/no or install anything.
As a plain skill (for a bare /handoff)
Copy the skill folder into your personal skills directory: