⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

version unknown

handoff

remvisual@remvisual⭐ 76 stars· last commit 19d ago· 0 open issues

Create a structured session handoff when context is running low or work is pausing. Deep context mining, self-validation, multi-file splitting. Captures everything the next session needs.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 76 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

claude-handoff: session handoffs for Claude Code

Never lose context between AI coding sessions. Claude Code skills and a Claude Code mod that write a structured session handoff: decisions, failed approaches, measurements, and next steps. Your next session, or the same one after compaction, picks up exactly where you left off. Stop wasting 20-40% of each session rediscovering what was already tried.

Now a Claude Code mod: /compact-handoff writes the handoff, swaps the conversation for it, and keeps working in the same terminal. No new window, no paste. Jump to the mod ↓

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.

compact-handoff mod (experimental)

Runs the handoff, then replaces the conversation with it and keeps going in the same terminal, with no new session and no paste. It works like /compact, but the summary is your validated handoff.

claude plugin marketplace add REMvisual/claude-handoff
claude plugin install compact-handoff@claude-handoff

This also installs its small companion, compact-handoff-answer (see below). The skills above must be installed too, from v2.1.0 or later.

/compact-handoff [note]       # /handoff, then continue from "Where We're Going"
/compact-handoffplan [note]   # /handoffplan, then start executing Phase 1
/compact-handoff cancel       # drop a run that's stuck

What happens:

  1. The skill runs in compact-mode: it asks nothing, commits the session's work, and writes the handoff (and plan).
  2. When that turn ends, the mod checks the files on disk. If anything is missing, empty, interrupted or refused, the context is left untouched. It also counts the handoff's lines against the skill's minimum for the session's size (Chunked 500 lines from 500K tokens, Deep 300 from 100K). A short handoff gets one more turn to finish mining; still short, the context is left untouched.
  3. The conversation is replaced by one short message naming the files. No summarizer call is made, so it takes milliseconds.
  4. The skill's own paste prompt is sent automatically, so chain tracking continues (seq N+1).

While it runs, a bar above the prompt and the spinner line show how far along it is, for example Handoff 48% · Writing the handoff · 250 of 500 lines.

