handoff
Transfer conversation context between agentic CLIs (Claude Code, GitHub Copilot CLI, OpenAI Codex CLI) locally and across machines. Reads a source session transcript by UUID and produces either an inline summary, a paste-ready handoff digest, a written markdown file, or a branch in a user-owned private git repo that another machine can fetch. Use when switching agents mid-task, recovering context, or moving between Windows/Linux/macOS setups. Triggers on: "handoff", "transfer context", "continue in codex", "continue in claude", "continue in copilot", "switch to codex", "switch to claude", "what was that session about", "claude --resume", "copilot --resume", "codex resume", "find the session where", "search sessions", "which session did I", "push handoff", "fetch handoff", "handoff to other machine", "resume on my other laptop".
- License 许可
- MIT
- 最近更新
- 2026-10-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- id
- handoff
- name
- handoff
- task
- [ "documentation", "debugging" ]
- type
- skill
- model
- sonnet
- owner
- @kaiohenricunha
- tools
- Glob, Read, Grep, Bash, Write
- domain
- [ "devex" ]
- effort
- medium
- created
- 1776384000000
- updated
- 1777852800000
- version
- 1.3.0
- dotbabel
- { "compute": { "mode": "dynamic", "binding": "consumer", "rationale": "The coordinator maps user intent to a bounded context-transfer CLI and verifies its output.", "requirement": "routine" } }
- maturity
- draft
- platform
- [ "none" ]
- description
- Transfer conversation context between agentic CLIs (Claude Code, GitHub Copilot CLI, OpenAI Codex CLI) locally and across machines. Reads a source session transcript by UUID and produces either an inline summary, a paste-ready handoff digest, a written markdown file, or a branch in a user-owned private git repo that another machine can fetch. Use when switching agents mid-task, recovering context, or moving between Windows/Linux/macOS setups. Triggers on: "handoff", "transfer context", "continue in codex", "continue in claude", "continue in copilot", "switch to codex", "switch to claude", "what was that session about", "claude --resume", "copilot --resume", "codex resume", "find the session where", "search sessions", "which session did I", "push handoff", "fetch handoff", "handoff to other machine", "resume on my other laptop".
- argument-hint
- [pull|push|fetch|list|search|prune|doctor] [args...]
02 资源文件 7
- 参考文档references/claude-code.md5.3 KB
- 参考文档references/codex.md4.8 KB
- 参考文档references/copilot.md4.0 KB
- 参考文档references/digest-schema.md3.9 KB
- 参考文档references/from-codex.md2.6 KB
- 参考文档references/prerequisites.md3.5 KB
- 参考文档references/redaction.md4.3 KB
03 SKILL.md 正文
Handoff — Cross-CLI Session Context Transfer
Thin wrapper around the dotbabel handoff binary. The binary is the
authoritative contract; run dotbabel handoff --help for the full
sub-command list and flag reference. This file maps natural language to
the right invocation.
Auto-trigger phrase mapping
| Trigger phrase | Invocation |
|---|---|
handoff <id> / resume-command fragments |
dotbabel handoff pull <id> |
continue in <cli> / switch to <cli> / pull from <cli> |
dotbabel handoff pull <id> --from <cli> |
what was that session about + identifier |
dotbabel handoff pull <id> --summary |
push handoff / send to other machine / save this |
dotbabel handoff push --from <host-cli> [--tag …] |
pull handoff / fetch handoff / continue from yesterday's machine |
dotbabel handoff fetch [<query>] |
Extract <id> from the user message (UUID, short UUID, or a deliberate-label
alias: claude customTitle/aiTitle, codex thread_name, copilot
workspace.yaml:name, or gemini checkpoint). Aliases match
case-insensitively. Resolution precedence: UUID > short-UUID > latest >
alias (no fall-through on miss).
The resolver probes Claude / Copilot / Codex / Gemini roots automatically. If the
query is missing or ambiguous, ask one clarifying question before proceeding.
The --from filling rule
When invoking dotbabel handoff push without a query positional,
include --from <your-cli> where <your-cli> is the agent the host LLM
is running in (claude for Claude Code, copilot for GitHub Copilot CLI,
codex for Codex). The flag is required in that mode; the binary exits
64 without it.
Layered fidelity (Approach A and Approach B)
The digest combines two layers of context fidelity. Justification and
tradeoffs are captured in
docs/experiments/handoff-hardening-2026-05-08.md (added in PR #206;
this PR must merge after #206 for the link to resolve).
- B-floor (always on). Mechanical extraction the binary performs
unconditionally: TodoWrite mining in claude/codex transcripts,
user-prompt cap of 50 (prompt 1 pinned + last 49), and assistant
turn sampling (first turn + last 3). This is what every
pushandpullproduces with no extra flags. Seereferences/digest-schema.mdfor the schema and size bounds. - Approach A (opt-in via
--state-file). Whendotbabel handoff push --state-file <path>is passed, the file's raw content (typically a<handoff-state>YAML block authored by the source agent) is prepended above the mechanical<handoff>block. This lets the agent author intent, decisions, and goals verbatim instead of relying on extraction heuristics. The block flows through the same secret scrubber. Seereferences/digest-schema.mdfor the rendered shape.
Tool execution failures
When the dotbabel binary cannot be executed for any reason —
permission denied, binary not found, network failure, sandbox
restriction — do NOT fabricate, reconstruct, or synthesize a
<handoff> block from raw session JSONL files. Report the
tool-execution error verbatim and stop; instruct the user to run
the command manually in a shell where dotbabel is available.
Specifically:
- Quote the exact command attempted and the failure message.
- Tell the user to run it themselves and paste the output back.
- Do not infer, summarize, or proceed as if the call had succeeded.
Why: the binary is the authoritative producer of <handoff> blocks
— it owns the scrub passes (push redaction) and the extraction
logic §4 data flow depends on. Fabricated output may pass shape
validation but bypasses scrubbing entirely; the consumer cannot
distinguish a hand-rolled block from a real one.
Cross-cutting flags
Brief reference. dotbabel handoff --help is authoritative.
--from <cli>narrows source-CLI auto-detection onpush,fetch,pull; filterslist,search, andprune. Forpull latest, omitting--fromtriggers host auto-detection:CLAUDECODE=1/COPILOT_*/CODEX_*/GEMINI_CLI*env signals → narrowed to that CLI's root; host undetectable → cross-root union (newest mtime across all four roots).--summaryispull-only;fetch --summaryexits 64 becausefetchretrieves the rendered remotehandoff.md.-o <path>(onpull) controls output:-forces stdout;autowrites to<repo>/docs/handoffs/<date>-<cli>-<short>.md; any other string is a literal path.--since <ISO>cuts offlistandsearch(default 30 days forsearch).--limit <N>caps the row count.--tag <label>annotates apush(repeatable). Onfetch <tag>, exact-tag matches are preferred over description substring fallback.--fixed/-Ftreats thesearchquery as a literal string instead of a regex.--jsonis honoured bylist,pull,search.--state-file <path>(onpush) prepends a free-form state block (Approach A) to the digest before the mechanical extraction. The block is scrubbed for secrets like any other content.
Out of scope
- Invoking the target CLI directly. The skill prints; the user pastes. Keeps the transfer auditable.
- End-to-end encryption. The git transport is access-controlled by the host (private repo + auth); content is plaintext on the remote.
pushruns the scrubber and fails closed (exit 2) if it can't run. Best-effort pattern pass — seereferences/redaction.md. - Fuzzy or semantic search.
searchis substring/regex only.
Internal references
dotbabel handoff --help— authoritative flag and sub-command list.references/prerequisites.md— install matrix and remote-transport setup.references/from-codex.md— Codex-specific notes.references/redaction.md— scrubber behavior.
04 同仓库更多 Skills
yolo
Start temporary autonomy for the current task or an explicit scope with a required --for expiry. Codex permits scoped pushes, merges, deploys, and releases after strict testing and validation; Full access is a separate runtime setting. Claude Code uses a session permission hook with a protected-action denylist.
veracity-audit
Audit a data pipeline for Veracity and Value. Dispatches data-scientist, compliance-auditor, and data-engineer agents with project context injected at dispatch time. All source paths are supplied via flags — no defaults, no project assumptions. Subcommands: audit (full pipeline walk), score-check (scoring math only), gate-check (gate coverage only), source-trace <label> (single source end-to-end). Invoke when: "audit pipeline", "veracity check", "scoring math correct?", "check gates", "trace source", "verify quality gates", "formula correct?".
validate-spec
Audit an already-implemented spec against the codebase. Walks each constraint (ARCH-N, PERF-N, KD-N, etc.) and acceptance criterion, grounds findings in file:line evidence, runs the spec.json acceptance_commands, and writes a single audit doc to docs/audits/. Use whenever the user asks to "validate a spec", "audit a spec", "check if spec is implemented", "verify the spec is done", "is this spec really done", or otherwise wants closure on spec-driven work. Read-only against the spec — produces an audit, never modifies the spec itself.
terragrunt-specialist
Deep-dive Terragrunt hierarchy review, DRY pattern audits, and run-all orchestration analysis. Use for structured investigations of multi-environment Terragrunt layouts, dependency graphs, remote state config, and hook correctness. Triggers on: "Terragrunt audit", "run-all review", "dependency block", "DRY pattern review", "env hierarchy audit", "mock_outputs", "terragrunt hooks".
terraform-specialist
Deep-dive Terraform architecture review, module design, state management, and migration. Use for structured investigations of Terraform workspaces, provider configuration, module coupling, import workflows, and test coverage. Triggers on: "Terraform audit", "module review", "state management", "Terraform import", "workspace design", "provider config review", "Terraform testing".
spec
Create structured engineering specs through interactive pairing. Use when the user wants to create a spec, design doc, technical specification, architecture document, RFC, or engineering plan. Triggers on "let's spec this out", "create a spec", "design doc", "write a technical plan", "plan the architecture". Works for greenfield and brownfield projects. Outputs to docs/specs/.