
Claude Handoff
io.github.Vasilispapg由 GitHub 账号 Vasilispapg 发布v0.19.0更新于 Oct 24, 2026
Session handoff for Claude Code: list sessions and build handoff docs another agent continues from.
发布方自己的服务:Claude Platform Docs
概览
把本地 Claude Code 会话记录整理成交接文档和项目记忆简报,供另一个助手接着做。
- 可以做什么
- 列出本机上的 Claude Code 会话,显示标题、项目,并可按名称或对话内容搜索
- 按名称、项目或路径为指定会话生成交接文档,可选择匿名化以便分享
- 对会话做压缩摘要,默认确定性输出,仅在启动时显式开启后才允许调用大模型总结
- 把一个项目的全部会话历史提炼成记忆简报,含时间线、决策与待办线索
- 适用场景
- 适合在 Claude Code 会话崩溃、触及用量上限或终端被关闭后,把工作交给另一个模型或新会话继续。也适合让新会话一开始就掌握从历史会话提炼出的项目记忆。
- 运行要求
- 以本地 Python 包形式通过 stdio 运行(Python 3.9 以上,仅用标准库),例如用 uvx 启动。读取 Claude 主目录下的 Claude Code 会话存储。大模型总结需要在环境变量中提供 Anthropic、OpenAI 或 Gemini 的 API 密钥,或使用本机已安装的 Claude Code CLI 或 Ollama;确定性模式无需任何凭据。
安装
在 SourceWeft 中
- 打开 控制台中的 Claude Handoff,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
claude-handoff
[PyPI] [Python] [CI] [Downloads] [License: MIT]
Turn any Claude Code session — even a crashed one — into a clean handoff.md another AI can continue from. And give Claude Code permanent project memory, distilled from your own history.
That's it. Your latest session becomes handoff.md: the conversation without
the noise, the files that changed, the commands that ran — opening with
instructions to the receiving assistant, so you can paste it straight into
Gemini, GPT, claude.ai, or a fresh Claude Code session with zero extra
prompting.
[chf -o clipboard in action — five seconds from session to paste-ready handoff]
Claude Code stores every session locally as JSONL
(~/.claude/projects/…/*.jsonl), full of tool calls, tool results, thinking
blocks and system reminders. Existing exporters dump all of that into
markdown. claude-handoff instead produces a handoff document — and,
since it can read your entire history, a project memory brief too.
- Zero dependencies. Stdlib only, Python 3.9+. A nine-module package —
also shipped as a generated single-file script you can
curland audit. - Deterministic by default. No API call, no cost, works offline.
--llmwhen you want a real summary. Claude, OpenAI or Gemini via your own API key — or--llm claude-cli, which runs your locally-installed Claude Code CLI on your existing Pro/Max plan: no API key at all.- Noise-free. Drops tool results, thinking blocks, system reminders,
subagent chatter, slash-command envelopes. Keeps user intent, assistant
answers, files modified, commands run — including the files and commands
of subagents (
agent-*.jsonl), whose full transcripts stay behind--include-sidechains. - Project memory.
chf --briefdistills a project's ENTIRE session history into one living brief — what this is, where things stand, decisions, fixes, conventions, and an ordered resume plan of open threads, every claim citing its session;--install-brief-hookinjects it into every new Claude Code session, so Claude starts already knowing the project. - Safe to paste. Secret-looking strings (API keys, tokens,
password=…) are redacted from every output — the handoff you paste into a web chat is egress too.--anonymizegoes further for public sharing.
Prerequisites
No third-party Python packages, ever — everything runs on the standard library.
Install
Installing the package gives you two identical commands: claude-handoff
and the short alias chf. Tab completion:
60 seconds: pick your situation
A session crashed, hit the usage limit, or you closed the terminal:
…then paste into claude.ai, ChatGPT, Gemini — or a fresh claude session.
Works on any old session; nothing needed to be installed before the crash.
Moving work from Claude Code to another model:
"Which session was it where we talked about CORS?"
Give Claude Code permanent memory of this project:
A real summary instead of the transcript (goal / decisions / state / next):
A claude.ai or ChatGPT web chat instead of a terminal session:
Project memory (--brief)
Claude Code forgets everything between sessions — but the whole history is
on your disk. chf --brief reads every session of the current project
and writes one memory document to ~/.claude/briefs/<project>.md:
- a factual session timeline + most-touched files (deterministic, free);
- with
--llm, a distilled memory that opens with what this is (product, stack, current state) and where things stand (done / in flight / not started), then decisions with their why, fixed bugs, conventions — and open threads as an ordered resume plan, each with its concrete next action and a[in flight]/[blocked]/[not started]tag. Every bullet cites the session id it came from (chf --name <id>opens the source).
[chf --brief in action — the whole project history distilled into cited memory]
Per-session notes are cached, so refreshing after new sessions only pays for the new ones — and a monster session (beyond ~120k chars) is map-reduced inside the note, so the memory path never truncates: nothing is silently dropped, at any size.
You can also curate what feeds the memory: --exclude <id> leaves a
session out (a duplicate, an experiment — bare --exclude opens a
numbered picker that remembers: the stored exclusions arrive
pre-selected with ✗ and typed numbers toggle, so you edit the set
instead of re-picking it), and --keep first:2,last:20 windows a huge history to
the founding sessions plus a sliding recent window. Both are sticky —
stored in the brief's stamp, so hooks and later refreshes keep honoring
them until you change them (--exclude none, --keep all). And
chf --brief -o clipboard ships the current brief — distillation
included — straight to the clipboard, one paste away from handing your
project memory to another model.
The brief also goes beyond the project store: chf --brief --grep X -o - distills a thematic memory (only the sessions that talked
about X), and chf conversations.json --brief -o brief.md builds
standing memory from a claude.ai or ChatGPT export — every
conversation, cited by its id. Both are exports by design (explicit
-o only) so they never overwrite the standing brief.
Running graphify? The two tools compose in both directions, zero
config: chf --brief -o graphify files the current memory into raw/
— one evolving project-memory.md that the next /graphify --update
links into the code's knowledge graph — and once
graphify-out/graph.json exists, every brief gains a free ## Code map (communities, hub concepts, cross-community bridges:, labeled
flows:) so new sessions know the code's structure, not just its
history. The in-project copies (raw/project-memory.md, optional root
BRIEF.md) refresh on every brief write — strictly refresh-only,
hooks never create files. The full loop lives in
docs/GUIDE.md.
installs two hooks: SessionStart injects the brief as context (Claude
starts already knowing your project — re-injected after /compact too),
SessionEnd auto-refreshes the factual part for free. No LLM ever runs
from a hook; the distilled part refreshes only when you say so. The brief
carries a freshness stamp, and when newer sessions or commits exist the
file and the injection don't just warn — they list them (session titles,
commit subjects), so a fresh session sees what changed, not merely that
something did. Fully local; redaction applies as everywhere.
→ Step-by-step mechanics, the honest cost table, and a full day-with-it walkthrough: docs/GUIDE.md.
Make it automatic
PreCompact matters: right before Claude Code compacts a long session's context, both hooks snapshot state — the handoff preserves detail that compaction is about to squeeze away, and the brief skeleton stays fresh mid-session.
Both edit ~/.claude/settings.json non-destructively, are idempotent, and
have matching --uninstall-* flags. Hook failures never break the host
session, and hooks never trigger LLM calls or create files on their own.
The third one is for Claude itself: --install-skill puts a
/claude-handoff skill into ~/.claude/skills/ (plus its trigger in
~/.claude/CLAUDE.md), so Claude Code knows the tool's grammar instead of
guessing — which session bare chf picks from inside a live session,
claude-cli (subscription) vs claude (API key), --fit for token
budgets, no interactive pickers from an agent shell. Idempotent, respects
a hand-written section, and --uninstall-skill removes both pieces
without touching anything else in either file.
What the output looks like
Every turn is there, condensed to its lead — it's a summarize tool, not
an exporter. --full switches to classic verbatim messages, and --llm
replaces the digest with a real summary that read everything.
Common commands
Where does it look? Sessions live in Claude Code's global store
(~/.claude/projects), so you can run chf from anywhere. If your current
directory is a project (or a subfolder of one), it scopes to that
project's sessions; a parent "master folder" scopes to every project under
it; --any ignores the directory entirely. Auto-selection skips
nearly-empty sessions (like the stub claude /login leaves behind) so
"latest" means your latest real conversation — an explicit path, --name
or -i always wins.
Big sessions. Transcripts beyond one pass (~400k chars) are summarized
map-reduce style: notes per chunk, then one synthesis — nothing is silently
dropped, and finished chunks are cached in ~/.cache/claude-handoff so an
interrupted run resumes for free. Chunks run 4-way parallel on API
providers; claude-cli and ollama stay sequential by design. In a
terminal you get a live progress bar:
Sessions with API usage data also get a Tokens line in the header,
and every run reports the output's ≈token size.
Privacy & zero-trust
- Nothing is sent anywhere unless you pass
--llm— deterministic mode is fully offline. - Redaction is on for every output, not just LLM traffic: secret-shaped
strings (API keys, tokens, JWTs,
password=…) are stripped from the handoff itself, hook files, and MCP replies — a pasted document is egress too.--no-redactopts out per run (and is deliberately not allowed in the config file). --anonymizeadditionally collapses your home directory to~and replaces emails, IPv4s and your username with placeholders — for pasting into public issues and forums.--llm claude-cliand--llm ollamakeep everything inside accounts and machines you already control.- Prompt-injection defense: transcripts routinely embed untrusted text (web pages in tool results, pasted READMEs). Every prompt that consumes a transcript, the handoff preamble, and the brief injection wrapper all frame that content as data, not instructions — pinned by tests. A mitigation, not a proof; the parser itself never executes anything.
Config (optional)
Put defaults you always use in ~/.config/claude-handoff/config.json
(CLI flags always win; CLAUDE_HANDOFF_CONFIG overrides the path):
Allowed keys: llm, model, fit, output, include_tools,
include_sidechains, max_chars, anonymize, focus. Security switches
(no_redact) are deliberately not configurable — weakening redaction
must be an explicit per-run choice. A broken config warns and is ignored,
never fatal.
Environment variables
claude-cli needs no variable — it shells out to your installed
Claude Code CLI, billed to your Pro/Max plan
(run claude once to log in).
MCP server
Any MCP client (Claude Desktop, Claude Code, …) can pull handoffs directly:
Tools: list_sessions (what's on this machine) and handoff (build the
document for a session by name/project/path; pass anonymize for a
shareable version). Deterministic by default — an MCP client can only
trigger LLM summaries when you start the server with --allow-llm.
Troubleshooting
claude-handoff: command not found after pip install
pip puts scripts in a user bin dir that may not be on PATH. Use
pipx install claude-handoff or brew — both manage PATH — or add
~/.local/bin (Linux) / ~/Library/Python/3.x/bin (macOS) to your PATH.
"No sessions found under ~/.claude/projects"
You're on a machine (or user) that hasn't run Claude Code, or your store
lives elsewhere — point CLAUDE_HOME at it. Inside a project folder the
tool scopes to that project; pass --any to search everything.
It picked the wrong session
"Latest" skips nearly-empty stubs but is still just the newest file. Use
-i (picker), --name "part of the title", or --grep "something said".
--llm claude-cli fails or asks to authenticate
Run claude once and log in (/login). It works even when invoked from
inside a Claude Code session — inherited CLAUDE* env vars are scrubbed
so the nested CLI authenticates like a fresh one.
--llm claude-cli fails with "Credit balance is too low"
An ANTHROPIC_API_KEY exported in your shell was winning over your
Pro/Max login and billing an (empty) Console account. Since 0.18.0 the
key is scrubbed from the spawned CLI automatically — upgrade if you see
this on an older version, or unset ANTHROPIC_API_KEY for the run.
"Set ANTHROPIC_API_KEY … to use --llm claude"
API providers need a key in the environment — see the table above. No key
at all? Use --llm claude-cli (subscription) or --llm ollama (local).
--fit refuses to combine with --llm / --max-chars
--fit sizes the deterministic output on its own. If you didn't type it,
your config file probably sets fit — override with an explicit
--max-chars removed, or drop the key.
The brief injection warns "sessions newer than this brief exist"
That's the freshness stamp doing its job: run
chf --brief --llm claude-cli to re-distill (cached — only new sessions
are paid for). The factual part refreshes itself if the SessionEnd hook is
installed.
Something silently did nothing?
Tolerant-by-design paths (corrupt JSONL lines, unreadable files, cache
trouble) never crash the run — add --debug (or CLAUDE_HANDOFF_DEBUG=1)
to see exactly what was skipped and why. Hooks always report their
errors on stderr while still exiting 0.
Garbled characters on Windows
Set PYTHONUTF8=1 (the CI runs the whole suite that way).
Full flag reference
Roadmap
- Gemini exports as input (Google Takeout ships HTML only — bring a real, redacted export to build against)
- Session chains: auto-detect
/compact-continued sessions and offer to merge the lineage (--follow)
PRs welcome.
How it compares
This space isn't empty — it's fragmented. Pick the tool that matches your situation:
- Exporters — claude-conversation-extractor, claude-code-log, claude-code-transcripts, claude-to-markdown — turn transcripts into readable Markdown/HTML, tool noise included, no handoff framing.
- Cross-CLI session movers — cli-continues (
npm i -g continues) reads 16 coding CLIs' native session stores (Claude Code included) and injects a context doc into another terminal tool. Excellent for Claude Code → Codex/Cursor/Gemini CLI; but it can't target web chats, does no LLM summarization, and needs Node 22.5+. - In-session handoff skills/plugins — thepushkarp/handoff, claude-session-handoff, claude-code-handoff — great if you remember to run them before the session ends; the model writes the summary using your session's context, and the output targets the next Claude session.
- Browser extensions — Handoff, LLM Context Bridge, ContextSwitch — transfer web chats between ChatGPT/Claude/Gemini; they can't see Claude Code sessions.
claude-handoff is the post-hoc, paste-anywhere corner of this map: it works on the JSONL after the fact — old sessions, crashed sessions, sessions that hit the usage limit — needs nothing installed in advance, costs zero tokens by default, can write a real summary when you ask for one (--llm), and produces a document any receiving model can pick up, including claude.ai, ChatGPT and Gemini in the browser or on your phone. And with --brief, it's the only one that turns that history into standing project memory.
Development
Runtime code lives in the claude_handoff/ package; single/claude_handoff.py
is generated — rebuild it with python3 scripts/build_single.py after
any package change (CI fails when it's stale). New parser behavior starts
with a redacted fixture in tests/fixtures/ — see
CONTRIBUTING.md and AGENTS.md (instructions
and invariants for both human and AI contributors).
Learn more
docs/GUIDE.md — a day with claude-handoff: walkthrough, how --brief works step by step, honest cost table, cheatsheet · INDEX.md — file map · docs/DEVELOPMENT.md — architecture, JSONL schema notes, design decisions · AGENTS.md — contributor guide for AI coding agents · CONTRIBUTING.md · CHANGELOG.md
License
MIT
mcp-name: io.github.Vasilispapg/claude-handoff
来源:README.md,提交 c722580
工具
0版本历史
1- v0.19.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Claude 集成
Claude Platform Docs
com.claude.platform官方发布者
远程 MCP 服务器,让助手搜索并阅读 Claude 平台文档与 API 参考。

Insta Edits for Claude
由 GitHub 账号 faisalkhanzemi 发布
让 Claude 驱动 Mac 版 Instagram Edits 完整 274 个工具编辑器的桥接服务,并随项目打开同步工具列表。

Claude Checkpoint Mcp
由 GitHub 账号 daniel-munoz 发布
本地 MCP 服务器,把 Claude Code 会话状态保存为项目内的检查点文件,并可重新加载为精简的续接摘要。

Qwen DAP MCP — C/C++ Debugger for Claude Code, Codex & Qwen
由 GitHub 账号 spk-c 发布
通过 GDB、LLDB 和 MCP 为 Claude Code、Codex 和 Qwen 提供 C/C++ 崩溃、挂起和转储调试AI 翻译

AVE for Claude Code — Local Video Editing
由 GitHub 账号 lemberalla 发布
仅适用于 Claude Code 的本地 AVE 时间线编辑与导出。需要现有 AVE 连接。AI 翻译