handoff

handoff is a skill for Claude Code, Codex from Sting25/claude-code-handoff. It costs 106 tokens per session (6,127 once invoked), scanned B, original, MIT.

A session handoff tool that records repository state and work context in a Markdown file before starting a new coding session. A handoff helps another session continue after a clean stopping point.

In plain words
What is it for?
Use it after a commit, when a work track ends, or when context is getting full. It records Git details and relevant in-progress Markdown documents, with optional support for a sibling repository.
Why use it?
It prevents important progress, decisions, and uncommitted work from being lost when a session ends or its context becomes too large. It requires the companion scripts and hooks to be installed.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claude-code-handoff plugin — 3 skills, 6 hooks shipped together

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.

agentmods
npx agentmods add skills/sting25/claude-code-handoff/handoff
Any agent
npx skills add Sting25/claude-code-handoff --skill handoff
Clone the repo
git clone --depth 1 https://github.com/Sting25/claude-code-handoff

Made for: Claude Code, Codex.

Or install claude-code-handoff, the plugin that ships this one along with the rest of its 3 skills, 6 hooks.

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/skills/sting25/claude-code-handoff/handoff.svg)](https://agentmods.dev/skills/sting25/claude-code-handoff/handoff)
Your own site
<a href="https://agentmods.dev/skills/sting25/claude-code-handoff/handoff"><img src="https://agentmods.dev/badge/skills/sting25/claude-code-handoff/handoff.svg" alt="Measured on agentmods" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,127 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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 $0.00106 $0.06127
Opus 5 $0.00053 $0.03063
Sonnet 5 $0.00021 $0.01225
Haiku 4.5 $0.00011 $0.00613

Measured 3d ago against content hash cfd519f47bf4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

handoff scanned grade B with 1 finding 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

> in `~/.claude/settings.json` are NOT part of this file. Run
skills/handoff/SKILL.md · 451 lines

How it starts

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

/handoff — write a session handoff

Prerequisite: this skill drives scripts and hooks from https://github.com/Sting25/claude-code-handoffwrite_handoff.sh under ~/.claude/bin/ (script install) or the plugin's bin/ (plugin install) and the Stop / SessionStart / SessionEnd hooks in ~/.claude/settings.json are NOT part of this file. Run ./install.sh from that repo (or install the plugin) once per machine before first use.

Used at clean boundaries (after a commit, when a major track wraps), when the user signals context pressure, or whenever the user invokes /handoff. Hands the next session a complete state snapshot so nothing gets lost across the restart boundary.

What this skill does

  1. Snapshot state — runs write_handoff.sh (resolved from ~/.claude/bin/ on a script install or the plugin's bin/ on a plugin install — see Steps below), which captures:
    • HEAD, branch, recent commits, working-tree state for the current repo
    • Same for an optional sibling "substrate" repo (configured via HANDOFF_SUBSTRATE_NAME, e.g. a shared decisions / RFCs repo)
    • In-flight (untracked or modified) .md docs under the configured directories (default: docs/; configurable via HANDOFF_INFLIGHT_DIRS)
    • The "verify state matches reality" command block
    • Before overwriting handoff_current.md, the script rotates the previous one into .claude/handoff_history/ and prunes to the last HANDOFF_HISTORY_KEEP (default 5). The next session's SessionStart hook auto-includes the most recent history entry if the current handoff has no curated Notes; /handoff-more lets a future session pull more of the history into context on demand. (Auto-compaction is also checkpointed: a PreCompact hook fires the same --if-curated safety net, so an uncurated session gets a mechanical snapshot before compaction destroys the conversation. That snapshot is a placeholder — running /handoff to curate is still the only path that captures intent.)
  2. Replace the placeholder block with session-specific intent — the script's snapshot is git-state-only; the conversation knows things git doesn't (decisions made, in-flight ASKs, open questions, "next session should start with X" notes). The auto-generated file contains a ## Notes from this session section with a placeholder block bracketed by a <!-- HANDOFF_PLACEHOLDER: ... --> sentinel comment. Replace the entire placeholder block (sentinel + italic prose) with curated Notes using Edit — do not just append below the placeholder, because the SessionEnd safety-net detects "no curation happened" by the presence of that sentinel. Removing the sentinel is what tells the SessionEnd hook to stand down and preserve your work. Explicit fences for the next session go in the marker-wrapped ## Rules section, NOT in Notes (see Steps). After editing, re-sign with write_handoff.sh --restamp so the rules load as binding, not data.
  3. Confirm the raw-dump backup exists — the Stop hook (handoff_turn_append.sh) has been appending turn-by-turn to .claude/handoff_backups/handoff_raw_<session_id>.md throughout the session, so by the time /handoff runs the backup is already there. Verify it: ls -la .claude/handoff_backups/. If the file is missing (hook not installed, or session started before the hook landed), fall back to writing a one-shot dump per the "Raw dump fallback" section below. The hook prunes to 3 newest automatically — you do not need to.
  4. Print a loud, unmissable banner — the ASK must be impossible to miss (the user specifically asked for this; do not soften).
  5. Stop. Do not start new work after the banner. The session is over.

Read the full file on GitHub · 451 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 451 lines · 106 tokens per session scan B cfd519f47bf4

Subscribe to this mod's changes

handoff is a skill published in the GitHub repository Sting25/claude-code-handoff (4 stars, last pushed 5d ago), licensed MIT. It adds 106 tokens to every session and 6,127 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

s-continue

Cheaper and faster than /compact. Restores previous session context from Claude Code AND Codex transcripts by reading them directly — no LLM calls, no token cost. Also auto-loads a handoff written by /s-compact, if one exists. Triggers on "s-continue", "restore context", "what was I doing", "pick up where I left off"…

ww-w-ai/super-token-saver · 95 tokens

s-compact

Session handoff for the next session — write-side pair of /s-continue. Triggers on "s-compact", "session handoff", "handoff prompt", "hand off", "wrap up the session", "prep for next session". Distills what /s-continue cannot recover: subagent findings, tool-output numbers, and decisions that never entered the…

ww-w-ai/super-token-saver · 99 tokens

checkpoint

Save the current session to TokenMizer graph memory. Creates a persistent checkpoint with all tasks, decisions, files, and errors — resumable in any future session. Use when user says "save", "checkpoint", "remember this", "I'm done for today", or session is getting long.

Shweta-Mishra-ai/tokenmizer · 61 tokens

resume

Load a previous session from TokenMizer graph memory. Returns a compact context block (100-600 tokens) covering goals, completed work, decisions, open tasks, and files. Inject this as system context to continue exactly where you left off. Use when user says "resume", "continue from last time", "load my project", "what…

Shweta-Mishra-ai/tokenmizer · 86 tokens

resume

Write down where this stretch of work stopped, so the next session continues instead of restarting. Use at the end of a working session, or when handing the repository to someone else.

ArcticFox2029/chamnan · 36 tokens

capture

Write down a procedure worth keeping — a multi-step process, a trap that cost real time, or something that has now come up three times. Use it the moment you finish such a task, while the details are still exact.

ArcticFox2029/chamnan · 46 tokens