agentleFS
OhJuhunOhJuhun/claude-backup-sync/skills/restore-config/SKILL.md

restore-config

Skill0 starsChanged 9 months agoMITView on GitHub

Restore Claude Code config from GitHub backup repository to local machine. User says: "restore config", "pull config", "sync from backup", "/restore-config" Ask the user which categories to restore using AskUserQuestion (multiSelect): Copy files from $CLONE_DIR/claude/ back to ~/.claude/: For Brewfile: brew bundle install --file="$CLONE_DIR/Brewfile" IMPORTANT: .mcp.json contains ${ENV_VAR} placeholders instead of real API keys. Tell the user they need to set the actual environment variables after restore. Report in Korean: - Number of files restored - Source repository - Any…

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask the user which categories to restore using AskUserQuestion (multiSelect):

    line 32
  2. Distinctive:

    All of the above

    line 42

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Restore Config

Restore Claude Code config from GitHub backup repository to local machine.

Trigger

User says: "restore config", "pull config", "sync from backup", "/restore-config"

Steps

1. Read backup config

CONFIG_FILE="$HOME/.claude/scripts/backup-config.json"
REPO=$(python3 -c "import json; print(json.load(open('$CONFIG_FILE'))["repo"])")
BRANCH=$(python3 -c "import json; print(json.load(open('$CONFIG_FILE')).get("branch", "main"))")
CLONE_DIR="$HOME/.claude/backup-repo"

2. Clone or pull latest from backup repo

if [ \! -d "$CLONE_DIR/.git" ]; then
  gh repo clone "$REPO" "$CLONE_DIR" -- -b "$BRANCH"
else
  git -C "$CLONE_DIR" pull --rebase origin "$BRANCH"
fi

3. Ask user what to restore

Ask the user which categories to restore using AskUserQuestion (multiSelect):

  • Claude settings (settings.json, CLAUDE.md)
  • MCP config (.mcp.json)
  • Agents, Rules, Commands
  • Skills
  • HUD config
  • Scripts
  • Dotfiles (.zshrc, .gitconfig, .ssh/config)
  • Brewfile
  • All of the above

4. Restore selected files

Copy files from $CLONE_DIR/claude/ back to ~/.claude/:

  • claude/settings.json → ~/.claude/settings.json
  • claude/CLAUDE.md → ~/.claude/CLAUDE.md
  • claude/.mcp.json → ~/.claude/.mcp.json
  • claude/agents/ → ~/.claude/agents/
  • claude/rules/ → ~/.claude/rules/
  • claude/commands/ → ~/.claude/commands/
  • claude/skills/ → ~/.claude/skills/
  • claude/hud/ → ~/.claude/hud/
  • claude/scripts/ → ~/.claude/scripts/
  • .zshrc → ~/.zshrc
  • .gitconfig → ~/.gitconfig
  • .ssh_config → ~/.ssh/config

For Brewfile: brew bundle install --file="$CLONE_DIR/Brewfile"

5. Warn about MCP config

IMPORTANT: .mcp.json contains ${ENV_VAR} placeholders instead of real API keys. Tell the user they need to set the actual environment variables after restore.

6. Report result

Report in Korean:

  • Number of files restored
  • Source repository
  • Any warnings (e.g., MCP env vars need setup)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.