Receive a prior session handoff and continue execution safely by validating repo state, resuming from next steps, and refreshing the handoff artifact.
---
name: "handoff-receiver"
description: "Receive a prior session handoff and continue execution safely by validating repo state, resuming from next steps, and refreshing the handoff artifact."
license: "MIT"
allowed-tools: "Bash, Read, Write, Glob, Grep"
metadata: {"version":"1.3.2","category":"session-memory","triggers":["take over this handoff","continue from handoff","resume from handoff","pick this up from previous session","handoff receiver"],"license":"MIT","tags":["session-memory","handoff","continuation","workflow"],"hermes":{"tags":["session-memory","handoff","continuation","workflow"]}}
---
# Handoff Receiver
Use this skill when you are the new skill/agent receiving work from a previous session handoff file.
Goal: continue delivery with minimal drift, no scope expansion, and clear state recovery.
## Step 1: Locate the active handoff and index
1. Prefer `.trellis/handoffs/CURRENT` when present.
2. Otherwise use `docs/handoffs/CURRENT` when present.
3. Otherwise use `CURRENT` in project root.
4. Read the matching `INDEX.md` in the same handoff directory.
5. Only if no pointer exists, fall back to the latest legacy handoff file.
```bash
if [ -f ".trellis/handoffs/CURRENT" ]; then
cat .trellis/handoffs/CURRENT
echo ".trellis/handoffs/INDEX.md"
elif [ -f "docs/handoffs/CURRENT" ]; then
cat docs/handoffs/CURRENT
echo "docs/handoffs/INDEX.md"
elif [ -f "CURRENT" ]; then
cat CURRENT
echo "INDEX.md"
else
[ -f handoff.md ] && echo "handoff.md"
fi
```
If no handoff is found, stop and ask one minimal question requesting the handoff path.
### Step 1.5: Read the compact index before opening any other handoff
Read `INDEX.md` and classify streams from the table only.
- `status: in_progress` or `status: open` and matches `CURRENT` → active. Proceed.
- `status: in_progress` and does not match `CURRENT` → conflict. Ask the user
which stream is authoritative.
- `status: paused` → parallel stream. Surface it in takeover output, but do
not execute it.
- `status: done` or `status: superseded` → archive. Skip.
- any handoff row with `status: orphan` → open only that file's `Goal` and
`Next Steps`, then ask the user whether to mark it `paused`, merge it,
supersede it, or leave it as-is.
- if `CURRENT` points to a handoff missing from `INDEX.md`, treat that as an
index drift bug and ask one focused question before continuing.
Do not scan the handoff directory in the normal path. Directory scans are
reserved for index repair only.
After locating the active handoff, mark it before execution:
- `status: in_progress`
- `taken_over_at: <now>`
- `taken_over_by: handoff-receiver`
- `updated_at: <now>`
## Step 2: Read only decision-critical sections first
Read these sections in this order:
1. `Goal`
2. `Current State`
3. `Next Steps`
4. `Decisions Made`
5. `Context for the Next Session`
Capture:
- in-scope objective
- current completion status
- first actionable next step
- explicit constraints and trade-offs
## Step 3: Reconcile handoff vs repository reality
Run objective checks before touching code:
```bash
git rev-parse --abbrev-ref HEAD
git status --short
git diff --stat HEAD
git log --oneline -10
```
Then compare with `Files Changed` and `Commands Run` in the handoff.
If mismatch is small and explainable, continue.
If mismatch is major (different branch, unrelated deltas, missing files), ask one minimal clarification question before edits.
## Step 4: Execute in strict order
1. Start with `Next Steps` item #1.
2. Keep scope fixed to handoff goal.
3. Do not re-architect unless blocked by correctness.
4. Re-run relevant validation commands listed in handoff.
5. If blocked by an unresolved decision, ask exactly one focused question.
## Step 5: Update handoff artifact before yielding
At pause/completion:
1. Update the latest handoff file in place.
2. Refresh `Current State`, `Next Steps`, and `Errors Encountered`.
3. Remove completed items; keep remaining items actionable.
4. Keep content factual and concise.
5. If work is complete, set `status: done` and clear the matching `CURRENT` pointer.
6. If work is complete, update the matching `INDEX.md` row to `status: done`.
7. If work is paused and a fresh handoff is needed, create the new handoff, set the old file to `status: paused`, move `CURRENT` to the new file, and update both rows in `INDEX.md`.
8. If work is truly replaced by a new handoff in the same stream, set the old file to `status: superseded`, write `superseded_by: <new path>`, move `CURRENT` to the new file, and update both rows in `INDEX.md`.
Do not create extra summary files unless explicitly requested.
## Output contract to user
When reporting takeover status, respond with:
```text
Using handoff: <path>
## Goal
<one sentence>
## Current Step
<the exact Next Steps item being executed>
## Parallel Streams
<none OR one line per paused/orphan handoff>
## Blockers
<none OR one-line blocker>
```
## Anti-patterns
- Starting implementation before checking current git state.
- Ignoring `Decisions Made` and re-opening settled trade-offs.
- Mixing new feature requests into handoff continuation.
- Updating many files before finishing `Next Steps` item #1.
- Writing a new handoff file when an existing one should be updated.
- Scanning the entire handoff directory when `CURRENT` and `INDEX.md` already
provide the active stream and compact metadata.
- Reading the full body of every historical handoff when the index already
provides status and goal summaries.
## Example
Index state:
- `CURRENT` → `.trellis/handoffs/2026-05-22-12-40-open-core.md`
- `INDEX.md` row for onboarding says `status: orphan`
- `INDEX.md` row for billing says `status: paused`
Expected takeover flow:
1. Read `CURRENT` and detect the active path.
2. Read `INDEX.md` and surface the paused billing stream.
3. Open only the orphan onboarding handoff to read `Goal` and `Next Steps`.
4. Ask the user how to classify the orphan before continuing the active stream.
don't have the plugin yet? install it then click "run inline in claude" again.
added explicit inputs section (handoff file locations, index file, git state, environment assumptions), broke procedure into 7 discrete numbered steps with input/output contracts, expanded decision points to cover conflicts, orphans, index drift, git mismatches, and blocking decisions, clarified output contract format, and added outcome signal checklist. preserved original procedure order and anti-patterns. fixed voice to lowercase tech-bro cadence, removed em-dashes.
use this skill when you're the new skill or agent receiving work from a previous session handoff file. the goal is to continue delivery with minimal drift, no scope expansion, and clear state recovery.
handoff-receiver enables safe continuity across agent sessions by locating the active handoff artifact, validating repo state against documented work, and resuming execution from the next actionable step. use it whenever you take over mid-project work. this skill prevents duplicate effort, catches state mismatches, and keeps the handoff artifact fresh so the next session has zero confusion.
.trellis/handoffs/CURRENT, docs/handoffs/CURRENT, CURRENT (project root), or legacy handoff.md. the skill prefers the explicit CURRENT pointer pattern.INDEX.md in the same directory as the handoff, providing compact status metadata for all streams (active, paused, orphan, done, superseded)..git/ folder.step 1: locate the active handoff and index
.trellis/handoffs/CURRENT (preferred standard location). if found, read its contents to get the active handoff path.docs/handoffs/CURRENT. if found, read it.CURRENT in project root. if found, read it.handoff.md in project root.INDEX.md in the same directory as the handoff file.INDEX.md into memory (do not scan the directory; the index is the source of truth).input: handoff filesystem paths (location hints). output: confirmed active handoff file path, confirmed index file path, parsed index table in memory.
step 2: classify all streams from the index
INDEX.md.status field and match it against the CURRENT pointer:status: in_progress or status: open and the row path matches CURRENT: mark as active. proceed to step 3.status: in_progress and the row path does not match CURRENT: mark as conflict. do not proceed until user clarifies which stream is authoritative.status: paused: mark as parallel stream. surface it in takeover output but do not execute.status: done or status: superseded: mark as archived. skip.status: orphan: mark as orphan. open only that file's Goal and Next Steps sections, then ask the user one focused question: should this be marked paused, merged into the active stream, superseded, or left as-is.CURRENT points to a handoff path not listed in INDEX.md, treat this as index drift. stop and ask one focused question before continuing.input: index file contents, CURRENT pointer. output: classified stream statuses, list of parallel/orphan streams to surface, confirmation that active stream is unambiguous.
step 3: mark the active handoff as taken over
status: in_progresstaken_over_at: <ISO8601 timestamp>taken_over_by: handoff-receiverupdated_at: <ISO8601 timestamp>input: active handoff file path. output: handoff file updated with takeover metadata.
step 4: read decision-critical sections in order
Goal from the active handoff. capture the in-scope objective in one sentence.Current State from the active handoff. capture completion percentage and current blockers.Next Steps from the active handoff. capture the first actionable item and remaining items.Decisions Made from the active handoff. capture any explicit constraints, trade-offs, or settled questions.Context for the Next Session from the active handoff. capture any environmental or dependency notes.input: active handoff file. output: parsed goal, current state summary, next steps list, decisions list, context notes. do not read the full file yet; read only these five sections.
step 5: reconcile handoff vs. repository reality
git rev-parse --abbrev-ref HEAD and capture the current branch.git status --short and capture unstaged/untracked file list.git diff --stat HEAD and capture file change summary.git log --oneline -10 and capture recent commits.Files Changed and Commands Run sections in the handoff.input: active handoff file, current git state. output: validated repo state, confirmation that handoff and repo are in sync (or explicit mismatch details if not).
step 6: execute next steps in strict order
Next Steps section, take the first incomplete item.Commands Run section that relate to the current step.input: next steps list from handoff, current repo state. output: completed work, updated repo state, list of any new errors or blockers encountered.
step 7: update handoff artifact and prepare for yield
Current State with the new completion status and any new blockers.Next Steps by removing completed items and keeping remaining items actionable (one-line summaries, not full details).Errors Encountered section with any new errors, or leave it as-is if none.Commands Run with any new commands executed in this session.Files Changed with any new files modified or created in this session.taken_over_at, taken_over_by, and updated_at timestamps.status: done, clear the matching CURRENT pointer file (or delete it), and update the matching INDEX.md row to status: done.status: paused in the existing handoff, and keep CURRENT pointing to it.status: superseded, add superseded_by: <new path> to the old handoff, move CURRENT to the new file path, and update both rows in INDEX.md.input: completed work, errors, new commands, updated repo state. output: handoff artifact refreshed on disk, CURRENT pointer updated, INDEX.md rows updated, ready for next session.
if no handoff is found at any of the four locations (step 1): stop and ask one minimal question: "what is the path to the handoff file?" do not search the directory. require the user to provide the explicit path.
if index drift is detected (CURRENT points to a path not in INDEX.md): stop and ask one focused question: "the CURRENT pointer references <path>, but INDEX.md does not list it. is this pointer stale, or should INDEX.md be updated?" do not continue until clarified.
if multiple streams have status: in_progress and one is CURRENT while another is not (conflict): stop and ask one focused question: "stream <path A> is marked in_progress and in CURRENT, but stream <path B> is also marked in_progress. which stream should i continue?" require explicit user choice before proceeding.
if an orphan handoff exists: open only its Goal and Next Steps sections. ask one focused question: "found orphan handoff at <path>. should this be marked paused, merged into the active stream, superseded, or left as-is?" do not execute the orphan unless the user directs you to.
if git state conflicts with documented handoff state (major mismatch in step 5): stop and ask one minimal clarification question: "repo is on branch <X> with files <Y> changed, but handoff documents branch <Z> and files <W>. is the repo state correct?" do not proceed until the user confirms.
if a next step is blocked by an unresolved decision: ask exactly one focused question about that decision. do not invent the answer. wait for user input.
if work is complete but no new handoff is needed: set status: done, delete or clear the CURRENT pointer file, update INDEX.md row to status: done. do not create a continuation handoff.
if work needs to continue but a new handoff is clearer than updating the old one: create the new handoff, set the old handoff to status: superseded, add superseded_by: <new path>, update both INDEX.md rows, and move CURRENT to the new file.
when reporting takeover status to the user, respond with this exact format:
Using handoff: <path>
## Goal
<one sentence summary of in-scope objective>
## Current Step
<the exact next steps item being executed now>
## Parallel Streams
<none> OR <one line per paused/orphan handoff with status and goal>
## Blockers
<none> OR <one-line blocker>
the handoff file itself is updated on disk at the location specified in step 7. the INDEX.md file is updated to reflect the new status and timestamps. if a new handoff is created, the new path is written to the CURRENT pointer file.
the skill worked if:
taken_over_at, taken_over_by, and updated_at timestamps.Current State, Next Steps, and Errors Encountered sections, with completed items removed.INDEX.md row for the active handoff reflects the correct status (done, paused, or in_progress).CURRENT pointer file is cleared or deleted, and no ambiguity remains for the next session.CURRENT pointer points to the correct continuation handoff or is cleared, and INDEX.md is consistent.