restore
Skill1 starsChanged 6 months agoMITView on GitHub
Re-hydrate a Claude Code session from a /checkpoint. Reads ~/.claude/.checkpoint/, recreates the TaskList, resumes paused loops via /loop-resume, prints the handoff note + dirty-git-tree summary. Use as the first command after relaunching Claude Code if you ran /checkpoint before exiting.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- Leineder/ainonymize-claudetheir own version, first seen Oct 25, 2026
- ARCASSystems/FounderOStheir own version, first seen Oct 24, 2026
- arm092/autoharness-codextheir own version, first seen Oct 15, 2026
- OthmanAdi/haircuttheir own version, first seen Sep 13, 2026
- maxwellsdm1867/wheelertheir own version, first seen Aug 8, 2026
- redareda9/ghostty-resurrecttheir own version, first seen Jun 19, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- sanghun0724/cmux-claude-skills★ 33same name
- maxwellsdm1867/wheeler★ 12same name
- ThisisYoYoDev/claude-rag★ 9same name
- redareda9/ghostty-resurrect★ 8same name
- ARCASSystems/FounderOS★ 7same name
- nikosdion/devskills★ 4same name
- arm092/autoharness-codex★ 1same name
- OthmanAdi/haircut★ 1same name
- Leineder/ainonymize-claude★ 0same 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 repository16 other files it gives its agents.
- audit-unused-depSkill
- checkpointSkill
- double-checkSkill
- file-adrSkill
- fleetSkill
- fmt-sweepSkill
- forge-mirror-scaffoldSkill
- forgeSkill
- gemini-pullSkill
- loop-from-taskSkill
- loop-healthSkill
- loop-onSkill
- loopSkill
- loopsSkill
- regression-guardSkill
- workspace-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 7 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
Before rehydrating session state, refresh the toolkit itself so this session uses the latest skills.
- Very specific: line 33
If the first hit is under /tmp, treat it as WRONG-HOME: /tmp is noexec + volatile on hardened hosts (./update.sh fails with "permission …
- Distinctive: line 47
If already up to date: silent, no output.
- Very specific: line 48
If anything changed: show one-line "claude-tools updated: <N> commits, <M> skills" message.
- Very specific: line 50
If update.sh exits nonzero: log a one-line warning, continue restore with old version.
- Distinctive: line 52
If working tree is dirty: skip the update with a one-line note ("repo has local changes, skipped auto-update").
- Distinctive: line 56
After update succeeds, note that newly-installed skills are NOT loaded into THIS session — Claude Code only loads skills at session start.
- Very specific: line 64
If $HOME/.claude/.checkpoint/MANIFEST.json is missing or .checkpoint/ directory is absent: tell user "no checkpoint to restore." Stop.
- Very specific: line 97
Pass 1 — create + status: Keep a map oldId -> newId.
- Distinctive: line 136
If any step failed (e.g. TaskCreate errored), KEEP the checkpoint files for the failed entries so the user can retry.
- Distinctive: line 166
Don't re-execute task descriptions as commands.
- Distinctive: line 169
Don't auto-commit anything.
- Distinctive: line 170
Don't try to re-launch background processes.
“Common” is measured: kept by at least 6 in 10 of the 8 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
/restore — re-hydrate session state from a /checkpoint
When to run this
First command of a new Claude Code session, after the previous
session ended with /checkpoint. If there's no checkpoint on disk,
this skill tells you so and stops — no harm.
Steps
State directory: $HOME/.claude/.checkpoint/.
0. Auto-update claude-tools (added 2026-05-17)
Before rehydrating session state, refresh the toolkit itself so this
session uses the latest skills. Look for a cloned claude-tools
repo at these paths in order:
$HOME/Development/claude-tools
$HOME/claude-tools
$HOME/projects/claude-tools
$HOME/git/claude-tools
$HOME/code/claude-tools
/tmp/claude-toolsIf the first hit is under /tmp, treat it as WRONG-HOME: /tmp is
noexec + volatile on hardened hosts (./update.sh fails with
"permission denied" despite correct exec bits — run via sh and
re-clone to ~/Development/claude-tools).
For the first hit (verify with git remote get-url origin | grep
claude-tools), if the working tree is clean:
cd "$REPO"
./update.sh --quiet -fBehavior:
- If already up to date: silent, no output.
- If anything changed: show one-line "claude-tools updated:
<N>commits,<M>skills" message. Continue with restore. - If
update.shexits nonzero: log a one-line warning, continue restore with old version. Don't block rehydration on a network blip. - If working tree is dirty: skip the update with a one-line note ("repo has local changes, skipped auto-update"). The user can manually clean up later.
After update succeeds, note that newly-installed skills are NOT loaded into THIS session — Claude Code only loads skills at session start. If the update brought in new skill names, the user needs to relaunch Claude Code again to use them. Surface this explicitly: "auto-updated; restart Claude Code to load new skills X, Y."
1. Verify a checkpoint exists
If $HOME/.claude/.checkpoint/MANIFEST.json is missing or
.checkpoint/ directory is absent: tell user "no checkpoint to
restore." Stop.
2. Read the manifest
Parse it. Show the user a one-line summary of what's coming:
Restoring checkpoint from 2026-05-17T07:50:00Z:
3 tasks · 1 paused loop · 1 dirty git tree3. Show the handoff note
Display $HOME/.claude/.checkpoint/handoff.md verbatim to the user.
This is "what we were doing." Lets them sanity-check before
re-hydrating.
4. Re-create the tasks (rebuild the full UI task list)
/clear and exit wipe the in-flight TaskList from the UI. This step
puts it back — every task, with descriptions, status, AND the
blocked/blocked-by graph. Do it in two passes so dependencies
survive the ID renumbering.
Each tasks.json entry may carry: id (the OLD session id),
subject, description, activeForm, status, blockedBy (a list
of OLD ids). Resolve each task's body with a fallback chain:
description → else note (older checkpoints used note) → else
reuse subject. TaskCreate REQUIRES a non-empty description, so
never pass an empty one — the subject is always a valid last resort.
Pass 1 — create + status. Keep a map oldId -> newId. For each
entry: TaskCreate { subject, description (resolved via the fallback
chain above), activeForm };
capture the new id from the result; record map[entry.id] = newId.
Then TaskUpdate { taskId: newId, status } to match the checkpoint
(pending / in_progress / completed).
Pass 2 — re-link dependencies. For each entry that has a
blockedBy list, translate every old id through the map and call
TaskUpdate { taskId: map[entry.id], addBlockedBy: [map[o] for o in entry.blockedBy if o in map] }.
Log (don't fail on) any old id missing from the map. This restores
the dependency graph, not just a flat list.
New ids will differ from the old session's — that's expected and fine; the map keeps the graph intact.
5. Resume paused loops
Invoke the /loop-resume skill via the Skill tool. It reads
.paused-loops.json (which /checkpoint already populated via
/loop-pause) and CronCreates each.
6. Show background-process losses
Cat $HOME/.claude/.checkpoint/processes.txt. If non-empty: tell
the user which background processes were running at checkpoint time
that died on exit. Ask whether they want to re-kick any.
7. Show dirty-git summary
Cat $HOME/.claude/.checkpoint/git-status.txt. If non-empty: list
the repos with uncommitted changes as a reminder.
8. Delete the checkpoint
Once everything's restored, remove $HOME/.claude/.checkpoint/.
This is single-shot — leaving it on disk would cause confusion if
the user runs /restore again later.
If any step failed (e.g. TaskCreate errored), KEEP the checkpoint files for the failed entries so the user can retry.
9. Final report
Restored:
- 3 tasks (re-created with new IDs)
- 1 loop resumed (job ID f88a2110, every minute)
Background processes that died on exit:
- pid=12345 (cargo build) — you'd need to re-kick if still needed
Dirty git trees (still uncommitted, paul-side decision):
- /home/paul/projects/claude-tools
Pick up where you left off.Edge cases
- No checkpoint: report cleanly and stop. Don't error.
- Malformed checkpoint files: report which file is broken, leave the checkpoint dir in place, don't repair. User can manually fix.
- Partial restore (some steps succeeded, some failed): KEEP the checkpoint dir, report what worked + what didn't. User can manually fix or re-run.
Don't
- Don't re-execute task descriptions as commands. Tasks are declarative descriptions of work — restoring means re-creating the entries, not running them.
- Don't auto-commit anything. Dirty git trees stay dirty.
- Don't try to re-launch background processes. Show them, let the user decide.
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.

