handoff
Skill0 starsChanged 3 months agoMITView on GitHub
Use when writing any handoff or task brief, including an inline brief for Codex or another agent that the user will paste themselves. An inline-only, read-only, or do-not-launch request still needs this skill to preserve the acceptance checklist and return contract. Also use when ending a session, approaching compaction, switching context, resuming a prior handoff, recovering degraded context, or delegating to native subagents. Triggers include "prepare an inline handoff", "handoff this to Codex", "brief a subagent", "handoff", "resume", and "reground". Five modes cover WRITE, READ, RECOVER, REGROUND, and BRIEF. Use this skill liberally for decisions worth preserving and isolated tasks worth delegating.
195 other projects use a version of this.
Adopted by
Most recently taken up by
- mattpocock/skillstheir own version, first seen Oct 8, 2026
- fmind/dottheir own version, first seen Oct 5, 2026
- michielvandermeer/skillstheir own version, first seen Oct 4, 2026
- Integralist/agent-skillstheir own version, first seen Oct 4, 2026
- obie/auto-handofftheir own version, first seen Oct 4, 2026
- jesse-merhi/skillstheir own version, first seen Oct 4, 2026
Used with
Projects with it also use which-skill, wait-what and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
risadamsSkillwhich-skill
Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.
Also in 5 projects that use this
AWSSkillwait-what
Stop. That last message did not land: re-pitch it.
Also in 51 projects that use this
AWSSkillto-questionnaire
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
Also in 41 projects that use this
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 15 projects that use this
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 20 projects that use this
RoentekSkillwriting-fragments
Writing, explore — mine raw fragments, no structure yet.
Also in 20 projects that use this
- +5 more from aws
- +1 more from Roentek
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 195
- mattpocock/skills★ 335ksame name
- ykdojo/claude-code-tips★ 10ksame name
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- davidondrej/skills★ 4.1ksame name
- compozy/compozy★ 2.8ksame name
- feiskyer/claude-code-settings★ 1.7ksame name
- openclaw/agent-skills★ 1.1ksame name
- suboss87/FDEOps★ 950same name
- anombyte93/prd-taskmaster★ 604same name
- stevesolun/ctx★ 588same name
185 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 3 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 167 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 87
If verification was requested, include its status and any unresolved coverage before the Resume prompt.
- Distinctive: line 89
ALWAYS print the Resume prompt verbatim at the end of the confirmation.
- Very specific: line 112
Only the exact value jev enables verification.
- Very specific: line 117
When enabled, load the separately installed verify-handoff skill and give it the current draft and captured evidence.
- Very specific: line 124
If the optional skill is unavailable or fails, append Verification not performed: <reason> to state.open_risks, preserve existing risks, …
- Very specific: line 140
Read files_read_first. Do not read PROJECT_STATE.md (canonical .catalyst/, legacy .claude/) unless the brief says to or you need a …
- Very specific: line 152
Do not prepend to PROJECT_STATE.md — recovery is re-assembly, not fresh signal.
- Distinctive: line 159
Read-only mid-session re-injection for when recall is drifting: a file you have notes on gets re-read, a decision is re-litigated without …
- Very specific: line 199
If a recipient needs narrative rationale, reference the exact PROJECT_STATE.md entry.
“Common” is measured: kept by at least 6 in 10 of the 167 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Handoff
A handoff is a state packet the next session or subagent can act on without re-explanation. /compact loses the details that matter; subagent task descriptions either over-share (context bleed) or under-share (questions the subagent cannot ask). A handoff keeps only what matters, in the structure the consumer needs. Patterns follow Anthropic's Harness Engineering for Long-Running Agentic Applications: context resets over compaction, structured artifact handoffs, pre-coding contracts, generator ≠ evaluator.
Two files per checkpoint
| File | Purpose | Lifetime | Loaded |
<store>/<key>.json (legacy slot <store>/HANDOFF.json) | Ephemeral brief — minimum payload to resume; points at durable artifacts | Overwritten on every WRITE for that key | Start of the next session for that key |
<main>/.catalyst/PROJECT_STATE.md | Persistent narrative — decisions, why, rejected paths, surprises | Prepended forever, newest first; one file per repo, never split per feature | On demand, when a brief points at it |
Feature key resolution
| Priority | Source | Path | When |
| 1 | /handoff <name> | <store>/<name>.json | Explicit override |
| 2 | git branch --show-current (sanitized /→-, cap 80) | <store>/<branch>.json | Default |
| 3 | Not in a git repo, or detached HEAD | <store>/HANDOFF.json | Legacy single-slot fallback |
<store> is <main>/.catalyst/handoffs/ where <main> is the main worktree (parent of git rev-parse --git-common-dir; the current directory outside Git). Print it with bash "$SCR/handoff-dir.sh" or python3 "$SCR/handoff_paths.py". Every linked worktree shares one store keyed by branch. Detect "in a repo?" with git rev-parse --git-dir, never [ -d .git ]. Everything Catalyst writes lives under <main>/.catalyst/: briefs in handoffs/, task files in tasks/, the narrative PROJECT_STATE.md, knobs in config.json. Nothing new is written under .claude/. Legacy locations (.claude/handoffs/<key>.json, .claude/PROJECT_STATE.md, .claude/catalyst.json) are read when the canonical file is absent; old files are never moved or deleted, and inventory lists both locations.
Before any write: python3 "$SCR/handoff_paths.py" --init (add --tasks for task files). It creates only the selected store and, in Git, ensures .catalyst/ is in the main worktree's .gitignore. If it fails, stop and report. READ, REGROUND, list and the hooks are read-only.
Sticky session key: the first WRITE's key is reused by later WRITE/RECOVER calls in the session. If the branch changes, surface it: "Branch switched. Future handoffs will target <new-key>.json. Confirm?" BRIEF uses a task name, never the sticky key, and never writes a checkpoint or the narrative.
Five modes
| Mode | Trigger | Persists? | Consumer |
| WRITE | Ending a session, context limit, before /clear or /compact, "handoff" / /handoff | <store>/<key>.json (validated) + prepend .catalyst/PROJECT_STATE.md | Next session |
| READ | Fresh session with brief(s) present, user wants to resume | None | Current session |
| RECOVER | Context degraded mid-session — re-reads, contradictions, forgotten decisions | Overwrites the brief; no narrative entry | Current session, post-/clear |
| REGROUND | Recall drifting mid-session | None (read-only re-injection) | Current session |
| BRIEF | Delegate a selected task to a subagent or external agent | Native: tool argument. External: task file by default | Task recipient |
To fork a braided session, WRITE once per thread with explicit keys: /catalyst:handoff <key-a>, then /catalyst:handoff <key-b>. Skip automatic checkpoint suggestions for trivial sessions; always honor an explicit task-handoff request, however small.
Brief schema and helper scripts
The brief is typed JSON validated against brief.schema.json (canonical path bundled alongside this skill at <plugin-root>/skills/handoff/brief.schema.json, mirrored at $SCR/brief.schema.json, or inspect via python3 "$SCR/handoff_paths.py" --schema): schema_version "1", key, timestamp (shell-provided ISO-8601 Z), mode (WRITE | RECOVER), resume {done_when, resume_by, optional prompt, history_pointer}, state {branch, next_acceptance_check, worktree {root, is_linked, git_common_dir}, optional head_sha, diff_summary, tests (list of {cmd, result: "pass" | "fail"}), commands, decisions, rejected_paths, open_risks}, files_read_first and files_skip (lists of {path, why}). In tests, result is strictly "pass" or "fail" (never freeform text or descriptions; place context or details in cmd). Optional fields with nothing to say are omitted, never null or "none"; unknown fields are rejected. A worked example is in references/example-brief.md.
Helper-script location (read this first). The scripts (
handoff-dir.sh,handoff-validate.py,handoff-render.py,handoff_paths.py,handoff-list.py,handoff-prune.py) ship inside the plugin, NOT in the user's project. Resolve them once per mode and reuse$SCR:SCR="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts" # when the host supplies a plugin rootIf neither variable exists, resolve the plugin root from this loaded
skills/handoff/SKILL.md(two directories above its directory) and use its absolutescriptspath. NEVER write a bare relativescripts/handoff-render.pyinto a resume prompt or run it from the user's repo — it does not exist there. The durable resume entry point is the slash command/catalyst:handoff resume, which re-enters this skill and resolves$SCRagain.
Mode: WRITE
- Key — apply the ladder; sticky within the session.
- Gather state — run in parallel where supported:
git branch --show-current,git status --short,git diff --stat,git log --oneline -10,git rev-parse HEAD(→state.head_sha), andgit rev-parse --path-format=absolute --git-common-dir(→state.worktree.git_common_dir; never--absolute-git-dir, which returns the worktree-private dir in a linked worktree and fires a falseREPO MISMATCH). From the transcript note tests run (tests: list of{cmd, result: "pass" | "fail"}—resultmust be strictly"pass"or"fail", put details incmd), commands that advanced the work, decisions the next session depends on, rejected paths, open risks and the next concrete acceptance check. - Build, optionally verify, and validate — build the typed object, apply the optional verification step below, then write it to a temp file. Run
python3 "$SCR/handoff-validate.py" <tmp>.json, fix every reported field until it printshandoff-validate: OK, then move it to<store>/<key>.json(store fromhandoff_paths.py --init). - Narrative — prepend an entry to
<main>/.catalyst/PROJECT_STATE.md, directly below the header and above earlier entries. Create the header first if the file is new, and verify the first line is still# Project stateafterwards. If a legacy.claude/PROJECT_STATE.mdexists and the canonical file does not, create the canonical file with the header plus one lineEarlier entries: .claude/PROJECT_STATE.md— do not move or edit the legacy file.
# Project state — narrative log
Accretes over the life of the project. Each handoff prepends a new dated section above earlier entries.
Read sections selectively. The brief at `<store>/<key>.json` is the entry point; this file is the reference.## <ISO date> — [<key>] <short title>
### What was done
<2-5 bullets>
### Decisions (with rationale)
- **<decision>** — <why>. Rejected: <alternatives>.
### Surprises / lessons
<bullets or omit>
### Pointers
- <path>:<line-range> — <what's there>Step 5 — Confirm
If verification was requested, include its status and any unresolved coverage before the Resume prompt. Never describe a skipped or failed verification as successful.
ALWAYS print the Resume prompt verbatim at the end of the confirmation. The user should never need to open the brief file to find the paste-and-go text.
Handoff written (key: <key>, tier: <1|2|3>):
<store>/<key>.json (validated JSON)
.catalyst/PROJECT_STATE.md (+<n> lines prepended)
Next session — run `/catalyst:handoff resume` (or paste the Resume prompt):
> resume handoff '<key>': run `/catalyst:handoff resume` (READ mode), then continue. next acceptance check: <one-line check verbatim from the brief>.The resume prompt MUST route through /catalyst:handoff resume — never a bare python3 scripts/handoff-render.py <key>. The helper scripts live in the plugin, not the user's project, so a relative script path fails everywhere except the Catalyst repo itself. The slash command re-enters this skill, which resolves $SCR and renders the brief.
Optional verification (WRITE only)
A direct request to verify with Jev or to skip verification wins for this WRITE; do not persist that override. Otherwise read the existing project configuration:
bash "$SCR/catalyst-config.sh" get handoff.verification offOnly the exact value jev enables verification. off, missing configuration,
or a reader failure leaves it disabled. Report an unknown value and continue
without verification. No automatic tool discovery or external call occurs when
disabled. READ, RECOVER, REGROUND, and BRIEF do not run this step.
When enabled, load the separately installed verify-handoff skill and give it
the current draft and captured evidence. Run its verification stage once for
this draft; if that skill already owns this WRITE, let its stage run here
without invoking it again. It returns revised claims, risks, and status to this
workflow; this workflow alone validates and publishes one checkpoint and one
narrative entry, both using the revised claims.
If the optional skill is unavailable or fails, append
Verification not performed: <reason> to state.open_risks, preserve existing
risks, and continue WRITE with that status in the confirmation. The optional
skill handles unavailable Jev the same way. Do not install a skill, MCP server,
or credentials, call Jev directly as a fallback, or retry in a loop. Verification
is advisory and never bypasses schema validation or project data-sharing rules.
Mode: READ
Auto-resume (hook-driven): a session opened via
/clearor/compactgets the brief's load-bearing fields auto-rendered bySessionStart-handoff-read.sh;startup/resumeget a one-line announce./catalyst:handoff resumegives the full render any time.
- Resolve
$SCR, then inventory withpython3 "$SCR/handoff-list.py" --json(canonical + legacy stores, includingHANDOFF.json). For a duplicate key the canonical file wins unless the user names the legacy path. - Multiple briefs: surface ALL of them, name the current-branch match as the primary suggestion, list the others with mtime + key, and wait for the user. Never silently choose.
python3 "$SCR/handoff-render.py" <key>and follow its output. Heed every!!line before continuing, in the order printed:REPO MISMATCH>BRANCH MISMATCH>STALE>MISSING, plusCommits since brief written: N. If the brief was written in another (linked) worktree, say so and offer tocdthere rather than resuming in the wrong tree. Whenhandoff.verificationisjevand commits have landed since the brief was written (Commits since brief written: N), Catalyst can semantically evaluate whether landed commits conflict with locked decisions or the next acceptance check: prepare the verification payload viapython3 "$SCR/handoff-render.py" --prepare-drift-verify <key>, calljev_verify, and render the annotated status withpython3 "$SCR/handoff-render.py" <key> --drift-json '<result-json>'(or--drift-status "<summary>").- Read
files_read_first. Do not readPROJECT_STATE.md(canonical.catalyst/, legacy.claude/) unless the brief says to or you need a decision's rationale. - Confirm: "Resumed from
<key>. Next acceptance check:<quote from brief>. Starting now." The key becomes the sticky session key.
Mode: RECOVER
The session is degraded: forgotten goals, re-reads, contradicted decisions, repeated rejected approaches.
- Key via the ladder. Render the existing brief (
handoff-render.py <key>; canonical first, legacy fallback) and read the 2–3 newestPROJECT_STATE.mdentries (.catalyst/first, then legacy.claude/). git log --oneline -20andgit diffon the working branch.handoff_paths.py --init, rebuild the typed object from git + transcript, validate, write<store>/<key>.json. Keep the old copy when recovering from legacy storage.- Do not prepend to
PROJECT_STATE.md— recovery is re-assembly, not fresh signal. - Say: "Recovery brief written at
<store>/<key>.json. Run/clear, then paste this Resume prompt OR run/catalyst:handoff resume:" and print the renderer's Resume prompt verbatim beneath it.
Mode: REGROUND
Read-only mid-session re-injection for when recall is drifting: a file you have notes on gets re-read, a decision is re-litigated without new information, the acceptance check is being re-derived instead of repeated verbatim.
python3 "$SCR/handoff-render.py" --reground <key> # or --reground --file <path>It prints only the goal (done_when + next_acceptance_check), the first five locked decisions and files_read_first with reasons — no mismatch checks, no rejected paths, no resume prompt, no disk write. Read the block into the working context and continue.
Mode: BRIEF
Delegate the selected task while the originating session continues. “This” means the task just discussed; clarify only if its boundary is ambiguous. Route requests naming a subagent to native delivery, and requests naming a separate agent/session (for example Codex) to external delivery. No hook is needed. A request to prepare a brief only does not authorize dispatch.
Prepare the task (both paths)
Extract objective, full agreed requirements, in/out of scope, relevant decisions and rejected paths, source files with reasons, dependencies, acceptance checks and expected return. Carry the selected conversation context that exists nowhere else; reference existing files instead of copying them. Do not include unrelated chat, secrets, or whole project history. Preserve requirements even when the task is long.
Native subagent
- Build the BRIEF object using
resume.done_when,resume.resume_by,state.next_acceptance_check, relevant state lists andfiles_read_first. Omit checkpoint identity. Includescopeandreturn_instructionsstrings: define allowed edits and require changed files, actual check results and unresolved issues on return. Include the working directory in the task instructions; do not assume it is inherited. - Render with
python3 "$SCR/handoff-render.py" --brief <tmp>.json. The native limit is 30 lines by default. The renderer preserves all supplied decisions and reports section counts on overflow. Shorten wording, reference a supporting artifact or decompose the task; never drop requirements to pass the cap. - For “handoff this to a subagent”, pass the rendered brief directly to the host's native agent-spawn tool. Select fresh/scoped context where supported. Use the host's workspace isolation for concurrent edits where available; if edits would overlap, arrange separation or sequence them before dispatch. Do not paste the whole conversation or narrative alongside the brief. If spawning is unavailable, report that and offer external delivery; do not claim dispatch occurred.
- Track the native task using the host's result mechanism. Continue independent parent work when possible. On return, inspect the result and relevant evidence; report completed, partial or blocked work accurately. Integrate only within the user's authorized scope.
External agent (file by default)
- For Git coding tasks, offer separate worktree + branch (recommended default) or current workspace. Honor an existing selection; otherwise wait for the choice before finalizing workspace instructions. Do not treat silence as selection. For read-only/non-Git tasks use the identified directory. Record base commit, source worktree and any required uncommitted changes: a new worktree starts from a commit, not the parent's dirty files.
- Read the bundled task template and fill it with the selected task. It must be executable without Catalyst installed. Keep every agreed requirement; external files have no 30-line cap. The task body specifies workspace setup, permitted actions, checks, completion ownership and integration boundaries. Leave
## Completionempty for the recipient. - Run
python3 "$SCR/handoff_paths.py" --init --tasks. Create a unique<task-slug>-<unique-suffix>.mdunder the returned directory using exclusive creation (PythonPath.open("x", encoding="utf-8"), for example). Use a filename slug, never an unchecked path from chat. On collision choose another suffix; never overwrite. If initialization/write fails, report it; do not silently switch to inline. Keep the single task file in the main worktree so linked worktrees can access it. Print only the location and a short copyable launch prompt, substituting the real absolute file path:
Read
<absolute-task-file>. Execute its task, follow the workspace instructions, and update only its Completion section. Return a short prompt pointing to that section for the originating agent.- The receiving agent preserves everything before
## Completion, records its status/checklist/evidence/integration instructions there and returns a small pointer message. No automatic cross-host notification, launch or merge. The user relays that message. The originating agent reads Completion, verifies the actual changes against the original checklist and reports readiness; completion text alone is not proof (whenhandoff.verificationisjev, invoke the optionalverify-taskskill to gate completion usingjev_gate). The task file is a manually updated result, not a live status monitor.
Explicit inline override: only if the user asks for inline/full-message output, provide the complete task and return contract in the message, using the task template's ## Task, ## Workspace, ## Acceptance checklist and ## Return instructions headings. Do not create a task file or initialize storage for this path. The recipient returns a structured completion message instead. The workspace-choice rules still apply. Inline is a message the user relays: never launch, probe or install the other agent's CLI (codex exec, agy, and so on), never dispatch a native subagent in its place, and never run the task yourself — Catalyst prepares the brief; the user delivers it.
Cross-machine use: the user transfers the task file (and necessary artifacts). The recipient resolves the local repository and verifies the recorded base/dependencies; an inaccessible path is a blocker, not permission to invent missing context.
If a recipient needs narrative rationale, reference the exact PROJECT_STATE.md entry. BRIEF never writes or updates the narrative or a session checkpoint.
Evaluator / reviewer briefs (anti-self-grade + pre-coding contract). When the subagent's job is to grade or review an artifact:
- Dispatch it as a separate Agent invocation with fresh context. Give it the contract (
## Taskwithdone_when+ acceptance check) and the artifact path only — never the generator's transcript, reasoning, or chat history. Self-evaluation bias is measured and severe. - Agree "done" before the generator starts: the generator's brief states
done_whenand the acceptance check; the evaluator's brief quotes the same two lines verbatim. Neither side may redefine them mid-flight. - One evaluator pass is enough for binary tasks (tests pass or fail). Iterate only on genuinely subjective output, and cap iterations explicitly in the brief.
Store hygiene (list / prune)
The store accretes one brief per feature key. A merged branch leaves an orphan brief behind, and an orphan whose branch name later recurs would be resolved by tier 2 as if it were current.
python3 "$SCR/handoff-list.py" # every brief: branch, liveness, age
python3 "$SCR/handoff-prune.py" # propose orphans — deletes NOTHING
python3 "$SCR/handoff-prune.py" --apply # delete exactly what was proposedA prune candidate is a brief whose recorded branch no longer exists locally
and which is older than 30 days. The current branch's brief and the legacy
HANDOFF.json slot are never candidates. Always show the user the dry-run list
and get confirmation before running --apply — this deletes state that a future
session may want.
Anti-patterns
- Inlining file contents or the README into a brief. Point at paths and line ranges.
- Writing only one of brief / narrative on WRITE. Both or neither (RECOVER writes only the brief).
- Skipping rejected paths. Highest-ROI field: the next agent will otherwise redo them.
- Vague next check. "Continue the work" is not verifiable; "
pnpm test src/auth/showsauth.spec.tsgreen" is. - Reading the whole narrative on resume, or auto-loading every brief. The brief is the entry point; always select one.
- Silent key-switching, or tier 3 when tiers 1–2 are available.
- BRIEF dumping PROJECT_STATE.md into a task, or a full external brief in chat without an explicit inline request.
- Native BRIEF over the 30-line budget. Reference supporting artifacts or re-decompose; never silently truncate.
- Generator grading itself, or no pre-coding contract. Fresh-context evaluator,
done_when+ acceptance check fixed in both briefs before work starts.
Bad next check: "notes": "worked on auth, some tests failing, continue tomorrow".
Good: "next_acceptance_check": "pnpm test src/auth/auth.spec.ts passes 6/6" with rejected_paths: ["< operator (off-by-one)", "new Date() (alloc)"] — first action, success criterion and what not to redo, all validated before they reach disk.
Model evolution
Each component encodes an assumption about what the current model cannot do reliably alone: the pre-coding contract (self-defining "done"), anti-self-grade (self-evaluation bias), the native 30-line ceiling (compact dispatch context), manual external file transfer (no cross-host task transport yet), READ-time drift guards (moved files and stale state go unnoticed). SPLIT and PIPELINE were retired 2026-09-02 once native agent tooling absorbed orchestration.
"Every component in a harness encodes an assumption about what the model can't do on its own, and those assumptions are worth stress testing." — Anthropic
Review annually or when a new flagship model lands; strip scaffolding that no longer earns its complexity and record removals in PROJECT_STATE.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

