ワンクリックで
handoff
Use when explicitly asked to "handoff", "인수인계", or "write a handoff" to preserve context for the next session.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when explicitly asked to "handoff", "인수인계", or "write a handoff" to preserve context for the next session.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when cataloging a repository's externally observable capabilities as end-to-end scenarios and driving them through test, fix, and re-test until verified
Use when setting up Claude Code global configuration on a new machine — CLAUDE.md, settings.json, statusline.sh, worktree configuration
Use Jira through a slim Atlassian MCP facade for issue lookup, triage, creation, comments, and lightweight status reporting.
Use when writing, reviewing, or improving PRDs, product requirements documents, product specs, feature requirements, launch requirements, or product discovery writeups before product or engineering work begins.
Use when writing, reviewing, or improving RFCs, requests for comments, technical design docs, architecture proposals, engineering decision records, API proposals, migration plans, or cross-team technical decisions.
Use the Datadog pup CLI for logs, monitors, APM, metrics, and incident investigation.
| name | handoff |
| description | Use when explicitly asked to "handoff", "인수인계", or "write a handoff" to preserve context for the next session. |
| allowed-tools | ["Bash","Read","Write"] |
Resolve the output directory once before any path operation:
HANDOFF_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/bstack/handoff"
Save the current session's context to
$HANDOFF_DIR/YYYY-MM-DD-HHmm-<topic>.md as a structured markdown file. Runs
only when the user explicitly asks for it. When XDG_DATA_HOME is unset, the
resolved directory is ~/.local/share/bstack/handoff.
There is no resume logic in this skill. The next session picks up context by pasting the file path or contents directly and follows the Resume Protocol.
If the user passes text after /handoff (e.g. /handoff now we need to join and index this into search), treat it as an explicit next-step instruction and
preserve the full instruction verbatim as User direction in ## Next Steps,
labelled (from user at handoff time). Derive one singular First action from
its first required action and put that at the top, before any steps inferred
from the conversation. Put later required actions after it.
Do not invent a command when none was supplied.
/handoff does$HANDOFF_DIR/handoff does NOT do$HANDOFF_DIR only)Collect environment snapshot — run in parallel:
git status --shortgit diff --statgit log -5 --onelinegit branch --show-currentgit rev-parse --short HEADpwdInfer topic — summarize the session's main work as a 2–4 word kebab-case slug (e.g. refactor-auth-middleware, add-handoff-skill).
Build filename — local time:
$HANDOFF_DIR/YYYY-MM-DD-HHmm-<topic>.md
With XDG_DATA_HOME unset, this resolves to
~/.local/share/bstack/handoff/2026-04-22-1430-add-handoff-skill.md.
Ensure directory — mkdir -p "$HANDOFF_DIR"
Write the file using the template below. Always include Task,
Completed, Current State, and Next Steps. Emit conditional sections
only when they prevent a concrete resume error; never leave empty sections.
continues: <that handoff's filename> to the frontmatter so chained
sessions stay traceable. Omit the key otherwise.Validate before printing — re-read the written file and check:
TODO, ..., N/A)Current State contains the resume gate in the required orderTask, Completed, Current State, and Next Steps are present and do
not mix completed, in-progress, and unstarted workFix in place if any check fails.
Print the absolute path on a single line.
---
date: YYYY-MM-DD HH:mm
worktree: <pwd>
branch: <git branch>
commit: <short sha>
topic: <kebab-case>
continues: <previous handoff filename — only if this session resumed from one>
---
# Handoff: <one-line title>
## Task
- Goal: <goal derived from the session>
- Scope: <in-scope work and explicit boundaries>
- Done when: <verifiable completion condition>
## Completed
- <concrete completed outcome>
## Current State
- In progress: <unfinished work currently underway>
- Workspace: `<worktree>` on `<branch>` at `<commit>`
- Workspace health: clean / dirty, including user-owned unrelated changes
- Last verified: `<command-or-check>` → <result>
- Resume gate: compare recorded worktree/branch/commit → re-run Last verified → report drift or mismatch → only then start First action.
## Next Steps
1. First action: <the exact work action to start after the Resume Protocol>
- User direction: <full verbatim /handoff instruction — only when provided> (from user at handoff time)
2. <next action> → verify with `<check>` or Done when: <evidence>
## Blockers & Open Questions
- <unresolved decision, dependency, or unknown>
## Context
- Files: `path/a.ts`
- PR / issue / doc / run: <stable identifier or URL>
## Design Decisions
- Decision: <chosen approach> — Reason: <why it was chosen>
## Failed Approaches
- Tried: `<command-or-approach>` — Failed because: <exact useful reason>
## Gotchas
- <forward-looking temporary constraint the next session must preserve>
Blockers & Open Questions, Context, Design Decisions, Failed Approaches, and Gotchas are conditional. Omit them unless their content
prevents a concrete resume error.
The receiving session must:
Last verified before trusting state claims.First action.Next Steps.AGENTS.md or CLAUDE.md, point to that
file instead of copying the rule into the handoff. Do not modify the
instruction file during handoff.