本文へ移動
cccskills
無料GitHub で公開

restore

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.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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" status

This 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-run

That takes the newest bag. For a specific one:

node "${CLAUDE_PLUGIN_ROOT}/bin/haircut.mjs" restore --bag <bag id> --dry-run

Read 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 _originals inside 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. --bag picks 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 haircut skill, not this one.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

haircut

無料

The barber for your coding agents' config. Weighs everything every agent on this machine loads (instruction files, memory, MCP servers, hooks, skills, commands, subagents, plugins, leftovers), prices each item in tokens from your own transcripts, and parks the dead weight with a receipt and an undo. Use this skill whenever the user mentions config bloat, a heavy or slow session start, tokens burned before the first word, too many MCP servers, hooks that are slow or fire on every prompt, skills or commands or plugins nobody invokes, cleaning up or auditing CLAUDE.md or AGENTS.md, Codex config, or asks what does my agent actually load, why is my context full before I type, which of these servers can I turn off, or what is this plugin costing me. Use it even when they only say the session feels bloated or startup got slow, and even when they mention /context, /doctor or /skill-doctor.

日本語の概要は準備中です。原文の説明を表示しています。

OthmanAdi/haircut22026年9月14日 更新

OthmanAdi のスキルをすべて見る

このスキルの問題を報告する