agentleFS
iwesysiwesys/IWE/.claude/skills/restore-exocortex/SKILL.md

restore-exocortex

Skill0 starsChanged 24 days agoMITView on GitHub

Restore IWE memory from an exocortex backup on a new device or after

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Invariant: does NOT overwrite a populated memory/ or extensions/ without explicit user confirmation.

    line 36
  2. Very specific:

    Always run restore-from-exocortex.sh <gov> --dry-run first — show the user what will happen.

    line 52
  3. Very specific:

    After confirmation (or immediately if memory is empty) — run without --dry-run (with --force if memory is populated and the user has …

    line 53

≈ “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-exocortex — Restore Memory From Exocortex

Role: R6 Coder Trigger: "restore exocortex / memory", new device, loss or corruption of memory/ Service Clause: DP.SC.153 (parent, skills); implementation #125

Promise (contract)

Input: (optional) path to the governance repo. Default: $WORKSPACE_DIR/$GOVERNANCE_REPO (${IWE_WORKSPACE:-$HOME/IWE}/DS-strategy). Output: restored memory/ + extensions/ + CLAUDE.md + memory/ symlink; report + reminder to restart Claude Code. Invariant: does NOT overwrite a populated memory/ or extensions/ without explicit user confirmation.

Orchestration, not implementation. The Skill judges (fresh device vs. existing installation, path resolution, confirmation) and calls the deterministic primitive scripts/restore-from-exocortex.sh. It does not perform file operations itself. On a bare terminal without an agent, run the Script directly — this is the bootstrap path (see SETUP-GUIDE).

Algorithm

Step 1. Resolve Script and Path

  • Script: $IWE_SCRIPTS/restore-from-exocortex.sh → fallback $WORKSPACE_DIR/IWE/scripts/restore-from-exocortex.sh. File not found → see Failure Mode.
  • Governance repo: user argument, otherwise $WORKSPACE_DIR/${GOVERNANCE_REPO:-DS-strategy}. Verify that <gov>/exocortex/ exists.

Step 2. Pre-flight (judgment — LLM is appropriate here)

  • Determine the target auto-memory path: ~/.claude/projects/$(echo "$HOME" | tr '/_.' '-')-IWE/memory (Claude Code slugifies /, _, . → -; tr '/' '-' will miss _ in the username).
  • Empty or absent → fresh device; restore without --force.
  • Populated → existing installation. This is destructive: show --dry-run output and request confirmation before using --force (Rule 7, "irreversible action" exception).

Step 3. Preview → Restore

  1. Always run restore-from-exocortex.sh <gov> --dry-run first — show the user what will happen.
  2. After confirmation (or immediately if memory is empty) — run without --dry-run (with --force if memory is populated and the user has confirmed).

Step 4. Report

  • Number of memory files restored, whether CLAUDE.md was restored, whether the symlink was created.
  • Reminder: restart Claude Code — memory is loaded at session startup.

Failure Mode

ScenarioBehavior
exocortex/ not foundStop: backup is absent or not pushed. Suggest running git pull on the governance repo or checking the path
Script not foundBefore merge #151 — fetch from branch: git checkout feat/exocortex-sync-restore -- scripts/restore-from-exocortex.sh; otherwise file a bug report
Memory is populated, no confirmationDo NOT overwrite. Show dry-run output and wait for an explicit "yes" or --force
Agent not yet configured (bare device)Skill unavailable → instruct the user to run the Script from the terminal (bootstrap path, SETUP-GUIDE)
<!-- USER-SPACE --><!-- /USER-SPACE -->

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.