A handoff needs room: a large one adds up to about 80k tokens of context while it is written. The mod reads where Claude Code compacts on its o

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/handoff/SKILL.md7.9 KBupstream ↗
    ---
    name: handoff
    description: Create a structured session handoff when context is running low or work is pausing. Deep context mining, self-validation, multi-file splitting. Captures everything the next session needs.
    user_invocable: true
    triggers:
      - do a handoff
      - create a handoff
      - run handoff
      - save session context
      - session handoff
      - save session progress
      - running out of context
    argument-hint: [optional reason, e.g. "context low", "end of day"]
    ---
    
    # Session Handoff
    
    **Guards:**
    - **Not plan mode.** This skill writes files. If in Claude Code plan mode, exit first.
    - **Not shadowing.** NEVER generate handoff-like documents freeform. Freeform summaries look right but lack chain tracking, self-validation, and evidence mining. Only this skill produces handoffs.
    - **Not when discussing.** Only run when the user explicitly asks to CREATE a handoff right now. If ambiguous ("what does handoff do", "edit the handoff file"), ask first.
    
    Typical use: ~75% context. You have a lot of conversation to mine — extract maximum value before closing. On 1M context that's ~750K tokens of history.
    
    The user should not need to provide anything — `/handoff` alone is sufficient.
    
    **Arguments:** $ARGUMENTS
    
    ---
    
    ## Agent Strategy
    
    Parallelize independent research. Launch in one message.
    
    | What | Mode | Why |
    |---|---|---|
    | Step 1A (git/beads/ls) | **Parallel Bash, never agents** | Cheap commands; agent bootup wastes 15K+ each |
    | Step 1B context agents (OV, stale-refs, bible) | Parallel Bash inline; agents only if parent handoff >500 lines | Independent research |
    | Step 1C (conversation mining) | Main agent only | Only you have the history |
    | Steps 5+6 (beads/memory writes) | Parallel Bash | Independent writes |
    
    ---
    
    ## Step 1: Deep Context Gathering
    
    ### 1A: External State (parallel Bash — never agents)
    
    Run in one message as inline Bash calls:
    
    | Commands | Returns |
    |---|---|
    | `git log --oneline -20`, `git diff --stat`, `git status -s \| head -30`, `git branch --show-current` | Branch, recent commits, uncommitted changes |
    | `bd list --status=in_progress`, `bd list --status=open --priority=0,1`, `bd stats` (skip if bd unavailable) | Active/open beads |
    | `ls plans/handoffs/`, `ls .claude/handoffs/`, `ls plans/*.md` | Existing handoff files |
    
    ### 1B: Chain Detection
    
    **Resolve the chain tag** (use first that applies):
    1. Epic exists → use epic name/ID
    2. 1-4 beads → use all bead IDs (e.g., `myproject-xxxx, myproject-yyyy`)
    3. 5+ beads → pick 2-3 most relevant to the primary work stream
    4. No beads/epic → generate fallback: `python -c "import secrets; print(secrets.token_hex(4))"` → `standalone-{hex}`
    
    **Find prior handoff in this chain** (two tiers, stop at first match):
    
    - **Tier A — Paste Prompt (deterministic).** Did the user start this session by pasting something like `Read HANDOFF_foo_date.md (seq 2, chain-x) and continue...`? If yes, that file is the parent. Read its header. Continuation — seq = parent's + 1.
    
    - **Tier B — Bead/Epic Scan (heuristic, skips auto-handoffs).**
      ```bash
      grep -l "Chain:.*{chain_tag}" plans/handoffs/HANDOFF_*.md 2>/dev/null \
        | xargs grep -L "^\*\*Auto:\*\* true" 2>/dev/null
      ```
    
      **A shared bead is a CANDIDATE, not proof of continuation.** Before claiming the match as parent:
      1. Read the candidate's `## Where We're Going` section.
      2. Is current session work a direct follow-on of those steps? (Same feature/fix, continuing the named next-actions?)
      3. **Clear continuation** → inherit chain, increment seq, set parent.
      4. **Unclear or unrelated** → treat this as seq 1 (new chain). Add a `## Related Handoffs` section listing the sibling file as reference only, NOT parent. A bead can host many independent work streams (brainstorm → impl → testing) — don't conflate them.
      5. **Any doubt** → ask the user: "Found prior handoff `{file}` on same bead. Is this session a continuation? (default: new chain)"
    
    **Neither tier matches:** seq 1, parent: none.
    
    ### 1B-3/4: Context Agents (parallel, inline Bash unless parent is huge)
    
    Once chain tag resolved, launch in parallel:
    
    | Task | Returns |
    |---|---|
    | OV Recall (if available): `/memory-recall` with 2-3 keyword searches | Prior decisions, failed approaches |
    | Parent Context (if parent exists): **READ FULL PARENT** — extract Goal, Where We Are, Key Decisions, What We Tried, Where We're Going, Open Questions, code identifiers | Parent summary for "Since Last Handoff" + identifier list |
    | Reference Docs: `ls plans/*BIBLE* plans/*bible* *BIBLE* CLAUDE.md .claude/CLAUDE.md` and read if found | Project context |
    | Stale Refs (if parent): Grep each parent identifier against current codebase | List of identifiers NOT found |
    
    **Parent reading is MANDATORY when a parent exists.** "Since Last Handoff" requires comparing what was planned vs what happened. Skip agents that don't apply.
    
    ### 1C: Conversation Mining
    
    If arguments were provided ($ARGUMENTS), use as a soft hint for framing. Conversation is ground truth.
    
    **Choose mining pass and announce it** (this is not optional):
    
    | Pass | When | Strategy |
    |---|---|---|
    | **Quick** | <100K context tokens | Single pass with extraction checklist below |
    | **Deep** | 100K-500K context tokens, OR 1M context + 20+ tool calls | Two passes — **read `references/mining-deep-chunked.md`** |
    | **Chunked** | 500K+ context tokens, OR 1M context + 50+ tool calls or >1hr work | Map-reduce — **read `references/mining-deep-chunked.md`** |
    
    **Write: "Mining with {Quick/Deep/Chunked} pass ({reason})."** before starting. Don't use numeric names — they collide with chain seq numbers.
    
    For Deep or Chunked, read `references/mining-deep-chunked.md` NOW for the multi-pass protocol. Don't do map-reduce from memory.
    
    **Extraction checklist** (apply per pass):
    
    - [ ] Goals & objectives (user's target, overarching epic)
    - [ ] Work completed (every file modified, function changed, with specifics)
    - [ ] Approaches tried (chronological, successful and failed)
    - [ ] Failed approaches + why (MOST expensive to re-discover)
    - [ ] Test results & measurements (raw numbers)
    - [ ] Data files created (paths to JSON/CSV/logs)
    - [ ] Decisions made + rejected alternatives
    - [ ] Discoveries & gotchas
    - [ ] Code analysis (signatures, thresholds, constants)
    - [ ] User preferences expressed
    - [ ] Remaining questions
    - [ ] Dependencies on other work
    
    If you're skimming, STOP. Re-read. Details are the value.
    
    ---
    
    ## Step 2: Choose Output Location
    
    First directory that exists (or create `plans/handoffs/`):
    1. `plans/handoffs/`
    2. `.claude/handoffs/`
    
    ## Step 3: Generate File Name
    
    - **With beads:** `HANDOFF_{chain_tag}_{slug}_{YYYY-MM-DD}.md` (e.g., `HANDOFF_myproject-xxxx_auth-rewrite_2026-03-19.md`). For multi-bead, use primary bead only.
    - **No beads:** `HANDOFF_{slug}_{YYYY-MM-DD}.md`
    - Slug: 2-4 word kebab-case.
    - Collision: append `_2`, `_3`, etc.
    
    ## Step 4: Write the Handoff File
    
    **Read `references/output-template.md`** for the full file structure. It defines every section (Goal, Where We Are, What We Tried, Evidence & Data, etc.) with composition rules.
    
    ### Line Budget
    
    Check your system prompt for context window size.
    
    | | Standard (200K) | Extended (1M) |
    |---|---|---|
    | Target (aim for ceiling) | 300-400 lines | 500-800 lines |
    | Hard minimum | 150 lines | 250 lines |
    | Light session min | 80 lines | 120 lines |
    | Split threshold | 400 lines | 800 lines |
    
    **Target the CEILING.** An 800-line handoff on 1M context is ~0.7% of the window — negligible cost, huge savings. Too-long is cheap; too-short costs hours of re-investigation.
    
    ### Two-Phase Write
    
    1. **Phase 1 — Initial Write.** Compose and write everything in ONE Write call. All sections.
       **Phase 1 MUST hit the pass minimum on its own** — Quick: 150+ standard / 250+ extended, Deep: 300+, Chunked: 500+. Phase 1 is not a rough draft; it's the baseline. If you find yourself planning to "flesh it out in Phase 2," stop and expand the current sections before writing.
    2. **Phase 2 — Gap Research.** A
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/remvisual-claude-handoff-skills-handoff.md

// REPO STATS

76 stars
0 open issues
Last commit: 19d ago