Sandbox
@REMvisual/claude-handoff

Claude Code skills for session handoffs

This repo packages two Claude Code skills, `/handoff` and `/handoffplan`, that turn a live session into a structured resume file for the next session. They mine the conversation, gather git state, check the output, and link handoffs across sessions so the chain stays intact.

49 stars6 forksShellUpdated 3mo ago
Who it's for

Builders who use Claude Code and want their agent to carry context from one session to the next.

What it delivers

You can stop losing work when a session compacts and pick up from a structured handoff instead of starting over.

What it does

Session handoff skill

`/handoff` captures the current session into a handoff file with goals, current state, tried approaches, decisions, evidence, feedback, and next steps.

Planning handoff skill

`/handoffplan` writes a handoff plus a phased plan with tasks, dependencies, anti-goals, rollback notes, and success criteria.

Chain tracking

Handoffs detect earlier files in the same work stream and increment the sequence so later sessions can follow the chain.

Context mining and state gathering

The skill pulls from the full conversation, git log, diff, status, and active tasks to build the handoff.

Pre-compact hook

`hooks/precompact-handoff.sh` can run before compaction to save a short snapshot of git state and tasks.

How to get it

  1. 1Run
    git clone https://github.com/REMvisual/claude-handoff.git
    cp -r claude-handoff/skills/handoff ~/.claude/skills/
    cp -r claude-handoff/skills/handoffplan ~/.claude/skills/
  2. 2Run
    /handoff              # Capture session context — next session explores
    /handoffplan          # Capture context + write a plan — next session executes
  3. 3No arguments needed. The skill mines your full conversation, gathers git state,…
    Read `plans/handoffs/HANDOFF_fix-auth-bug_2026-03-19.md` (seq 2, PROJ-abc1)
    and continue from "Where We're Going".

README

claude-handoff

Never lose context between AI coding sessions.

Two skills for Claude Code that capture decisions, failed approaches, measurements, and next steps — so your next session picks up exactly where you left off. Stop wasting 20-40% of each session rediscovering what was already tried.

Download Latest

Install

git clone https://github.com/REMvisual/claude-handoff.git
cp -r claude-handoff/skills/handoff ~/.claude/skills/
cp -r claude-handoff/skills/handoffplan ~/.claude/skills/

Verify: type /handoff in Claude Code — it should appear in autocomplete.

Usage

/handoff              # Capture session context — next session explores
/handoffplan          # Capture context + write a plan — next session executes

No arguments needed. The skill mines your full conversation, gathers git state, validates the output, and gives you a ready-to-paste resume prompt:

Read `plans/handoffs/HANDOFF_fix-auth-bug_2026-03-19.md` (seq 2, PROJ-abc1)
and continue from "Where We're Going".

Paste that into a fresh Claude Code session. It picks up the chain and starts working.

What you get

Every handoff captures a structured snapshot of your session:

┌─────────────────────────────────────────────────────┐
│  HANDOFF_fix-auth-bug_2026-03-19.md                 │
├─────────────────────────────────────────────────────┤
│  The Goal           — what we're solving and why    │
│  Where We Are       — 15-25 bullets of current state│
│  What We Tried      — every approach, chronological │
│  Key Decisions      — what was chosen AND rejected  │
│  Evidence & Data    — real numbers, not summaries   │
│  User Feedback      — preferences, corrections, tone│
│  Where We're Going  — ordered next steps            │
│  Quick Start        — exact commands for next session│
└─────────────────────────────────────────────────────┘

"What We Tried" is the most valuable section. Failed approaches are the most expensive thing to rediscover. This section captures every attempt — what was tried, what happened, why it was kept or abandoned — so the next session never repeats work.

/handoff vs /handoffplan

Both capture your session. The difference is what the next session does:

/handoff/handoffplan
When to usePausing mid-workDone with research, ready to build
What it writesHandoff fileHandoff + phased plan + tracked tasks
Next sessionReads handoff, onboards, exploresReads plan, claims Phase 1, starts coding
Paste prompt"Continue from Where We're Going""Execute the plan starting at Phase 1"

/handoffplan creates beads (or tasks in your tracker) with dependency chains between phases, anti-goals from failed approaches, rollback strategies, and success criteria tied to real numbers from the session.

How it works

  1. Mines your conversation — 12-item extraction checklist covering goals, approaches, failures, decisions, measurements, code analysis, and user preferences
  2. Gathers external state — git log, diff, uncommitted changes, active tasks (in parallel)
  3. Detects chain continuity — finds prior handoffs in the same work stream, inherits chain tag and sequence number
  4. Validates the output — Phase 1 must hit the pass minimum on first write; Phase 2 then fills gaps toward the ceiling
  5. Adapts to context size — at 500K+ tokens, switches to multi-pass map-reduce extraction to avoid the "lost in the middle" problem

Handoffs link across sessions automatically:

HANDOFF_fix-auth_2026-03-17.md  (seq 1)
    └─ HANDOFF_fix-auth_2026-03-18.md  (seq 2)
        └─ HANDOFF_fix-auth_2026-03-19.md  (seq 3)

Your third session on a feature knows about the first two.

Why this exists

Claude already generates session summaries when context compresses. They look like handoffs — but they lack chain tracking, self-validation, evidence mining, and comprehension gates. In controlled A/B testing (same bug, same codebase, fresh sessions), the skill-based session:

  • Required zero user intervention (the unstructured session needed "don't alter anything yet")
  • Traced the complete failure call chain (the unstructured session proposed a surface-level fix)
  • Found bugs not listed in the handoff through structured adjacent exploration
  • Produced justified fixes instead of correct-but-unexplained ones

Prevent skill shadowing

Without this, Claude may generate freeform "handoffs" when sessions end — documents that look right but skip the process. Add to your CLAUDE.md:

When ending a session or saving progress:
- ALWAYS use the /handoff skill. NEVER generate handoff summaries without it.

Works with

The skills work standalone. They unlock more when paired with:

  • Beads — Issue tracking in your repo. Handoffs auto-detect active beads and use them as chain tags.
  • OpenViking — Persistent AI memory. Handoffs search for prior decisions and context from earlier sessions.
  • Git — git log, diff, status gathered automatically.
  • Any CLI task tracker — The skills use bd (beads) as default — swap in Linear, Jira CLI, or GitHub Issues.

PreCompact hook (optional)

Safety net that runs before context compaction, capturing ~50 lines of git state and active tasks.

cp claude-handoff/hooks/precompact-handoff.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/precompact-handoff.sh

Uninstall

rm -rf ~/.claude/skills/handoff ~/.claude/skills/handoffplan

License

MIT — If this saved you time, give it a star.

Files in the repo

Repository payload6 top-level entries
  • hooks
  • skills
  • .gitignore
  • CHANGELOG.md
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More skills

obra/
superpowers

An agentic skills framework & software development methodology that works.

285k
1 add

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local deterministic AST parsing, every edge explained, no vector store.

117k
1 add
Vincentwei1021/
anything2explainer

Topic in, narrated explainer video out. A Claude Code / Codex skill that turns any topic into a black-canvas motion-graphics explainer video with TTS voiceover, subtitles and a chapter progress bar. Chinese or English; every frame drawn in code with Remotion.

666

Open-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)

71k