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.0
category: session-memory
triggers:
- "take over this handoff"
- "continue from handoff"
- "resume from handoff"
- "pick this up from previous session"
- "handoff receiver"
---
# 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 with external connections, expanded procedure with detailed input/output for each step, created comprehensive decision points section covering conflicts and edge cases, clarified output contract with format template, added outcome signal criteria, and integrated edge cases like index drift, repo divergence, and blocker handling.
use this skill when you are the new agent or skill receiving work from a previous session handoff file. goal: continue delivery with minimal drift, no scope expansion, and clear state recovery.
you inherit work mid-stream from a prior session. your job is to locate the active handoff, validate the repo matches documented state, resume execution from the exact next step, and update the handoff artifact before handing off again. use this when a peer agent or external system has left a handoff file and passed the torch to you. skip this if you are continuing your own session or have no prior handoff.
required:
INDEX.md in the same handoff directory (compact table of all handoff streams and their status).trellis/handoffs/, docs/handoffs/, or project root (whichever holds CURRENT)external connections:
setup guidance:
CURRENT, INDEX.md, or the handoff file itself..trellis/handoffs/CURRENT first. if present, read it and note the handoff path it contains.docs/handoffs/CURRENT. if present, read it.CURRENT in project root. if present, read it.handoff.md in root or docs/). if found, use it.input: filesystem paths. output: confirmed path to active handoff file (e.g., .trellis/handoffs/2026-05-22-12-40-open-core.md).
INDEX.md from the same directory as the handoff file (or the same directory as CURRENT if CURRENT was found).status field:in_progress or open and row path matches the CURRENT pointer: active stream. proceed to step 2.in_progress and row path does not match CURRENT: conflict. ask the user one question: "which stream is authoritative, the one in CURRENT or the in_progress row in INDEX.md?"paused: parallel stream. note it. surface it in takeover output (see output contract below) but do not execute it.done or superseded: archived. skip.orphan: unattended work. open only the Goal and Next Steps sections of that handoff. ask the user one focused question: "how should i classify this orphan stream: paused, merged into active, superseded, or left as-is?"CURRENT points to a handoff file that is not listed in INDEX.md, treat this as index drift. ask one focused question: "should i add this handoff to INDEX.md, or is CURRENT stale?" do not continue without clarity.status: in_progresstaken_over_at: <ISO 8601 timestamp now>taken_over_by: handoff-receiverupdated_at: <ISO 8601 timestamp now>input: INDEX.md file. output: confirmed active handoff path, list of parallel/orphan streams (if any), handoff file updated with takeover metadata.
Goal (one sentence scope)Current State (completion percentage, blockers, key facts)Next Steps (numbered list of actionable items)Decisions Made (settled trade-offs and constraints)Context for the Next Session (gotchas, tool setup, external dependencies)Next Steps)do not read Files Changed, Commands Run, or other detail sections yet. those come in step 3.
input: active handoff file. output: mental model of goal, current state, next step, and constraints.
git rev-parse --abbrev-ref HEAD
git status --short
git diff --stat HEAD
git log --oneline -10
Files Changed and Commands Run sections in the handoff. look for:input: git state, handoff file. output: confirmation that repo matches handoff expectations (or explicit user clarity on divergence).
Next Steps in the handoff.Commands Run before starting work to verify the setup is still intact.Decisions Made in the handoff. if the decision applies, follow it without re-opening the trade-off.input: Next Steps list, repo state. output: one completed step, remaining steps identified for next handoff.
Current State: reflect actual completion status and blockers nowNext Steps: remove item #1 (completed). renumber remaining items. keep items actionable and specific.Errors Encountered: add any new errors, warnings, or gotchas encountered during this sessionFiles Changed: add any new files modified or createdCommands Run: add any new commands executedstatus: done. clear the CURRENT pointer file (delete it or set it to empty). update the matching row in INDEX.md to status: done.status: in_progress. if the paused state is long (hours or days), consider creating a fresh handoff file with the same goal but updated Next Steps. set the old handoff to status: paused, create the new handoff, move the CURRENT pointer to the new file, and add both rows to INDEX.md (old row paused, new row open).status: superseded. add a field superseded_by: <path to new handoff>. move the CURRENT pointer to the new handoff file. update INDEX.md: old row superseded, new row open or in_progress.input: completed work, decision on end state. output: updated handoff file with new state, updated CURRENT pointer (if applicable), updated INDEX.md (if applicable).
no handoff found:
conflict in index:
CURRENT points to a handoff with status: in_progress in the index, then proceed to step 2.CURRENT points to a handoff not listed in INDEX.md, then ask the user if CURRENT is stale or the index is out of sync before continuing.in_progress handoff than CURRENT, then ask the user which is authoritative.orphan or paused streams:
paused handoff, then surface it in the output but do not execute it.orphan handoff, then open only its Goal and Next Steps. ask the user how to classify it (paused, merged, superseded, or left alone).repo divergence:
blocked during execution:
Decisions Made, then ask exactly one focused question and wait.Commands Run and Current State for setup guidance before re-running.end state determination:
Next Steps are complete, then set status: done and clear CURRENT.status: in_progress and consider creating a fresh handoff file if the pause is long.status: superseded and update INDEX.md.when you take over a handoff, respond to the user with this format:
using handoff: <path>
## goal
<one sentence from the Goal section>
## current step
<the exact Next Steps item #1 you are about to execute>
## parallel streams
<none, OR one line per paused/orphan handoff: "paused: <path> (goal in one sentence)", etc.>
## blockers
<none, OR one-line description of any blocker preventing immediate execution>
if a blocker or conflict exists (e.g., index drift, repo divergence, unresolved decision), add a final line:
action needed: <one focused question for the user>
you know the skill worked when:
Next Steps and are ready to execute it.Current State, Next Steps, and metadata. no stale data remains.CURRENT pointer, INDEX.md row, and actual handoff file path are all in sync. no drift.Next Steps and did not add new features, refactor, or change the goal.Decisions Made and reopening settled trade-offs.Next Steps item #1.CURRENT and INDEX.md already provide active stream metadata.INDEX.md status and goal summaries.index state:
CURRENT → `.trellis/handoffs/2026-05-22-12-40-open-core.md`
INDEX.md row for onboarding: status: orphan
INDEX.md row for billing: status: paused
INDEX.md row for open-core: status: in_progress
expected takeover flow:
CURRENT and detect active path: .trellis/handoffs/2026-05-22-12-40-open-core.md.INDEX.md and classify rows: open-core is active, billing is paused, onboarding is orphan.Goal and Next Steps. ask user: "this orphan onboarding stream has not been touched. should i mark it paused, merge it into open-core, or supersede it?"credits: original design from clawhub. enriched for implexa quality standards, explicit decision trees, and edge case handling.