session-handoff
Skill2 starsChanged 5 months agoMITView on GitHub
Creates comprehensive handoff documents for seamless AI agent session transfers. Triggered when: (1) user requests handoff/memory/context save, (2) context window approaches capacity, (3) major task milestone completed, (4) work session ending, (5) user says 'save state', 'create handoff', 'I need to pause', 'context is getting full', (6) resuming work with 'load handoff', 'resume from', 'continue where we left off'. Proactively suggests handoffs after substantial work (multiple file edits, complex debugging, architecture decisions). Solves long-running agent context exhaustion by enabling fresh agents to continue with zero ambiguity. Do NOT trigger on an ordinary same-conversation "keep going" or "continue" when no handoff file exists or is referenced and the current agent can just proceed.
164 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- OpenAgentsInc/openagentstheir own version, first seen Nov 29, 2026
- anivar/agentic-sdlctheir own version, first seen Nov 29, 2026
- mikejhill/agent-skillstheir own version, first seen Nov 29, 2026
- weiweimhy/agent-skillstheir own version, first seen Nov 29, 2026
- exerias21/brainstorm-toolkittheir own version, first seen Nov 29, 2026
- jamesctucker/morainetheir own version, first seen Nov 29, 2026
Used with
Projects with it also use ascii-diagram, research-fleet and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SethGammonSkillascii-diagram
Generate perfectly aligned ASCII diagrams — architecture, flow, sequence, box-and-arrow. Uses a programmatic character-grid approach so alignment is guaranteed by math, not token prediction. Includes post-render verification.
Also in 4 projects that use this
SethGammonSkillresearch-fleet
Parallel research using Fleet wave mechanics. Spawns multiple scout agents, each investigating a different angle of the same question. Findings are compressed between waves. Produces a unified research brief from multiple independent perspectives.
Also in 3 projects that use this
ferocknewSkilldoc-reader
当用户要求"读取 Word 文档"、"解析 DOCX 文件"、"将 Word 转换为 Markdown"、"提取文档内容"、"读取 docx"时,或者需要在 JavaScript/Node.js 环境中读取 Microsoft Word 文档(.docx)并转换为 Markdown、HTML 或纯文本格式时使用此 skill。
Also in 3 projects that use this
vicoa-aiSkilllive-preview
Start a local app in the current user project, expose it through a tunnel, and return preview details in structured Markdown. Use when the user asks for a preview URL, public URL, shareable localhost, mobile/web preview, or tunnel setup.
Also in 4 projects that use this
mcabreradevSkillbug-diagnosis
Use when something is broken, failing or intermittent. Diagnose before fixing: a command that goes red on this bug first, then falsifiable hypotheses.
Also in 4 projects that use this
botlearn-aiSkilldoc-gen
Also in 4 projects that use this
Other versions164 projects use a version of this.
Word for word · 0
None found.
Edited · 6
- wpank/ai★ 1144% same
- christianmz565/skills★ 194% same
- imMamdouhaboammar/kaku-chatgpt-harness★ 095% same
- Ivan-propio/claude-skills★ 095% same
- nbirkner/digital-brain★ 088% same
- Samueladewole/claude-skills★ 095% same
Wrote their own version · 158
- rohitg00/pro-workflow★ 2.9ksame name
- SethGammon/Citadel★ 927same name
- wanshuiyin/HERO-Anti-OverDefense★ 925same name
- OpenAgentsInc/openagents★ 469same name
- OneWave-AI/claude-skills★ 378same name
- ai-analyst-lab/ai-analyst★ 304same name
- entireio/skills★ 240same name
- Innei/SKILL★ 93same name
- yuzushi-dev/session-handoff★ 67same name
- Hive-Academy/ptah-extension★ 35same name
148 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- find-skillsSkill
- skill-creatorSkill
- anti-sycophancySkill
- clear-and-shortSkill
- coding-standardsSkill
- convert-plan-to-featureSkill
- dead-code-removalSkill
- delegation-promptSkill
- document-generateSkill
- execute-changeSkill
- live-app-security-auditSkill
- new-featureSkill
- plan-eng-reviewSkill
- pr-review-requestSkill
- pr-reviewSkill
- repo-change-summarySkill
- security-vulnerability-scanSkill
- session-cleanupSkill
- sonar-issue-checkSkill
- sonar-issue-fixSkill
- systematic-debuggingSkill
- trim-initial-bundleSkill
- unslopSkill
- update-dependenciesSkill
- verify-frontend-changeSkill
- verify-implementationSkill
- windows-disk-cleanupSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 17 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 140 edited versions we read keep these.
17
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Follow: CREATE Workflow below
- Distinctive: line 29
Follow: RESUME Workflow below
- Distinctive: line 31
Proactive suggestion?: After substantial work (5+ file edits, complex debugging, major decisions) or when the conversation has grown very …
- Distinctive: line 38
Run the smart scaffold script to create a pre-filled handoff document:
- Very specific: line 60
Create .claude/handoffs/ directory if needed
- Distinctive: line 63
Add handoff chain links if continuing from previous
- Distinctive: line 75
Use the template structure in references/handoff-template.md for guidance.
- Distinctive: line 79
Run the validation script to check completeness and security:
- Distinctive: line 118
Before loading, check how current the handoff is:
- Distinctive: line 127
STALE: Verify context carefully before resuming
- Very specific: line 128
VERY_STALE: Consider creating a fresh handoff
- Distinctive: line 139
Read the relevant handoff document completely before taking any action.
- Distinctive: line 141
If handoff is part of a chain (has "Continues from" link), also read the linked previous handoff for full context.
- Distinctive: line 145
Follow the checklist in references/resume-checklist.md:
- Distinctive: line 147
Verify project directory and git branch match
- Distinctive: line 148
Check if blockers have been resolved
- Distinctive: line 155
Start with "Immediate Next Steps" item #1 from the handoff document.
- Distinctive: line 166
Add new discoveries to relevant sections
- Distinctive: line 186
When resuming from a chain, read the most recent handoff first, then reference predecessors as needed.
“Common” is measured: kept by at least 6 in 10 of the 140 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Handoff
Creates comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves the long-running agent context exhaustion problem.
Mode Selection
Determine which mode applies:
Creating a handoff? User wants to save current state, pause work, or context is getting full.
- Follow: CREATE Workflow below
Resuming from a handoff? User wants to continue previous work, load context, or mentions an existing handoff.
- Follow: RESUME Workflow below
Proactive suggestion? After substantial work (5+ file edits, complex debugging, major decisions) or when the conversation has grown very long / context feels constrained, suggest:
"We've made significant progress. Consider creating a handoff document to preserve this context for future sessions. Say 'create handoff' when ready."
CREATE Workflow
Step 1: Generate Scaffold
Run the smart scaffold script to create a pre-filled handoff document:
python "${CLAUDE_SKILL_DIR}/scripts/create_handoff.py" [task-slug]Example: python "${CLAUDE_SKILL_DIR}/scripts/create_handoff.py" implementing-user-auth
For continuation handoffs (linking to previous work):
python "${CLAUDE_SKILL_DIR}/scripts/create_handoff.py" "auth-part-2" --continues-from 2024-01-15-auth.mdThe scripts live in the installed skill directory, not in the user's project, so
always invoke them through ${CLAUDE_SKILL_DIR} — a bare scripts/… path
resolves against the session's working directory and will not be found. Run them
from the project directory: they read the project's git state and write into the
project's .claude/handoffs/. On a Windows machine where python is not on
PATH, use the launcher instead — py -3 "${CLAUDE_SKILL_DIR}/scripts/…" — for
every command below.
The script will:
- Create
.claude/handoffs/directory if needed - Generate timestamped filename
- Pre-fill: timestamp, project path, git branch, recent commits, modified files
- Add handoff chain links if continuing from previous
- Output file path for editing
Step 2: Complete the Handoff Document
Open the generated file and fill in all [TODO: ...] sections. Prioritize these sections:
- Current State Summary - What's happening right now
- Important Context - Critical info the next agent MUST know
- Immediate Next Steps - Clear, actionable first steps
- Decisions Made - Choices with rationale (not just outcomes)
Use the template structure in references/handoff-template.md for guidance.
Step 3: Validate the Handoff
Run the validation script to check completeness and security:
python "${CLAUDE_SKILL_DIR}/scripts/validate_handoff.py" <handoff-file>The validator checks:
- No
[TODO: ...]placeholders remaining - Required sections present and populated
- No potential secrets detected (API keys, passwords, tokens)
- Referenced files exist
- Quality score (0-100)
Do not finalize a handoff with secrets detected or score below 70.
Step 4: Confirm Handoff
Report to user:
- Handoff file location
- Validation score and any warnings
- Summary of captured context
- First action item for next session
RESUME Workflow
Step 1: Find Available Handoffs
Skip this step if the user already named the specific handoff file; go directly to Step 2 (check_staleness.py on the named file).
List handoffs in the current project:
python "${CLAUDE_SKILL_DIR}/scripts/list_handoffs.py"This shows all handoffs with dates, titles, and completion status.
Step 2: Check Staleness
Before loading, check how current the handoff is:
python "${CLAUDE_SKILL_DIR}/scripts/check_staleness.py" <handoff-file>Staleness levels:
- FRESH: Safe to resume - minimal changes since handoff
- SLIGHTLY_STALE: Review changes, then resume
- STALE: Verify context carefully before resuming
- VERY_STALE: Consider creating a fresh handoff
The script checks:
- Time since handoff was created
- Git commits since handoff
- Files changed since handoff
- Branch divergence
- Missing referenced files
Step 3: Load the Handoff
Read the relevant handoff document completely before taking any action.
If handoff is part of a chain (has "Continues from" link), also read the linked previous handoff for full context.
Step 4: Verify Context
Follow the checklist in references/resume-checklist.md:
- Verify project directory and git branch match
- Check if blockers have been resolved
- Validate assumptions still hold
- Review modified files for conflicts
- Check environment state
Step 5: Begin Work
Start with "Immediate Next Steps" item #1 from the handoff document.
Reference these sections as you work:
- "Critical Files" for important locations
- "Key Patterns Discovered" for conventions to follow
- "Potential Gotchas" to avoid known issues
Step 6: Update or Chain Handoffs
As you work:
- Mark completed items in "Pending Work"
- Add new discoveries to relevant sections
- For long sessions: create a new handoff with
--continues-fromto chain them
Handoff Chaining
For long-running projects, chain handoffs together to maintain context lineage:
handoff-1.md (initial work)
↓
handoff-2.md --continues-from handoff-1.md
↓
handoff-3.md --continues-from handoff-2.mdEach handoff in the chain:
- Links to its predecessor
- Can mark older handoffs as superseded
- Provides context breadcrumbs for new agents
When resuming from a chain, read the most recent handoff first, then reference predecessors as needed.
Storage Location
Handoffs are stored in: .claude/handoffs/
Naming convention: YYYY-MM-DD-HHMMSS-[slug].md
Example: 2024-01-15-143022-implementing-auth.md
Resources
scripts/
Invoke each as python "${CLAUDE_SKILL_DIR}/scripts/<name>" (or py -3 … where
python is not on PATH). Python 3.9+, standard library only.
| Script | Purpose |
create_handoff.py [slug] [--continues-from <file>] | Generate new handoff with smart scaffolding |
list_handoffs.py [path] | List available handoffs in a project |
validate_handoff.py <file> | Check completeness, quality, and security |
check_staleness.py <file> | Assess if handoff context is still current |
references/
- handoff-template.md - Complete template structure with guidance
- resume-checklist.md - Verification checklist for resuming agents
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

