restore
Skill1 starsChanged 2 months agoMITView on GitHub
Undo a haircut trim. Puts back the skills, commands, subagents, MCP servers, hooks, plugins and files that haircut parked into a dated bag, using the receipt it wrote at the time. Use this skill whenever the user says undo the cleanup, undo the haircut, put my config back, restore what was trimmed, I need that MCP server again, that skill is gone and I want it back, roll the trim back, what is in the bag, or which files were moved. Use it also when something stopped working right after a config cleanup and they suspect the cleanup caused it, and whenever they ask how to reverse a config cleanup they regret.
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
- maxwellsdm1867/wheelertheir own version, first seen Aug 8, 2026
- redareda9/ghostty-resurrecttheir own version, first seen Jun 19, 2026
- thepictishbeast/claude-toolstheir own version, first seen May 17, 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
- thepictishbeast/claude-tools★ 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 repositoryOne other file it gives its agents.
- haircutSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Read the plan and tell the user in plain words what comes back, what is skipped and why.
- Distinctive: line 78
Never print a credential. A file coming out of a bag may hold one.
- Very specific: line 82
If what the user actually wants is to park something again, that is the haircut skill, not this one.
“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
haircut restore
Restore walks a bag's manifest in reverse: files move back where they came from, symlinks are relinked, and anything it cannot reverse on its own is printed for the user. It never deletes, and it never overwrites a path that exists again.
1. Find the bag
node "${CLAUDE_PLUGIN_ROOT}/bin/haircut.mjs" statusThis lists every bag with its operation count and the restore command for each. Bags are named after the run that made them. If there is more than one and the user has not said which, ask before touching anything.
2. Dry run, always
node "${CLAUDE_PLUGIN_ROOT}/bin/haircut.mjs" restore --dry-runThat takes the newest bag. For a specific one:
node "${CLAUDE_PLUGIN_ROOT}/bin/haircut.mjs" restore --bag <bag id> --dry-runRead the plan and tell the user in plain words what comes back, what is skipped and why. Skips are normal and not a failure: a path that exists again is never overwritten, and the manifest records the reason.
3. Restore
The same command without --dry-run, after the user has seen the plan and said
yes.
node "${CLAUDE_PLUGIN_ROOT}/bin/haircut.mjs" restore --bag <bag id>4. What restore will not do on its own
Three kinds of operation need a word from you:
edit: a config file that trim rewrote, for example a hook removed from a settings file or a server disabled in a config file. The verbatim original sits in_originalsinside the bag. Restore points at it instead of clobbering the file, because the user may have edited that file since. Offer--restore-edits, which copies the original back over it, and say plainly that any change made to that file since the trim is lost when they do.cli: trim used the agent's own command line to remove a server or disable a plugin. Restore prints the reverse command. Show it to the user and run it only on their go.- Symlinks and junctions: relinking on Windows needs Developer Mode or an elevated shell. If it fails for that reason, say so and hand the user the command rather than retrying.
Rules
- Restore never deletes anything, including on the way back.
- Partial is fine.
--bagpicks which bag; inside it, skips are reported rather than forced. - Never print a credential. A file coming out of a bag may hold one. Name the path, not the content.
- Anything that loads at session start will not appear in the current session after it comes back. Tell the user to start a new session.
- If what the user actually wants is to park something again, that is the
haircutskill, not this one.
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.

