Handoff
Create a handoff only for a user-requested transfer. Let the client manage
ordinary compaction; a long conversation, high context usage, or phase change
does not trigger a handoff or require a fresh session. Use the client's native
delegation with a bounded task brief for work within the same session.
- Create a private directory under the user's OS temporary directory, for
example with
mktemp -d on Unix-like systems. Do not write the handoff to
the repository or directly to a predictable shared temporary path.
- Record the goal, current state, decisions and their rationale, remaining
actions, blockers, and existing authorization. Focus the brief on the
receiving task. If a skill recommendation helps, have the recipient resolve
it against its active catalog rather than assume the same installation.
Identify the repository by its known project identity or a safe canonical
URL as well as the sender's local path; never print credential-bearing remotes.
- Reference existing specs, plans, ADRs, context documents, issues, commits,
diffs, and pull requests by canonical path or URL. Do not duplicate their
contents; durable team state belongs in those artifacts.
- Use separate
Verified now and Unverified or pending sections. Include
the command, path, or link that supports each important verified claim;
put assumptions, stale reports, and unfinished checks in the latter.
- Redact secrets and personally identifiable or sensitive information,
including tokens, passwords, names, national identity numbers, and health
information.
When inside a Git worktree with an existing HEAD, capture fresh output for
the canonical repository path, branch or detached state, full commit ID, and
complete status including untracked paths:
set -euo pipefail
repository_root=$(git rev-parse --show-toplevel)
(cd "$repository_root" && pwd -P)
git -C "$repository_root" symbolic-ref --quiet --short HEAD || printf '%s\n' DETACHED
git -C "$repository_root" rev-parse HEAD
git -C "$repository_root" status --short --branch --untracked-files=all
On the same machine, the recipient can reuse the repository path. Elsewhere,
locate the corresponding checkout by repository identity; sender-local paths
are not instructions to create a matching directory. Rerun the commands and
compare the branch, commit, and status before continuing. Reassess changed
state before relying on old conclusions; ask the user only when the intended
workspace or remaining authority cannot be inferred. If no Git worktree or
HEAD exists, record the canonical working directory and relevant artifact
paths instead.
This preflight verifies repository identity and the shape of the working tree,
not byte-for-byte equality of uncommitted content. Treat claims about modified
or untracked content and previous test results as unverified after the handoff:
reread the complete current diff and rerun the relevant checks before relying
on them.
After writing the document, reopen it and confirm it is readable and non-empty.
Return the absolute path for a same-machine transfer. For a colleague or another
machine, also provide the redacted brief as copyable content and identify any
referenced files or uncommitted changes that must travel with it. Do not imply
that private temporary files are remotely accessible or durable. Sending,
publishing, or starting a new session is outside this skill's task.
1---2name: handoff3description: Prepare a portable handoff when the user requests transferring work to another session, client, or colleague. Ordinary context compression and same-session delegation belong to the client.4---56# Handoff78Create a handoff only for a user-requested transfer. Let the client manage9ordinary compaction; a long conversation, high context usage, or phase change10does not trigger a handoff or require a fresh session. Use the client's native11delegation with a bounded task brief for work within the same session.12131. Create a private directory under the user's OS temporary directory, for14 example with `mktemp -d` on Unix-like systems. Do not write the handoff to15 the repository or directly to a predictable shared temporary path.162. Record the goal, current state, decisions and their rationale, remaining17 actions, blockers, and existing authorization. Focus the brief on the18 receiving task. If a skill recommendation helps, have the recipient resolve19 it against its active catalog rather than assume the same installation.20 Identify the repository by its known project identity or a safe canonical21 URL as well as the sender's local path; never print credential-bearing remotes.223. Reference existing specs, plans, ADRs, context documents, issues, commits,23 diffs, and pull requests by canonical path or URL. Do not duplicate their24 contents; durable team state belongs in those artifacts.254. Use separate `Verified now` and `Unverified or pending` sections. Include26 the command, path, or link that supports each important verified claim;27 put assumptions, stale reports, and unfinished checks in the latter.285. Redact secrets and personally identifiable or sensitive information,29 including tokens, passwords, names, national identity numbers, and health30 information.3132When inside a Git worktree with an existing `HEAD`, capture fresh output for33the canonical repository path, branch or detached state, full commit ID, and34complete status including untracked paths:3536```bash37set -euo pipefail38repository_root=$(git rev-parse --show-toplevel)39(cd "$repository_root" && pwd -P)40git -C "$repository_root" symbolic-ref --quiet --short HEAD || printf '%s\n' DETACHED41git -C "$repository_root" rev-parse HEAD42git -C "$repository_root" status --short --branch --untracked-files=all43```4445On the same machine, the recipient can reuse the repository path. Elsewhere,46locate the corresponding checkout by repository identity; sender-local paths47are not instructions to create a matching directory. Rerun the commands and48compare the branch, commit, and status before continuing. Reassess changed49state before relying on old conclusions; ask the user only when the intended50workspace or remaining authority cannot be inferred. If no Git worktree or51`HEAD` exists, record the canonical working directory and relevant artifact52paths instead.5354This preflight verifies repository identity and the shape of the working tree,55not byte-for-byte equality of uncommitted content. Treat claims about modified56or untracked content and previous test results as unverified after the handoff:57reread the complete current diff and rerun the relevant checks before relying58on them.5960After writing the document, reopen it and confirm it is readable and non-empty.61Return the absolute path for a same-machine transfer. For a colleague or another62machine, also provide the redacted brief as copyable content and identify any63referenced files or uncommitted changes that must travel with it. Do not imply64that private temporary files are remotely accessible or durable. Sending,65publishing, or starting a new session is outside this skill's task.