jpskill.com
💬 コミュニケーション コミュニティ

session-handoff

AIとの作業を中断・再開する際に、会話の流れや重要な情報を引き継ぎ書としてまとめ、別のAIにスムーズに作業を委ねられるようにするSkill。

📜 元の英語説明(参考)

Creates comprehensive handoff documents for seamless AI agent session transfers. Triggered when: (1) user requests handoff/memory/context save, (2) context window approaches capacity, (3) major task milestone completed, (4) work session ending, (5) user says 'save state', 'create handoff', 'I need to pause', 'context is getting full', (6) resuming work with 'load handoff', 'resume from', 'continue where we left off'. Proactively suggests handoffs after substantial work (multiple file edits, complex debugging, architecture decisions). Solves long-running agent context exhaustion by enabling fresh agents to continue with zero ambiguity.

🇯🇵 日本人クリエイター向け解説

一言でいうと

AIとの作業を中断・再開する際に、会話の流れや重要な情報を引き継ぎ書としてまとめ、別のAIにスムーズに作業を委ねられるようにするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o session-handoff.zip https://jpskill.com/download/20867.zip && unzip -o session-handoff.zip && rm session-handoff.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/20867.zip -OutFile "$d\session-handoff.zip"; Expand-Archive "$d\session-handoff.zip" -DestinationPath $d -Force; ri "$d\session-handoff.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して session-handoff.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → session-handoff フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
8

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

ハンドオフ

新しい AI エージェントが曖昧さなくシームレスに作業を継続できるよう、包括的なハンドオフ文書を作成します。長年のエージェントのコンテキスト枯渇問題を解決します。

モード選択

どちらのモードが適用されるか判断してください。

ハンドオフを作成する場合:ユーザーが現在の状態を保存したい、作業を一時停止したい、またはコンテキストが一杯になっている場合。

  • 以下の「作成ワークフロー」に従ってください。

ハンドオフから再開する場合:ユーザーが以前の作業を継続したい、コンテキストを読み込みたい、または既存のハンドオフについて言及している場合。

  • 以下の「再開ワークフロー」に従ってください。

積極的な提案の場合:かなりの作業(5つ以上のファイル編集、複雑なデバッグ、主要な決定)の後、次のように提案します。

「かなりの進捗がありました。将来のセッションのためにこのコンテキストを保持するために、ハンドオフ文書の作成を検討してください。『ハンドオフを作成』と入力してください。」

作成ワークフロー

ステップ 1: スキャフォールドの生成

スマートスキャフォールドスクリプトを実行して、事前入力されたハンドオフ文書を作成します。

python scripts/create_handoff.py [task-slug]

例: python scripts/create_handoff.py implementing-user-auth

継続ハンドオフの場合(以前の作業にリンクする場合):

python scripts/create_handoff.py "auth-part-2" --continues-from 2024-01-15-auth.md

このスクリプトは次のことを行います。

  • 必要に応じて .claude/handoffs/ ディレクトリを作成します。
  • タイムスタンプ付きのファイル名を生成します。
  • タイムスタンプ、プロジェクトパス、Git ブランチ、最近のコミット、変更されたファイルを事前入力します。
  • 以前のハンドオフから継続している場合は、ハンドオフチェーンリンクを追加します。
  • 編集用のファイルパスを出力します。

ステップ 2: ハンドオフ文書の完成

生成されたファイルを開き、すべての [TODO: ...] セクションを記入します。以下のセクションを優先してください。

  1. 現在の状態の概要 - 今何が起こっているか
  2. 重要なコンテキスト - 次のエージェントが必ず知っておくべき重要な情報
  3. 直後の次のステップ - 明確で実行可能な最初のステップ
  4. 決定事項 - 理由付きの選択(結果だけでなく)

ガイダンスとして、references/handoff-template.md のテンプレート構造を使用してください。

ステップ 3: ハンドオフの検証

検証スクリプトを実行して、完全性とセキュリティをチェックします。

python scripts/validate_handoff.py <handoff-file>

バリデーターは以下をチェックします。

  • [ ] [TODO: ...] プレースホルダーが残っていないこと
  • [ ] 必須セクションが存在し、入力されていること
  • [ ] 潜在的なシークレット(API キー、パスワード、トークン)が検出されないこと
  • [ ] 参照されているファイルが存在すること
  • [ ] 品質スコア(0-100)

