load-handoff
Skill4 starsChanged 5 months agoMITView on GitHub
Reconstruct the full context of a previous session from a HANDOFF.md file and report any drift between the handoff and the current repo state (moved files, committed changes, branch switches). Use when the user asks to resume/reconstruct/reload a previous session from a handoff — "load handoff", "resume session", "pick up where we left off", or a fresh session that needs the prior context restored. NOT for: writing/dumping the handoff (that is the write side, /swe-skills:handoff).
In this repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analytics-cleanerSkill
- apply-review-feedbackSkill
- architect-designSkill
- battle-tested-patternsSkill
- code-deletionSkill
- code-simplifierSkill
- consensus-boardSkill
- context-implementSkill
- deep-reviewSkill
- deliberate-thinkingSkill
- design-brainstormSkill
- exhaustive-testingSkill
- generate-docsSkill
- handoffSkill
- meticulous-code-reviewSkill
- optimizeSkill
- refactorSkill
- reflectSkill
- regression-safety-netSkill
- scope-creep-preventionSkill
- senior-reviewSkill
- ship-featureSkill
- subagent-buildSkill
- systematic-debuggingSkill
- test-first-developmentSkill
- verification-before-completionSkill
- verify-claimsSkill
- write-plansSkill
- write-promptSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
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 24
Expected result: after running this skill, you (Claude) must know:
- Distinctive: line 54
If it does NOT exist, stop and answer the user:
- Very specific: line 66
Use the Read tool on docs/ai-context/HANDOFF.md.
- Very specific: line 72
Verify it exists (Glob or Read).
- Distinctive: line 73
If the handoff claims it has certain content relevant to the next step, read it and confirm it matches.
- Distinctive: line 74
If there are discrepancies (file deleted, moved, different content), DOCUMENT them before continuing.
- Distinctive: line 78
If the handoff included a "Git Context" section, check for drift:
- Distinctive: line 98
NEVER execute the "next step" automatically: Ask the user:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prerequisite: Read
CLAUDE.mdfirst (if present). Confirm with "📋 CLAUDE.md read ✓" File to load:docs/ai-context/HANDOFF.md(produced by the write side,/swe-skills:handoff) Language of the summary to the user: your project's working language.
📥 LOADING CONTEXT FROM A PREVIOUS SESSION
🎯 PURPOSE
This session starts WITH NO context. Your job is to reconstruct the mental state of the previous session by reading HANDOFF.md and leave the user ready to continue the task without having to re-explain anything to you.
Expected result: after running this skill, you (Claude) must know:
- What was being done and why
- What technical decisions were made and their rationale
- What approaches failed (so you do NOT repeat them)
- What the concrete next step is
- What project warnings/gotchas you must respect
⛔ ANTI-PATTERNS (DO NOT DO THIS)
| Anti-pattern | Why it's forbidden |
| Starting to execute the "next step" without the user confirming | The handoff may be outdated or the user may have changed priorities |
| Summarizing the handoff while omitting technical decisions or warnings | The user needs to see that you UNDERSTAND, not just that you READ |
| Assuming the repo state is identical to the handoff's | The user may have committed/moved files between sessions |
| Inventing context that is NOT in the handoff | If something is missing, ASK the user, don't fill in gaps |
| Skipping verification of the key files mentioned | Paths may have changed or files may have been moved |
📋 LOADING PROTOCOL
Step 1: VERIFY THE HANDOFF EXISTS
# Pre-check
ls docs/ai-context/HANDOFF.mdIf it does NOT exist, stop and answer the user:
❌ I can't find docs/ai-context/HANDOFF.md
Options:
1. Tell me the path where the handoff is
2. If there's no previous handoff, tell me what you want to work on this sessionStep 2: READ THE FULL HANDOFF
Use the Read tool on docs/ai-context/HANDOFF.md. Read it WHOLE, not in parts. It is the single source of truth for this session.
Step 3: VERIFY THE KEY FILES MENTIONED
For each file listed in the handoff's "Files modified" section:
- Verify it exists (
GloborRead). - If the handoff claims it has certain content relevant to the next step, read it and confirm it matches.
- If there are discrepancies (file deleted, moved, different content), DOCUMENT them before continuing.
Step 4: VERIFY GIT STATE (if the handoff mentions it)
If the handoff included a "Git Context" section, check for drift:
git branch --show-current
git status --short
git log --oneline -3Compare with what the handoff said. If the user has committed or switched branches since then, REPORT the change.
Step 5: SUMMARIZE TO THE USER WHAT YOU UNDERSTOOD
Return a structured summary (format below) that demonstrates you:
- Know what was being done
- Understand the technical decisions and the failed approaches
- Have detected any drift between the handoff and the current state
- Are clear on the next step
Step 6: WAIT FOR CONFIRMATION BEFORE ACTING
NEVER execute the "next step" automatically. Ask the user:
Should I continue with the next step described in the handoff, or has something changed since then?
📊 FORMAT OF THE SUMMARY TO THE USER
## 📥 Context Restored from HANDOFF.md
**Generated:** <handoff date>
**Previous session lasted:** <if inferable from the handoff>
**Declared status:** <COMPLETED / IN PROGRESS / BLOCKED>
---
### 🎯 What was being done
<1-2 sentences — goal of the previous session>
### 🧠 Why it was being done
<motivation / the user's original request>
### ✅ What was completed
- <point 1>
- <point 2>
### 🚧 What was left half-done
- **Task:** <description>
- **How far it got:** <exact point: file + function>
- **What's concretely missing:** <remaining steps>
### 🛑 Approaches that FAILED (I won't repeat)
- <failed attempt 1>: <root cause>
- <failed attempt 2>: <root cause>
### 🔑 Key technical decisions I'll respect
- <decision 1>: <summarized rationale>
- <decision 2>: <summarized rationale>
### ⚠️ Project warnings I'll keep in mind
- <warning 1>
- <warning 2>
### 📂 Key files (verified)
- `<path>` — <what it's for> — <status: exists / moved / discrepancy>
### 🔍 Drift detected vs handoff (if applicable)
<only if you found differences between the handoff and the current repo state>
- <file X was MODIFIED in the handoff but now appears committed>
- <branch changed from Y to Z>
- ...
### ❓ Open questions the previous session left
- <question 1>
- <question 2>
---
### 🚀 Proposed next step
According to the handoff, the concrete next step is:
> <verbatim copy of the handoff's next step>
**Should I continue with that step, or has the context changed since the previous session?**✅ CHECKLIST BEFORE RESPONDING
- I've read the WHOLE HANDOFF.md (not fragments)
- I've verified the key files mentioned exist
- I've reported any git/file drift detected
- I've summarized technical decisions AND failed approaches (not just "what was done")
- I've listed the project warnings I'm going to respect
- I have NOT executed the next step — I've waited for confirmation
- The summary is in the project's working language
- If critical info was missing, I said so and asked the user for clarification
🚧 EDGE CASES
The handoff exists but is incomplete
Tell the user which sections are missing or empty. Ask for the minimum information needed to continue.
The handoff is stale (>7 days or a large number of commits since then)
Warn the user with git log --since="<handoff date>" --oneline and ask whether they want to continue with the original plan or redefine it.
Conflict between the handoff and the current state
Report the conflict EXPLICITLY. Don't assume which prevails — let the user decide.
The user says "continue" with nothing else
Proceed with the handoff's next step, but confirm the concrete action in the first tool call before modifying anything.
Proceeding to load docs/ai-context/HANDOFF.md...
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.

