claude-session-handoff
Skill5 starsChanged 8 months agoMITView on GitHub
Recover working context from a prior Claude Code session by reading its JSONL conversation log and turning it into a clean handoff for Codex or another agent. Use when the user wants Codex to continue where Claude left off in the same repo, asks you to get up to speed on previous work, wants to resume a Claude thread after an interruption or outage, or needs help finding and summarizing the relevant file in ~/.claude/projects/.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Hexi1997/skillstheir own version, first seen Nov 7, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Hexi1997/skills★ 1same name
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 repository9 other files it gives its agents.
- agent-commsSkill
- alexa-cliSkill
- app-screenshotsSkill
- branch-sessionSkill
- deep-diveSkill
- project-spawnSkill
- skill-refactoringSkill
- todoist-cliSkill
- transcribe-and-analyzeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 13 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Default to the current project path unless the user gives a specific JSONL file.
- Distinctive: line 18
Run the helper script:
- Distinctive: line 36
Start with the current repo and the newest top-level session.
- Very specific: line 37
If the user implies "today", resolve that to the exact local date and pass --date YYYY-MM-DD.
- Distinctive: line 38
Read the last meaningful turns first.
- Very specific: line 39
Use --list when multiple Claude sessions exist for the same project and you want the candidate set before choosing one.
- Very specific: line 40
Use --recent when the repo moved and the stored cwd no longer matches the current path.
- Distinctive: line 49
Treat images as context markers, not text that needs verbatim transcription.
- Distinctive: line 51
Default to the most recent meaningful turns only.
- Distinctive: line 53
If the session is large and the user wants a specific earlier point, ask for one anchor only:
- Very specific: line 59
Prefer phrase matching over line numbers.
- Distinctive: line 71
Call out failures explicitly.
- Distinctive: line 77
Check whether the repo exists and whether it is a git repository
- Distinctive: line 79
Run git status --short when git is present
- Distinctive: line 80
Read the touched files or run targeted verification when the session claims code was written
- Distinctive: line 82
If the workspace is empty or unchanged, say that explicitly.
- Distinctive: line 95
If you used an anchor phrase, also include the matched timestamp and make clear that the summary starts from that point rather than from …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Claude Session Handoff
Recover the state of a prior Claude Code session, then confirm what actually exists in the current workspace before continuing.
Workflow
1. Find the right session
Default to the current project path unless the user gives a specific JSONL file.
For the common handoff case, do not search every Claude transcript first. Bias toward the current repo, the most recent top-level session, and recent activity.
Run the helper script:
python3 scripts/claude_session_handoff.py --project-path "$PWD"Useful variants:
python3 scripts/claude_session_handoff.py --project-path "$PWD" --list
python3 scripts/claude_session_handoff.py --project-path "$PWD" --date YYYY-MM-DD
python3 scripts/claude_session_handoff.py --session /path/to/session.jsonl
python3 scripts/claude_session_handoff.py --recent 10
python3 scripts/claude_session_handoff.py --project-path "$PWD" --date YYYY-MM-DD --contains "anchor phrase" --from-matchUse these defaults:
- Start with the current repo and the newest top-level session.
- If the user implies "today", resolve that to the exact local date and pass
--date YYYY-MM-DD. - Read the last meaningful turns first. Do not read the entire transcript by default.
- Use
--listwhen multiple Claude sessions exist for the same project and you want the candidate set before choosing one. - Use
--recentwhen the repo moved and the storedcwdno longer matches the current path.
2. Read only the meaningful turns
The helper script already filters the noisy parts, but keep these rules in mind:
- Ignore
subagents/files unless the user explicitly wants delegated-session context. - Ignore local-command pseudo-messages such as
<local-command-caveat>,<command-name>, and<local-command-stdout>. - Ignore assistant messages that are only
[thinking]or other non-user-visible placeholders. - Treat images as context markers, not text that needs verbatim transcription.
Default to the most recent meaningful turns only. Large transcripts should be narrowed before you read deeply.
If the session is large and the user wants a specific earlier point, ask for one anchor only:
- a distinctive phrase
- a short quoted line
- an approximate time
Prefer phrase matching over line numbers. Use --contains "anchor phrase" --from-match to jump to the relevant point without reading the full transcript.
3. Reconstruct the handoff
Summarize the session in this order:
- The user's original goal
- The options, decisions, or constraints already discussed
- What actually happened in the session
- What did not happen yet
- The exact next step
Call out failures explicitly. If the session ended on an API error, tool error, overload, or interrupted command, say so instead of implying the work completed.
4. Verify the workspace separately
A Claude session log tells you conversation state, not code state. Confirm the actual workspace before continuing:
- Check whether the repo exists and whether it is a git repository
- Inspect the file tree with
lsorrg --files - Run
git status --shortwhen git is present - Read the touched files or run targeted verification when the session claims code was written
If the workspace is empty or unchanged, say that explicitly. Do not infer implementation from discussion alone.
For interrupted-session recovery, assume the last discussed change may not have landed until you verify it in the workspace.
5. Report back concisely
Your handoff should usually include:
- The selected session file
- Whether the prior session was exploratory or implementation-focused
- Whether any code or files exist in the current workspace
- The unresolved next step
If you used an anchor phrase, also include the matched timestamp and make clear that the summary starts from that point rather than from the beginning of the session.
Resources
scripts/
claude_session_handoff.py: Find relevant Claude Code session files, filter meaningful user and assistant turns, and print a compact handoff-oriented summary
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.