シークレットが検出されたり、スコアが 70 未満のハンドオフを確定しないでください。

ステップ 4: ハンドオフの確認

ユーザーに報告します。

  • ハンドオフファイルの場所
  • 検証スコアと警告
  • キャプチャされたコンテキストの概要
  • 次のセッションの最初のアクション項目

再開ワークフロー

ステップ 1: 利用可能なハンドオフの検索

現在のプロジェクトのハンドオフを一覧表示します。

python scripts/list_handoffs.py

これにより、日付、タイトル、完了ステータスを含むすべてのハンドオフが表示されます。

ステップ 2: 鮮度の確認

読み込む前に、ハンドオフがどれくらい最新であるかを確認します。

python scripts/check_staleness.py <handoff-file>

鮮度レベル:

  • FRESH:再開しても安全 - ハンドオフ以降の変更が最小限
  • SLIGHTLY_STALE:変更を確認してから再開
  • STALE:再開する前にコンテキストを慎重に確認
  • VERY_STALE:新しいハンドオフの作成を検討

このスクリプトは以下をチェックします。

  • ハンドオフ作成からの時間
  • ハンドオフ以降の Git コミット
  • ハンドオフ以降に変更されたファイル
  • ブランチの分岐
  • 参照されているファイルの欠落

ステップ 3: ハンドオフの読み込み

アクションを起こす前に、関連するハンドオフ文書を完全に読み込みます。

ハンドオフがチェーンの一部である場合(「Continues from」リンクがある場合)、完全なコンテキストのためにリンクされた以前のハンドオフも読み込みます。

ステップ 4: コンテキストの検証

references/resume-checklist.md のチェックリストに従ってください。

  1. プロジェクトディレクトリと Git ブランチが一致していることを確認します。
  2. ブロッカーが解決されているか確認します。
  3. 仮定がまだ有効であることを検証します。
  4. 変更されたファイルに競合がないか確認します。
  5. 環境の状態を確認します。

ステップ 5: 作業の開始

ハンドオフ文書の「直後の次のステップ」の項目 #1 から開始します。

作業中に以下のセクションを参照してください。

  • 重要な場所については「Critical Files」
  • 従うべき慣例については「Key Patterns Discovered」
  • 既知の問題を避けるためには「Potential Gotchas」

ステップ 6: ハンドオフの更新またはチェーン化

作業中に:

  • 「Pending Work」の完了した項目にマークを付けます。
  • 新しい発見を関連するセクションに追加します。
  • 長いセッションの場合: --continues-from を使用して新しいハンドオフを作成し、それらをチェーン化します。

ハンドオフチェーン

長期間にわたるプロジェクトの場合、コンテキストの系統を維持するためにハンドオフをチェーン化します。

handoff-1.md (最初の作業)
    ↓
handoff-2.md --continues-from handoff-1.md
    ↓
handoff-3.md --continues-from handoff-2.md

チェーン内の各ハンドオフは次のとおりです。

  • 前任者にリンクします。
  • 古いハンドオフを superseded(置き換えられた)とマークできます。
  • 新しいエージェントにコンテキストのパンくずリストを提供します。

チェーンから再開する場合、まず最新のハンドオフを読み込み、必要に応じて前任者を参照します。

保存場所

ハンドオフは .claude/handoffs/ に保存されます。

命名規則: YYYY-MM-DD-HHMMSS-[slug].md

例: 2024-01-15-143022-implementing-auth.md

リソース

scripts/

スクリプト 目的
create_handoff.py [slug] [--continues-from <file>] スマートスキャフォールドで新しいハンドオフを生成
list_handoffs.py [path] プロジェクト内の利用可能なハンドオフを一覧表示
validate_handoff.py <file> 完全性、品質、セキュリティをチェック
check_staleness.py <file> ハンドオフコンテキストがまだ最新であるかを評価

references/

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Handoff

Creates comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves the long-running agent context exhaustion problem.

Mode Selection

Determine which mode applies:

Creating a handoff? User wants to save current state, pause work, or context is getting full.

  • Follow: CREATE Workflow below

Resuming from a handoff? User wants to continue previous work, load context, or mentions an existing handoff.

  • Follow: RESUME Workflow below

