From session-handoff
Use when ending a long session, switching context, or the user says "handoff", "session summary", or "wrap up" — especially after debugging, multi-file changes, or architectural decisions that a fresh session would lose.
How this skill is triggered — by the user, by Claude, or both
Slash command
/session-handoff:session-handoffThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a self-contained prompt that lets a fresh Claude Code session resume where this one left off.
Generate a self-contained prompt that lets a fresh Claude Code session resume where this one left off.
Git state, file contents, and memory files are already recoverable by the next session — a new session starts with CLAUDE.md, memory, and full tool access. What's NOT recoverable is session-specific context: decisions made, approaches tried and rejected, gotchas discovered, and in-flight tasks. Focus the handoff on that.
Reference: This skill implements the "Clear — start a new session, usually with a brief you've distilled" pattern from Anthropic's session management guide. The handoff IS the brief.
/clear with a handoff is better than continuing)Short-circuit: If the session involved no code changes, no decisions, and no in-flight work, skip the handoff and tell the user: "This session has no state worth handing off. Git and memory are up to date."
Quick git snapshot (parallel, read-only):
git branch --show-current
git log --oneline -5
git status --short
git remote -v
Read project memory files — Claude Code loads these automatically at session start from ~/.claude/projects/<project-path>/memory/. Check MEMORY.md for the index and read referenced files to assess staleness.
Check for pending/in-progress tasks via the current Claude Code task-tracking tool (TaskList on current builds, TodoWrite on older builds — whichever is exposed in this session). If tasks exist, weave them into "What We Were Doing" and "Next Steps" rather than listing separately. Summarize rather than enumerate if there are more than 3. If neither tool is available, skip this check — the skill does not depend on it.
This is the critical step. Review the conversation and identify:
Use judgment about what matters. A session that was 90% debugging one issue needs different handoff content than a session that touched five files across three features.
Quality check: If you removed "What Didn't Work" and "Key Findings" from your notes, would everything remaining be recoverable from git log and file contents? If yes, you haven't reflected deeply enough — go back and find the non-obvious context.
Before generating the prompt, persist anything the next session should know long-term:
Memory-worthy vs ephemeral — examples:
sed to fix the config but escaping was wrong; switched to Python." (Debugging dead end — useful for the next session, not long-term.)cdk deploy takes 12 minutes in stg." (They may already know this.)For straightforward factual updates, just do it. For ambiguous or sensitive findings, ask the user first.
Build a markdown block. Include only sections that have meaningful content — omit empty sections rather than padding with "None". Target 200-500 words — every word competes with CLAUDE.md, project rules, and memory for context in the new session.
```
## Continue [describe the work, not the project name]
### Working Directory
<cwd>
### Read First
- <2-4 files that give the fastest orientation — README, active spec, key source file>
- <include memory path if memories were updated>
### Current State
- Branch: <branch> (latest: <short sha> "<commit msg>")
- Uncommitted: <clean | summary of changes>
### What We Were Doing
<1-3 sentences describing the current task and where it stands>
### Decisions Made
- <decision and rationale — the WHY matters more than the WHAT>
### What Didn't Work
- <approach tried, why it failed — prevents the next session from repeating>
### Key Findings
- <non-obvious things learned that aren't captured in code or memory>
### Next Steps
1. <most immediate next action>
2. <follow-up tasks>
### Git Workflow
- Push: `git push <remote> <branch>`
- Commit prefix: <convention if applicable>
```
Guidelines for the prompt:
Self-check before outputting: Re-read the prompt and ask: "If I were a fresh session reading only this plus the project's CLAUDE.md, could I immediately resume productive work?" If not, add the missing context.
session-handoff plugin:
~/.claude/data/session-handoff/logs/handoff-<YYYY-MM-DDTHH-MM-SS>.md
Create the directory with mkdir -p if it doesn't exist.The handoff captures what's ephemeral — everything else is already persistent.
From Anthropic's session management guide, context rot occurs as the context window fills — "performance degrades because attention spreads across more tokens and older irrelevant content becomes distracting." The five decision points at each turn are: Continue, Rewind, Clear, Compact, or Subagents. This skill implements Clear with a structured brief.
Signs you should run /session-handoff soon:
/clear and write a better initial prompt")Alternative to handoff — when to use other tools instead:
/compact — if you want to keep going in the same session but trim noise. Lower effort but Claude decides what matters, and bad compacts happen when "the model can't predict the direction your work is going."/rewind — if you want to jump back and retry from a clean point, not start a new session.--continue or --resume — if you want to resume the same conversation across terminal sessions without a fresh context.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub neurot1cal/bdigital-public --plugin session-handoff