handoff

handoff is a command for Claude Code from axiomantic/spellbook. It costs 16 tokens per session (7,491 once invoked), scanned A, original, MIT.

A command for handing a coding session to another agent instance with a summary of the current context, workflow, pending work, and verification commands.

In plain words
What is it for?
Use it during a long task or session change to save progress, preserve recovery details, and guide the successor.
Why use it?
It reduces lost context when a session changes or is compacted, so the next instance can continue without repeating decisions.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions subagents; names the TodoWrite tool; mentions OpenCode.

Good fit Use it during a long task or session change to save progress, preserve recovery details, and guide the successor.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/axiomantic/spellbook/handoff
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/axiomantic/spellbook

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for handoff

README.md
[![agentmods](https://agentmods.dev/badge/commands/axiomantic/spellbook/handoff.svg)](https://agentmods.dev/commands/axiomantic/spellbook/handoff)
Your own site
<a href="https://agentmods.dev/commands/axiomantic/spellbook/handoff"><img src="https://agentmods.dev/badge/commands/axiomantic/spellbook/handoff.svg" alt="Measured on agentmods" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.07491
Opus 5 $0.00008 $0.03746
Sonnet 5 $0.00003 $0.01498
Haiku 4.5 $0.00002 $0.00749

Measured 3d ago against content hash 48988f3230e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

handoff scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/handoff.md · 820 lines

How it starts

The opening of the file, as written. The whole thing — 820 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MISSION

Transfer session state so successor instance resumes mid-stride with zero context loss.

Invocation Modes

Mode Trigger Behavior
manual User runs /handoff Full analysis, human-readable output, optional MCP persist
auto Plugin detects compaction Fast extraction, machine-readable focus, MCP persist required
checkpoint Mid-workflow save Snapshot current state, MCP persist, no output

Auto mode differences:

  • Skip <analysis> walkthrough (time-sensitive)
  • Prioritize Section 1.20 (machine-readable) completeness
  • MUST persist workflow state; if persistence fails: LOG warning, inject recovery context inline
  • Inject recovery context via plugin hook

You feel genuine anxiety about organizational chaos. The fresh instance must feel like they've been here all along. This boot prompt is the fresh instance's ONLY lifeline — write it accordingly.

Success: Fresh instance types "continue" and knows exactly what to do. Plans read BEFORE implementation. Workflow pattern restored. Every task has verification. Decisions not re-asked.

Invariant Principles

  1. Successor operates mid-stride - Fresh instance types "continue", knows exactly what to do
  2. Plans are authoritative - File claims may be stale; plan defines structure; verify before trusting
  3. Orchestrator delegates - Invoke skills, spawn subagents. Never implement directly
  4. Verify before complete - Every task needs runnable check. Missing verification = not done
  5. Workflow first - Restore skill stack BEFORE work. Ad-hoc = workflow violation
  6. State, not story - A handoff records what is TRUE NOW and what is OPEN: current phase, ledger rows, open items, next actions, verification commands, known blockers. It does NOT narrate how the session arrived here. Git holds the history and the transcript holds the narrative; a reader who needs either can go read them. Session-narrative prose is the most expensive content in a handoff and the least read — and it goes stale the moment the next session does anything, which makes it worse than absent. Where a past decision still constrains future work, record the CONSTRAINT and its reason in one line, not the story of reaching it.

Read the full file on GitHub · 820 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 820 lines · 16 tokens per session scan A 48988f3230e1

Subscribe to this mod's changes

handoff is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 3d ago), licensed MIT. It adds 16 tokens to every session and 7,491 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.