Proactive suggestion? After substantial work (5+ file edits, complex debugging, major decisions), suggest:

"We've made significant progress. Consider creating a handoff document to preserve this context for future sessions. Say 'create handoff' when ready."

CREATE Workflow

Step 1: Generate Scaffold

Run the smart scaffold script to create a pre-filled handoff document:

python scripts/create_handoff.py [task-slug]

Example: python scripts/create_handoff.py implementing-user-auth

For continuation handoffs (linking to previous work):

python scripts/create_handoff.py "auth-part-2" --continues-from 2024-01-15-auth.md

The script will:

  • Create .claude/handoffs/ directory if needed
  • Generate timestamped filename
  • Pre-fill: timestamp, project path, git branch, recent commits, modified files
  • Add handoff chain links if continuing from previous
  • Output file path for editing

Step 2: Complete the Handoff Document

Open the generated file and fill in all [TODO: ...] sections. Prioritize these sections:

  1. Current State Summary - What's happening right now
  2. Important Context - Critical info the next agent MUST know
  3. Immediate Next Steps - Clear, actionable first steps
  4. Decisions Made - Choices with rationale (not just outcomes)

Use the template structure in references/handoff-template.md for guidance.

Step 3: Validate the Handoff

Run the validation script to check completeness and security:

python scripts/validate_handoff.py <handoff-file>

The validator checks:

  • [ ] No [TODO: ...] placeholders remaining
  • [ ] Required sections present and populated
  • [ ] No potential secrets detected (API keys, passwords, tokens)
  • [ ] Referenced files exist
  • [ ] Quality score (0-100)

Do not finalize a handoff with secrets detected or score below 70.

Step 4: Confirm Handoff

Report to user:

  • Handoff file location
  • Validation score and any warnings
  • Summary of captured context
  • First action item for next session

RESUME Workflow

Step 1: Find Available Handoffs

List handoffs in the current project:

python scripts/list_handoffs.py

This shows all handoffs with dates, titles, and completion status.

Step 2: Check Staleness

Before loading, check how current the handoff is:

python scripts/check_staleness.py <handoff-file>

Staleness levels:

  • FRESH: Safe to resume - minimal changes since handoff
  • SLIGHTLY_STALE: Review changes, then resume
  • STALE: Verify context carefully before resuming
  • VERY_STALE: Consider creating a fresh handoff

The script checks:

  • Time since handoff was created
  • Git commits since handoff
  • Files changed since handoff
  • Branch divergence
  • Missing referenced files

Step 3: Load the Handoff

Read the relevant handoff document completely before taking any action.

If handoff is part of a chain (has "Continues from" link), also read the linked previous handoff for full context.

Step 4: Verify Context

Follow the checklist in references/resume-checklist.md:

  1. Verify project directory and git branch match
  2. Check if blockers have been resolved
  3. Validate assumptions still hold
  4. Review modified files for conflicts
  5. Check environment state

Step 5: Begin Work

Start with "Immediate Next Steps" item #1 from the handoff document.

Reference these sections as you work:

  • "Critical Files" for important locations
  • "Key Patterns Discovered" for conventions to follow
  • "Potential Gotchas" to avoid known issues

Step 6: Update or Chain Handoffs

As you work:

  • Mark completed items in "Pending Work"
  • Add new discoveries to relevant sections
  • For long sessions: create a new handoff with --continues-from to chain them

Handoff Chaining

For long-running projects, chain handoffs together to maintain context lineage:

handoff-1.md (initial work)
    ↓
handoff-2.md --continues-from handoff-1.md
    ↓
handoff-3.md --continues-from handoff-2.md

Each handoff in the chain:

  • Links to its predecessor
  • Can mark older handoffs as superseded
  • Provides context breadcrumbs for new agents

When resuming from a chain, read the most recent handoff first, then reference predecessors as needed.

Storage Location

Handoffs are stored in: .claude/handoffs/

Naming convention: YYYY-MM-DD-HHMMSS-[slug].md

Example: 2024-01-15-143022-implementing-auth.md

Resources

scripts/

Script Purpose
create_handoff.py [slug] [--continues-from <file>] Generate new handoff with smart scaffolding
list_handoffs.py [path] List available handoffs in a project
validate_handoff.py <file> Check completeness, quality, and security
check_staleness.py <file> Assess if handoff context is still current

references/

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。