A cross-harness /handoff skill for coding agents: writes a per-session handoff-<session-id>.md
at the repo root — in-progress state, exact next steps, and this session's
reference (absolute session/transcript path plus the verified resume
command), so a fresh session can resume the work cheaply instead of
reconstructing it.
-
Manual: invoke
/handoffwhenever you want a handoff note. -
Automatic: a
UserPromptSubmithook nudges the agent to run/handoff, once per trigger, when this session's context window reaches 90% (HANDOFF_USAGE_THRESHOLD), the account's 5-hour usage window reaches 90% (HANDOFF_FIVE_HOUR_THRESHOLD), or the weekly window reaches 95% (HANDOFF_WEEKLY_THRESHOLD). It waits until a session has three assistant replies, and the context trigger fires again on the next climb after context drops (a compact). Standalone wiring: copyhooks/handoff-trigger-hook.shsomewhere stable, add to your Claude Code hooks config:{ "hooks": { "UserPromptSubmit": [ { "hooks": [ { "type": "command", "command": "/path/to/handoff-trigger-hook.sh" } ] } ] } }The hook reads the caches written by superskills' statusline (
~/.cache/claude-statusline/context-<session-id>.jsonandrate-limits.json). Without that statusline there is no cache and only manual invocation works. Nothing breaks.
| Harness | Session reference | Resume |
|---|---|---|
| Claude Code | ~/.claude/projects/<munged-cwd>/<session-id>.jsonl (exact-munge binding, 6h window) |
claude --resume <id> -p "<prompt>" (fallback claude -c) |
| Codex | newest rollout under ~/.codex/sessions/YYYY/MM/DD/ (thread caution included) |
codex exec resume --last "<prompt>" |
| OpenCode | no stable on-disk path published | opencode run -c "<prompt>" |
| Unknown / minimal | honest no-resume note | the handoff note is the only bridge |
Copy SKILL.md and scripts/ into your agent's skills directory (e.g.
~/.claude/skills/handoff/), or install the
superskills plugin, which ships
and updates it.
Canonical source: ariadoss/superskills
(skills/handoff/); this repo is its standalone export; file issues there.
The note's content model won a pre-registered three-variant bake-off
(judge + behavioral resume evals); see superskills' evals/reports/.