From claude-handoff
Generate a handoff prompt summarizing current work and launch a fresh Claude Code session. Use when context is getting long or you want to continue work in a new session. Trigger phrases - "handoff", "hand off", "引き継ぎ", "context is long", "start fresh session"
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-handoff:handoffThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a handoff document capturing current work state, save it, then launch an updated new Claude Code session that auto-loads the context.
Generate a handoff document capturing current work state, save it, then launch an updated new Claude Code session that auto-loads the context.
Execute these steps in order:
Use the TaskList tool to get all current tasks. Format as:
[x] for completed tasks[ ] for pending/in-progress tasksIf no tasks exist, write "(No tasks tracked in this session)".
Run:
git status --porcelain 2>/dev/null && echo "---" && git diff --stat 2>/dev/null
If not a git repo or no changes, write "(No git changes or not a git repository)".
Check if tasks/todo.md exists. If it does, read its contents. If not, write "(No plan file found)".
Write a concise summary (5-10 sentences) of what was accomplished in this session:
Write this in the same language the user has been using in the conversation.
Ask the user both questions at once:
引き継ぎに追加したいメッセージはありますか?(空Enterでスキップ) 次のセッションで使うモデルを選んでください(空Enterでデフォルト):
opus — Claude Opus 4.6sonnet — Claude Sonnet 4.6haiku — Claude Haiku 4.5claude-sonnet-4-6)effortレベルを選んでください(空Enterでデフォルト):
low — 軽量・高速medium — バランスhigh — 高品質max — 最大限パーミッションチェックをスキップしますか?(y/空Enterでスキップしない)
y — --dangerously-skip-permissions を付与(サンドボックス環境向け)Wait for the user's response. If they provide notes, include them. If empty or they say skip, write "(None)". Save the selected model, effort level, and skip-permissions flag (if any) for use in Step 7.
Create the handoff directory and save the file:
mkdir -p ~/.claude/handoffs
Write the handoff document to ~/.claude/handoffs/YYYY-MM-DDTHH-MM.md using the current timestamp. Use this format:
# Handoff: {timestamp}
## Session Summary
{summary from step 4}
## Task Status
{tasks from step 1}
## Changed Files
{git output from step 2}
## Plan
{plan from step 3}
## Additional Notes
{user message from step 5}
Then, generate a launch script at ~/.claude/handoffs/launch.sh using the Bash tool. This script MUST include the flags the user selected in Step 5. Build the claude command by appending only the selected options:
--model {model}--effort {level}--dangerously-skip-permissionsExample Bash command to generate the script (adapt flags based on user's selections):
cat > ~/.claude/handoffs/launch.sh << 'LAUNCH_EOF'
#!/bin/bash
# Auto-generated by /handoff — launch next session with saved preferences
claude update 2>&1 || echo "(Update skipped or failed)"
exec claude --model sonnet --effort high --dangerously-skip-permissions "前回の引き継ぎを確認して、作業を再開してください"
LAUNCH_EOF
chmod +x ~/.claude/handoffs/launch.sh
Omit any flag that was not selected. If none were selected, output just exec claude "...".
Tell the user the handoff is complete. Show the launch script path and the command to run it:
引き継ぎファイルを保存しました: ~/.claude/handoffs/{filename}
起動スクリプトを保存しました: ~/.claude/handoffs/launch.sh
新しいセッションを開始するには、このセッションを終了してから以下を実行してください:
bash ~/.claude/handoffs/launch.sh
SessionStartフックが引き継ぎコンテキストを自動注入し、選択したモデル・設定で作業を再開します。
Also display the equivalent manual command for reference (with all selected flags):
(手動で実行する場合):
claude {--model model} {--effort level} {--dangerously-skip-permissions} "前回の引き継ぎを確認して、作業を再開してください"
NOTE: Claude Code's Bash tool runs in a non-interactive subprocess, so exec claude cannot replace the current session. The user must manually start the new session after this one ends.
npx claudepluginhub amu815/claude-handoff --plugin claude-handoffGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.