1仕組みと動作原理
コアとなる動作はディスク書き出しを行わずにバックグラウンド agent を直接起動することです。現在の会話を引き継ぎ用サマリーに圧縮し、安定版 handoff のように引き継ぎドキュメントを作成するのではなく、サマリーを直接プロンプトとして `claude --bg` を呼び出し新しい agent を起動します。
skills/in-progress/claude-handoff/SKILL.md
Write a handoff summary of the current conversation so a fresh agent can continue the work. Instead of saving it, launch a background agent seeded with the summary as its prompt: `claude --bg --name "<descriptive name>" "<handoff summary>"`. It starts in the current working directory and returns immediately; the user manages it with `claude agents`.
ここでの処理内容:「Instead of saving it」という一文が、本スキルと productivity/handoff(ドキュメント作成による引き継ぎ)を差別化しており、引き継ぎ対象がファイルからプロセスへと変わっています。
サマリー内容の規約:suggested skills セクションを必ず含め、既存の成果物は複製せず path/URL で参照し、機密情報をマスキングする必要があります(サマリーがそのまま新しい agent のプロンプトとなるため)。
skills/in-progress/claude-handoff/SKILL.md
Include a "suggested skills" section in the summary, naming which skills the next agent should call the Skill tool for.
マスキング指示の原文:「Redact any sensitive information, such as API keys, passwords, or personally identifiable information, since the summary becomes the agent's prompt.」——モデルが作成したサマリーが別の agent の指示に直結するため、情報マスキング(redaction)はセキュリティ上極めて重要です。
ユーザーによる明示的なトリガーのみ:frontmatter に disable-model-invocation: true を設定し、Codex マニフェストでは policy.allow_implicit_invocation: false とペアリングします。トリガー時には argument-hint でユーザーに「次のセッションの用途」を要求します。
skills/in-progress/claude-handoff/SKILL.md
argument-hint: "What will the next session be used for?"
argument-hint は Claude Code のユーザー入力プロンプトです。ユーザーから提示された方向性はサマリーに反映されます(「If the user passed arguments, treat them as a description of what the next session will focus on and tailor the summary accordingly.」)。
命名規約:ジョブ一覧、セッションセレクター、ターミナルタイトルの表示用として、-n/--name に説明的な名前を必ず渡す必要があります。
skills/in-progress/claude-handoff/SKILL.md
Always pass `-n`/`--name` with a descriptive name (e.g. `--name "Fix login bug"`); it sets the display name shown in the job list, session picker, and terminal title.
Claude Code ホスト向けの CLI 引数規約です。本スキルが Claude Code(`claude` コマンド + `claude agents` 管理インターフェース)に強く依存していることも示しています。
2コア機能
01ワンコマンドで現在のセッションを新しいバックグラウンドエージェントへ引き継ぎ(claude --bg、即時リターン)
02ユーザー引数に応じて次回セッションの重点を絞り込みサマリーを調整
03サマリー内で次のエージェントが呼び出すべき skills を推奨
04既存の成果物(specs/plans/ADRs/issues/commits/diffs)を path/URL で参照し重複コンテンツを回避
05サマリーのマスキング:API キー、パスワード、PII をマスキングした上で新しいエージェントへ伝達
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| cli | claude (Claude Code CLI) |
4推奨統制措置と判定根拠
安全運用のための推奨統制措置
Agent 向け
作業ディレクトリを限定
管理者向け
操作ログを保持
判定根拠(ファイルパスと抜粋)
- 本地工作目录: ファイル I/O と成果物出力:スキル自体はファイルを書き込みません(「Instead of saving it」と明記)。起動されたバックグラウンドエージェントはホスト権限に従い cwd で作業を継続し、読み書きを行う可能性があります。
監査ノート: ローカルの公式 CLI(claude --bg)を呼び出して会話をバックグラウンドエージェントへ引き継ぐ処理です。スキル自体には外部ネットワーク通信、認証情報読み取り、ディスク書き込みの指示はありません。注意点:① サマリーが新しいエージェントの完全なプロンプトとなるため、マスキングとインジェクション耐性に注意が必要(セッション内の信頼できないコンテンツがセッション間を伝播するリスク);② バックグラウンドエージェントはホストのツール権限で cwd 内を実行し続けるため、実行可能な操作はホストから付与された権限に準拠します;③ Claude Code への依存度が高く、他ホストでの利用価値は限定的です。いずれも想定範囲内のローカルツール利用であり、コードレベルの危険性はありません。
5二重目の独立検証
- [ok] claude --bg 调用点真实存在 — SKILL.md 正文逐字含 ``claude --bg --name "<descriptive name>" "<handoff summary>"``,且是唯一 CLI 调用指令。
- [ok] user-invoked 双清单(disable-model-invocation + allow_implicit_invocation: false) — 两 manifest 均存在且取值正确;in-progress README 亦标 User-invoked。
- [ok] 不落盘 vs productivity/handoff 写文档 — 原文 'Instead of saving it, launch a background agent' 明确;productivity/handoff/SKILL.md 存在且为写文档实现,两 skill 并存无冲突。
- [ok] suggested skills / 引用不复制 / 脱敏三段纪律 — 三段原文均在 SKILL.md('suggested skills'、'Reference them by path or URL instead'、'Redact any sensitive information…')。
- [ok] argument-hint 存在 — frontmatter 含 argument-hint: "What will the next session be used for?",且正文有对应的定向裁剪指令。
- [ok] 无外部网络端点/凭证读取 — token 扫描零网络命中;无 env/keychain/文件凭证读取指令。claude --bg 为本地 CLI。
- [ok] 命令注入面(安全反例检查) — 确认注入面真实存在(摘要进命令行 + 进新 agent prompt),已在 security.injection_surface 与 verdict.risks 显式记录;skill 自身无转义指令属宿主/模型责任,如实标注而非回避。
- [ok] 元数据 — GitHub API:MIT、257659 stars、pushed_at 2026-09-04T08:45:43Z;本地 HEAD == 3cca18b。license 归属仓库根 LICENSE。
6結論
最適な用途: Claude Code ユーザーが「現在のセッションコンテキストが上限に達した」「同一タスクをテーマを切り替えて継続したい」際に、セッションをバックグラウンドエージェント(claude agents で管理)へ引き継ぐ用途に最適です。特に作業がすでに specs や commits に一部コミットされており、サマリーで複製せず参照可能なシナリオに適しています。
不向きな用途: Codex などの非 Claude Code ホスト(コマンドが実行不可);監査可能な引き継ぎドキュメントを残す必要があるチーム開発プロセス(ドキュメント生成を行う productivity/handoff を推奨);セッション内にシークレットや極めて機密性の高い情報が含まれ、ホスト側に隔離環境がない場合(マスキングがモデルの自己制御に依存するため)。
Install Agent-Ready
① Verified Mirror 2026-09-09
Option A · Direct DownloadDownload claude-handoff.tar.gz
sha256:
Option B · Copy Guide for Agent09e04d39f394ef5b…Agent はこの JSON ガイドから自動的にダウンロードして検証します。
② Upstream GitHub
GitHub Repo ↗
Pinned to commit 3cca18b368.