mcpField
H
handoff

handoff

github.com/davidondrejエージェントワークフロー4.2k250 回インストール1 日前に更新
リポジトリ

handoff について

handoff は、次のエージェントが調査や質問を繰り返さずに作業を続けられるよう、プロジェクトの文脈をまとめるスキルです。現状、判断理由、失敗した方法、確認が必要な情報を記録し、作業ツリー外に保存します。

主な機能

  1. 01目標とプロジェクト背景の要約
  2. 02判断・失敗・現在の状態の記録
  3. 03既存文書や成果物の参照
  4. 04検証が必要な文脈の明示
  5. 05情報を伏せた引き継ぎファイルの保存

活用シーン

  1. 01開発作業を新しいエージェントに引き継ぐ
  2. 02セッション切り替え時に進捗を保つ
  3. 03コード上の判断と失敗した方法を記録する
  4. 04後続作業向けに検証可能な文脈を準備する

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/davidondrej/skills --skill handoff

インストール後、Claude Code で/handoffを入力して読み込まれたか確認します。

同梱ファイルagents/openai.yaml

詳細

引き継ぎ

新しいエージェントが、聞き直したり、再調査したり、同じ間違いを繰り返したりせずに作業を続けるために必要なコンテキストを記録します。

基本原則

  1. 状態を記述します。「次にログアウトを実装してください」ではなく、「認証は実装済みで、ログアウトにはまだ着手していません」と記述します。次のエージェントはコンテキストに基づいて行動を選びます。
  2. **既存の成果物にリンクします。**内容をコピーするのではなく、PRD、計画書、ADR、イシュー、コミット、差分、設計ドキュメントをパスまたは URL で参照します。
  3. **理由を残します。**コードだけでは説明できない決定、却下した方法、失敗を記録します。
  4. **検証を必須にします。**主張は無条件に信頼すべき事実ではなく、実際のコードと照合するコンテキストとして提示します。
  5. **シークレットと個人情報を伏せます。**キー、トークン、パスワード、個人データは決して含めないでください。認証情報の場所(例:未コミットの「.env.local」)を示し、値は記載しません。
  6. **役立つコンテキストだけを残します。**コードやプロジェクト設定から確認できる、明白な情報、重複する情報、説明的な情報は省きます。

手順

  1. 既存のプロジェクト指示(AGENTS.md または同等のもの)を読みます。引き継ぎはこのセッションに固有のものにし、それらの指示を繰り返さないでください。
  2. 新規作成するのではなく、以前の引き継ぎを読み、更新します。
  3. ユーザーから提供された引数を、次のセッションで取り組む内容として扱います。
  4. テンプレートのすべてのセクションを記入します。空のセクションには None と記載します。
  5. 引き継ぎを 1 つのコードフェンス内に出力し、「ファイル出力」の説明に従って同じ内容を保存します。

出力形式

次のテンプレートを、1 つのコードフェンス内に使用します。

# HANDOFF: <short title of the work>
Generated: <timestamp> · Session focus: <one line>

## 1. Goal
<The overall objective in 1–3 sentences.>

## 2. Why This Matters / Background
<Motivation, intended users, timing, constraints, and hard requirements not already in project configuration.>

## 3. Current State
<What is DONE, PARTIAL, and NOT STARTED. Describe status, not actions:
- DONE: OAuth login flow, tests passing locally
- PARTIAL: Session storage wired up; refresh logic missing
- NOT STARTED: Logout endpoint>

## 4. Key Decisions (and why)
<Choices and reasoning, especially what cannot be recovered from code.
- Chose passport.js over custom OAuth — community support and less surface area
- Stored tokens in httpOnly cookies — XSS mitigation>

## 5. Traps & Dead Ends
<Failed approaches and pitfalls the next agent might repeat, with reasons.
- DB mocks made integration tests flaky; replaced with a test container
- SDK v3 breaks the streaming API this project relies on>

## 6. Relevant Files & Pointers
<Paths with line ranges and specific contents; link external artifacts instead of copying them.
- src/auth/oauth.ts:L40-L88 — provider config + token exchange
- docs/adr/0007-auth.md — full rationale
- PR #142 — in-progress session work
- Issue #150 — logout requirements>

## 7. Open Work (status, with dependencies)
<Remaining work and dependencies, stated as status rather than commands.
- Logout endpoint is not implemented
- Session persistence depends on the logout endpoint
- E2E auth tests are blocked until both are complete>

---
## Prompt for the Fresh Agent
<A short prompt with background context. Use declarative statements such as "X is complete" or "Y has not started." Preserve this exact closing instruction:>

Before responding, read every file listed under "Relevant Files & Pointers" above.
Do not summarize, paraphrase, or claim you already have context — actually read each
file. Treat every claim in this handoff as context to verify against the code, not
facts to trust blindly. Then wait for my instructions before taking any action.

ファイル出力

同じ引き継ぎを作業ツリーの外に保存します。できれば OS の一時ディレクトリに保存してください。macOS/Linux では $TMPDIR/handoff-<random-8-chars>.md、またはそれに相当するシステム上の場所を使用します。ユーザーがリポジトリ内への記録を希望する場合は、プロジェクトのルートにある HANDOFF.md を使用します。

絶対パスを報告します。ユーザーは次のようにして新しいセッションを開始できます。

Read the file <absolute-path> to get the context, then wait for instructions.

コメント