handoff

handoff is a command for Claude Code from sumulige/sumulige-claude. It costs 8 tokens per session (585 once invoked), scanned A, original, MIT.

A command that records the current work context in a handoff document for continuing in another session. The document covers the task, completed work, blockers, next steps, important files, and commands to resume.

In plain words
What is it for?
Use it before switching sessions, after compacting a long conversation, or when saving a concise or full progress record under .claude/handoffs/.
Why use it?
It prevents important project details from being lost when a conversation becomes too long or another session takes over.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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 commands/sumulige/sumulige-claude/handoff
Clone the repo
git clone --depth 1 https://github.com/sumulige/sumulige-claude

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/sumulige/sumulige-claude/handoff.svg)](https://agentmods.dev/commands/sumulige/sumulige-claude/handoff)
Your own site
<a href="https://agentmods.dev/commands/sumulige/sumulige-claude/handoff"><img src="https://agentmods.dev/badge/commands/sumulige/sumulige-claude/handoff.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 585 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00008 $0.00585
Opus 5 $0.00004 $0.00293
Sonnet 5 $0.00002 $0.00117
Haiku 4.5 $0.00001 $0.00059

Measured 5d ago against content hash 14a6b28b5818, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

.claude/commands/handoff.md · 94 lines

What it actually says

/handoff

生成上下文交接文档,用于会话切换或新对话开始时的上下文传递。

使用方式

/handoff              # 生成交接文档(默认)
/handoff --save       # 保存到 .claude/handoffs/
/handoff --compact    # 生成精简版本

工作流程

Step 1: 收集当前上下文

分析当前会话,提取以下信息:

  1. 任务概述 - 当前正在做什么
  2. 已完成工作 - 完成了哪些步骤
  3. 阻塞点 - 遇到了什么问题
  4. 下一步行动 - 接下来要做什么
  5. 关键文件 - 涉及的重要文件

Step 2: 生成交接文档

# Handoff: [任务名称]

**Date**: YYYY-MM-DD HH:mm
**Session**: [session-id]

## Summary
[一句话描述当前任务]

## Progress
- [x] 已完成的步骤 1
- [x] 已完成的步骤 2
- [ ] 进行中的步骤

## Blockers
- [阻塞点描述]
- [需要解决的问题]

## Next Steps
1. [下一步行动 1]
2. [下一步行动 2]

## Key Files
| File | Purpose |
|------|---------|
| `path/to/file.ts` | [文件作用] |

## Context
[重要的技术决策或上下文信息]

## Commands to Continue
```bash
# 继续工作的命令
cd /path/to/project
# 相关命令...

### Step 3: 保存(可选)

如果使用 `--save`,保存到:

.claude/handoffs/ └── handoff-YYYY-MM-DD-HHmm.md


---

## 最佳实践

1. **定期生成** - 长会话每 30 分钟生成一次
2. **上下文过长时** - 使用 `/compact` 后生成 handoff
3. **切换任务前** - 保存当前上下文
4. **新会话开始** - 读取最近的 handoff 文档

## 与 memory/current.md 的区别

| 特性 | /handoff | memory/current.md |
|------|----------|-------------------|
| 目的 | 会话交接 | 持久状态 |
| 粒度 | 当前任务 | 项目全局 |
| 更新频率 | 每次会话 | 会话结束 |
| 格式 | 结构化文档 | 状态快照 |
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. 5d ago First seen · 94 lines · 8 tokens per session scan A 14a6b28b5818

Subscribe to this mod's changes

handoff is a command published in the GitHub repository sumulige/sumulige-claude (2 stars, last pushed 6mo ago), licensed MIT. It adds 8 tokens to every session and 585 once invoked, about $0.0000 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-08-31.