From base
Generates YAML or Markdown summaries of conversation context, learnings, approaches, and git state for handoff to new threads or agents. Triggered by /handoff-context or phrases like 'handoff', 'new thread'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/base:handoff-contextThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generates structured context summaries for seamless thread continuation.
README.mdassets/eval-context-preservation.jsonassets/eval-continuation.jsonassets/eval-negative-cases.jsonassets/eval-non-git-repo.jsonassets/eval-targeted-handoff.jsonhandoff-context-config.example.ymlreferences/examples-detailed.mdreferences/examples.mdreferences/patterns.mdreferences/templates.mdreferences/workflow.mdscripts/capture-context.shscripts/validate-context.shGenerates structured context summaries for seamless thread continuation.
Direct invocation (most reliable):
/handoff-context
Natural language trigger phrases:
Note: The slash command works reliably across all agents. Natural language triggers depend on each agent's semantic understanding.
The handoff-context skill looks for configuration in the following order (highest to lowest priority):
| Priority | Location | Scope | Use Case |
|---|---|---|---|
| 1 | ~/.config/agents/handoff-context-config.yml | Cross-tool | Amp, other AI tools |
| 2 | ~/.claude/handoff-context-config.yml | Claude Code | Claude Code specific |
| 3 | .agents/handoff-context-config.yml | Project-local | Per-project overrides |
| 4 | Built-in defaults | Fallback | Ships with plugin |
Copy the example config to your preferred location:
# Cross-tool location (recommended for multi-tool users)
mkdir -p ~/.config/agents
cp ~/.claude/plugins/base/skills/handoff-context/handoff-context-config.example.yml \
~/.config/agents/handoff-context-config.yml
# Claude Code specific
cp ~/.claude/plugins/base/skills/handoff-context/handoff-context-config.example.yml \
~/.claude/handoff-context-config.yml
# Project-local
mkdir -p .agents
cp ~/.claude/plugins/base/skills/handoff-context/handoff-context-config.example.yml \
.agents/handoff-context-config.yml
| Option | Type | Default | Description |
|---|---|---|---|
format | string | yaml | Output format: yaml or markdown |
include.learnings | boolean | true | Include learnings section |
include.approaches | boolean | true | Include approaches section (what worked/didn't) |
include.git_state | boolean | true | Include git state (branch, files) |
include.quick_start | boolean | true | Include quick_start section |
confidence.minimum | float | 0.3 | Minimum confidence score floor |
confidence.threshold | float | 0.7 | Warning threshold for low quality |
# ~/.config/agents/handoff-context-config.yml
# Output format
format: yaml # yaml | markdown
# Include optional sections
include:
learnings: true
approaches: true
git_state: true
quick_start: true
# Confidence scoring thresholds
confidence:
minimum: 0.3 # Floor score (0.3 = tentative, still some value)
threshold: 0.7 # Warning threshold (below = add more context)
Each handoff file includes metadata about which config was used:
metadata:
config:
source: "/home/user/.config/agents/handoff-context-config.yml"
format: "yaml"
Handoff files respect the following temp directory priority:
| Environment | Priority | Default Path |
|---|---|---|
| Claude Code | CLAUDE_CODE_TMPDIR (1st) | /tmp/claude/handoff-XXX/ |
| Amp, Droid, others | TMPDIR (2nd) | System temp (e.g., /var/folders/.../T/ on macOS) |
| Fallback | /tmp (3rd) | /tmp/handoff-XXX/ |
Why this priority? Claude Code's sandbox denies direct /tmp/ writes but allows writes to CLAUDE_CODE_TMPDIR (default: /tmp/claude). Other tools respect the standard TMPDIR environment variable.
Typical paths by tool:
/tmp/claude/handoff-a1b2c3/handoff-20260111-143022.yaml/var/folders/xx/.../T/handoff-d4e5f6/handoff-20260111-143022.yaml/tmp/handoff-g7h8i9/handoff-20260111-143022.yaml| Method | Reliability | Output |
|---|---|---|
/handoff-context | ✅ 100% | YAML file + structured display |
| "Let's handoff" | ⚠️ Variable | May produce text-only or .txt file |
Recommendation: Use /handoff-context for consistent cross-agent behavior.
When this skill is triggered, you MUST follow these steps exactly:
# Find script in plugin cache (works across different directories)
# Alternative locations: ~/.claude/plugins, ~/.agent/skills
bash $(find ~/.claude/plugins -name "capture-context.sh" 2>/dev/null | head -1)
Capture the HANDOFF_FILE path from script output (format: HANDOFF_FILE=/tmp/...)
Read that file and populate conversation context:
Overwrite the same file with complete context
Display summary to user with file path
⚠️ CRITICAL REQUIREMENTS:
What the script captures:
What you need to add:
Result: Complete /tmp/handoff-XXX/handoff-YYYYMMDD-HHMMSS.yaml with full context.
Before completing handoff, verify:
If any criteria fails: Re-invoke with /handoff-context slash command.
| Confidence Score | Quality Level | Recommendation |
|---|---|---|
| ≥ 0.9 | Comprehensive | Ready for immediate continuation |
| 0.7 - 0.9 | Good | Acceptable, minor gaps possible |
| 0.5 - 0.7 | Acceptable | Consider adding more context |
| < 0.5 | Needs Work | Add more context before handoff |
| Category | Details |
|---|---|
| Session | Unique ID, timestamps, duration (calculated by agent) |
| Metadata | Confidence score (0.3-0.95), quality level, missing context flags |
| Quick Start | Project type, package manager, priority files, estimated time |
| Git State | Branch, staged/unstaged/untracked files |
| Conversation | Phase summaries, outcomes, decisions |
| Current Work | Active tasks with status and affected files |
| Learnings | Patterns discovered, debugging techniques, confidence levels |
| Approaches | What worked, what didn't, what's left to try |
| Next Steps | Continuation action (if specified) |
| Preserved Context | Key decisions and important details |
🔄 Handoff ready
Context written to: /tmp/handoff-20260126-143022.yaml
To continue in a new thread:
1. Start a new AI agent conversation
2. Tell the agent: "Continue from /tmp/handoff-20260126-143022.yaml"
Continuation: "Handoff and build an admin panel" → action extracted Preservation: "Handoff this context" → full state saved Targeted: "Handoff to code-reviewer" → specific agent
Quick reference: See examples.md - 4 concrete scenarios:
| File | Purpose |
|---|---|
| references/patterns.md | All trigger patterns and regex matching rules |
| references/workflow.md | Complete step-by-step workflow manual |
| references/examples.md | Quick reference scenarios |
| references/templates.md | YAML template structures |
Test files for validating skill behavior:
Run evaluations to verify pattern detection, YAML generation, and failure handling.
| Scenario | Handling |
|---|---|
| Script not found | Follow manual workflow in references/workflow.md |
| Script execution fails | Fall back to manual workflow steps |
| No git repo | Script omits git_state, proceeds with conversation context |
| No action | Script sets continuation_action: null |
| Empty conversation | Script provides minimal context with working directory |
See references/workflow.md for complete manual workflow and error scenarios.
Works with:
Seamless continuation without losing context.
No buttons to click, no commands to remember—just say "handoff" and continue working.
/tmp/ may be cleared on system rebootUse when transitioning to a fresh thread. Skip when the conversation is still manageable.
npx claudepluginhub shrwnsan/vibekit-claude-plugins --plugin baseCompacts the current conversation into a handoff document so a fresh agent can continue the work in a new session. Preserves decisions, state, and context before it is lost.
Generates a portable markdown handoff document capturing session state, decisions, and next steps for continuation by another agent or session.
Compacts a conversation into a handoff document for another agent to continue the work without rederiving context. Useful when ending a session or starting fresh.