handoff について
handoffは、後続の実行で作業を続けられるよう、セッション状態を記録するエージェントスキルです。目標、進捗、決定事項、ファイル、行き止まりを整理し、`.llmtmp/handoff.md`に引き継ぎ文書を作成します。
主な機能
- 01目標と完了した作業の要約
- 02未完了タスクとブロッカーの記録
- 03決定事項、ファイル、エラーの整理
- 04試した行き止まりの記録
- 05`.llmtmp/handoff.md`への保存
活用シーン
- 01後続のエージェント実行で作業を再開
- 02別セッションへのタスク情報の引き継ぎ
- 03セッション終了前の次の手順の記録
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ jimweller/ clanker-skills --skill handoffインストール後、Claude Code で/handoffを入力して読み込まれたか確認します。
詳細
STARTER_CHARACTER = 🪃
引き継ぎ:継続のためにセッション状態を記録する
後続の実行で作業を続けられるよう、セッション状態を記録します。
手順
1. 現在のセッションを分析する
この会話で起きたことをすべて確認します。
- 当初の目標またはタスクは何でしたか?
- これまでに何を完了しましたか?
- 何がまだ進行中、またはブロックされていますか?
- どのような重要な決定を行い、その理由は何ですか?
- どのファイルを読み取り、作成、または変更しましたか?
- どのようなエラーが発生し、どのように解決しましたか?
- どのような行き詰まりを試しましたか?(後続の実行で同じことを繰り返さないため)
2. 現在の状態を確認する
git status
git diff --stat HEAD
git log --oneline -5
git branch --show-current
```text
### 3. Write the Handoff Document
Save to: `.llmtmp/handoff.md` in the current working directory (or the worktree root if in a worktree).
**Use this exact structure:**
```markdown
# Handoff: [Brief Task Description]
**Date:** [current date]
**Branch:** [current branch name]
**Last Commit:** [hash + message, or "uncommitted changes"]
## Goal
[1-2 sentences: what we're trying to accomplish. Include the original user request or plan reference.]
## Completed
- [x] [Task 1 — brief description of what was done]
- [x] [Task 2 — brief description]
- [Sub-detail if non-obvious]
## In Progress / Next Steps
- [ ] [Task 3 — what needs to happen next, with enough detail to act on]
- [ ] [Task 4 — include file paths and specific areas to focus on]
- [ ] [Task 5 — any blocked items with explanation of the blocker]
## Key Decisions
Document WHY choices were made, not just what was chosen:
- **[Decision]**: [What was chosen] — [Why, including alternatives rejected]
- **[Decision]**: [What was chosen] — [Why]
## Dead Ends (Don't Repeat These)
- [Approach that was tried and didn't work] — [Why it failed]
- [Investigation path that turned out to be irrelevant] — [What we found instead]
## Files Changed
- `path/to/file.ts` — [what changed and why, 1 line]
- `path/to/new-file.ts` — [NEW: what this file does]
- `path/to/deleted-file.ts` — [DELETED: why it was removed]
## Current State
- **Tests:** [passing/failing — which specific tests and why]
- **Type-check:** [clean/N errors — what kind]
- **Lint:** [clean/N warnings — what kind]
- **Build:** [working/broken]
- **Manual verification:** [what was tested manually, results]
## Handoff Context
[2-4 sentences: the MOST IMPORTANT thing the next agent needs to know. What's the current situation? What's the biggest risk? What should they do first?]
**Recommended first action:** [Exact command or step to take first]
```text
### 4. Confirm and Advise
After writing the handoff:
1. Confirm the file was written with its full path
2. Suggest this resume command:
```text
Read .llmtmp/handoff.md and continue from where the previous session left off.
-
未コミットの変更がある場合は、まずコミットするよう提案します。
/commit
品質基準
優れた引き継ぎドキュメントは、次の条件を満たします。
- 新しいエージェントが確認の質問をせずに作業を続けられる
- 100 行未満である(簡潔にまとめ、網羅的にせず、内容の重複を避けてファイルへのリンクを記載する)
- 次のエージェントが同じ判断をできるだけの「理由」を含む
- 無駄な探索を防ぐため、行き詰まりを明確に列挙する
- 具体的な「最初のアクション」を推奨する
アンチパターン
- ファイルの内容をすべて記載せず、パスを参照してください
- 会話の履歴やデバッグの記録を含めず、調査結果を要約してください
- 「バグを修正する」のように曖昧にせず、「
packages/web/src/hooks/useSSE.tsのoncloseハンドラーの後に指数バックオフを追加して、SSE の再接続を修正する」のように具体的にしてください - 「行き詰まったこと」のセクションを省略しないでください。よくある無駄な作業を防げます
- 「重要な決定」のセクションを忘れないでください。これがないと、次のエージェントが決定を覆す可能性があります
コメント
Markdown 対応