handoff

handoff is a command for Claude Code from Sagargupta16/claude-cost-optimizer. It costs 25 tokens per session (364 once invoked), scanned A, original, MIT.

A short project-status record written to .claude/handoff.md before a conversation is cleared or paused for a long time. It records the goal, completed work and evidence, next steps, changed files, open questions, and commands for checking the current state.

In plain words
What is it for?
Use it when changing sessions, taking a long break, or handing a coding task to another agent. It captures the exact state needed to continue and verify the work.
Why use it?
It lets a new session resume work without depending on the previous conversation. It also warns when the handoff file is not ignored by Git and could be committed accidentally.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-cost-optimizer plugin — 1 skill, 4 commands, 3 agents, 2 hooks shipped together

Good fit Use it when changing sessions, taking a long break, or handing a coding task to another agent. It captures the exact state needed to continue and verify the work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sagargupta16/claude-cost-optimizer/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/Sagargupta16/claude-cost-optimizer

Made for: Claude Code.

Or install claude-cost-optimizer, the plugin that ships this one along with the rest of its 1 skill, 4 commands, 3 agents, 2 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/commands/sagargupta16/claude-cost-optimizer/handoff/github.svg)](https://agentmods.dev/commands/sagargupta16/claude-cost-optimizer/handoff)
Your own site
<a href="https://agentmods.dev/commands/sagargupta16/claude-cost-optimizer/handoff"><img src="https://agentmods.dev/badge/commands/sagargupta16/claude-cost-optimizer/handoff/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for handoff

Your own site · 80×15
<a href="https://agentmods.dev/commands/sagargupta16/claude-cost-optimizer/handoff"><img src="https://agentmods.dev/badge/commands/sagargupta16/claude-cost-optimizer/handoff.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 364 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.00025 $0.00364
Opus 5.5 $0.00010 $0.00146
Sonnet 5.5 $0.00005 $0.00073
Haiku 4.5 $0.00003 $0.00036

Measured 29d ago against content hash 69d1f6e7dd08, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 29d 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.

templates/commands/handoff.md · 24 lines

What it actually says

Handoff

Write a short handoff so a fresh session (after /clear, or a new one) can pick this work up without the old conversation. Run it while the prompt cache is still warm: once the cache has expired, this turn re-sends the whole conversation at the cache-write rate before it writes anything.

Instructions

  1. Overwrite .claude/handoff.md in the project root with at most 40 lines, under these headings:

    • Goal: one or two lines.
    • Done: what is finished, with the proof (the command run and what it showed).
    • Next: the next concrete steps, in order.
    • Files touched: paths only, one per line, no contents.
    • Open questions: anything undecided or waiting on the user.
    • Commands to re-run: the exact commands that show the current state (tests, build, a server).

    Write facts, not instructions to a future assistant. No secrets, tokens or credentials, and no pasted file contents.

  2. Run git check-ignore -q .claude/handoff.md. If the file is not ignored, say so and suggest adding .claude/handoff.md to .gitignore, so it is never committed. The optional loader hook (hooks/handoff-loader.sh) only reads an ignored, untracked file.

  3. Print the same notes in chat inside one code block, so they can be pasted into a new session when no hook loads them.

Reply with that code block and one line naming the file. Nothing else.

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. 29d ago First seen · 24 lines · 25 tokens per session scan A 69d1f6e7dd08

Subscribe to this mod's changes

handoff is a command published in the GitHub repository Sagargupta16/claude-cost-optimizer (49 stars, last pushed 2d ago), licensed MIT. It adds 25 tokens to every session and 364 once invoked, about $0.0001 per session on Opus 5.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-11-04.

Related

handoff compared with commands from other repositories

handoff next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
handoffSagargupta16/claude-cost-optimizerCommand492d agoMITA25Claude Code
parkFlorianBruniaux/claude-code-ultimate-guideCommand7.6kyesterdayCC-BY-SA-4.0A14Claude Code
iteratexiaobei930/cc-bestCommand505mo agoMITA11Claude Code
pairxiaobei930/cc-bestCommand505mo agoMITA10Claude Code
checkpointxiaobei930/cc-bestCommand505mo agoMITA9Claude Code
audit-agents-skillsFlorianBruniaux/claude-code-ultimate-guideCommand7.6kyesterdayCC-BY-SA-4.0A20Claude Code
atomic-helpdamusix/atomic-claudeCommand117yesterdayMITA57Claude Code