Restore Exocortex Memory

VerifiedCaution

Restores IWE memory from an exocortex backup on a new device or after data loss. Natural language wrapper around restore-from-exocortex.sh.

Sby Skills Guide Bot
DevOpsIntermediate
9/6/2026
Claude Code
#backup-restore#disaster-recovery#claude-code#memory-management#bootstrap

Recommended for

Automated summary

Orchestration skill that restores IWE memory (memory/, extensions/, CLAUDE.md and the memory symlink) from an exocortex backup in a governance repo, delegating all file operations to a deterministic shell script.

Strengths

  • Always runs --dry-run first and requires explicit confirmation before overwriting a populated memory/ or extensions/.
  • Clear failure-mode table: missing exocortex, missing script, no confirmation, unconfigured bare device.
  • Cleanly separates LLM judgment (path resolution, fresh-vs-existing install, confirmation) from the deterministic primitive, and reminds the user to restart Claude Code.
  • Handles the fresh-device case with a documented terminal bootstrap path when the agent is not yet set up.

Limitations

  • Tightly coupled to the IWE environment ($IWE_SCRIPTS, $WORKSPACE_DIR, GOVERNANCE_REPO) and to an external script that is not included here.
  • Assumes the exocortex backup already exists and is up to date in the governance repo (requires a prior git pull).
  • Documentation and trigger phrases are Russian-only, and the skill covers restore only — not backup or sync.
When to use it

Use it after memory/ is lost or corrupted, or when setting up a new device, provided an exocortex backup exists in the governance repo.

When not to use it

Do not use it without an IWE installation and a governance repo containing exocortex/, or when you want to back up or sync memory rather than restore it.

Security analysis

Caution
Quality score77/100

No exfiltration, obfuscation, piping to shell from the network, or safety-disabling behavior. The skill is a thin NL wrapper around a legitimate local backup-restore script, but it is explicitly destructive (overwrites memory/extensions/CLAUDE.md), executes an external/unpackaged script, and offers a fallback that checks out that script from an unmerged branch. Human confirmation and dry-run gates reduce risk, so 'caution' rather than 'risky'.

Findings
  • •Declared destructive: true — the skill drives `restore-from-exocortex.sh` with `--force`, which overwrites the user's `memory/` and `extensions/` directories and `CLAUDE.md`. Guardrails exist (mandatory `--dry-run` first, explicit user confirmation, invariant against overwriting populated dirs), so this is a controlled but genuinely destructive operation.
  • •Fallback failure-mode instructs `git checkout feat/exocortex-sync-restore -- scripts/restore-from-exocortex.sh`, pulling an unmerged feature-branch script into the user's repo, which is then executed with overwrite permissions. Executing code from a non-merged branch is a supply-chain concern.
  • •The skill delegates all file operations to an external shell script that is not included in the package and is not auditable from this content; the actual blast radius depends entirely on that script.
  • •Creates/rewrites a `memory/` symlink in `~/.claude/projects/<slugified-home>-IWE/memory`, and derives that path from `$HOME` via character substitution — a path-derivation bug here (the doc itself warns about `_`/`.` in usernames) could target the wrong directory.
  • •Marked destructive: the orchestrated script overwrites populated `memory/`, `extensions/`, and `CLAUDE.md` (uses `--force`); mitigated by mandatory `--dry-run` and explicit user confirmation.
  • •Executes an external shell script (`restore-from-exocortex.sh`) whose contents are not part of this skill, so its behavior cannot be audited from the listing alone.
  • •Failure-mode fallback instructs `git checkout feat/exocortex-sync-restore -- scripts/restore-from-exocortex.sh`, pulling an executable script from an unmerged feature branch — a mild supply-chain concern; better to point at a pinned/reviewed source.
  • •Performs file- and symlink-creation operations in the user's home / Claude project directory (legitimate for restore, but wide-reaching).
How this analysis is made

Examples

Restore on a new laptop
Восстанови экзокортекс на этом новом ноутбуке из ~/IWE/DS-strategy
Preview then overwrite
Моя memory/ повреждена — покажи dry-run восстановления из governance-репо, и если всё верно, восстанови с подтверждением
English trigger
Restore my exocortex memory from the DS-strategy backup repo

see DP.SC.153 (родительский), #125

name: restore-exocortex description: "Restore IWE memory from an exocortex backup on a new device or after data loss — NL wrapper around restore-from-exocortex.sh." version: 1.0.0 layer: L1 status: active browser_safe: false triggers: slash: [/restore-exocortex] phrases: ["восстанови экзокортекс", "восстанови память", "восстановить exocortex", "restore exocortex", "подними память на новом устройстве"] owner_role: R6 annotations: destructive: true interactive: true related: ["#125"]

/restore-exocortex — Восстановление памяти из exocortex

Роль: R6 Кодировщик Триггер: «восстанови экзокортекс / память», новое устройство, потеря/повреждение memory/ Service Clause: DP.SC.153 (родительский, скиллы); реализация #125

Обещание (контракт)

Вход: (опц.) путь к governance-репо. По умолчанию $WORKSPACE_DIR/$GOVERNANCE_REPO (~/IWE/DS-strategy). Выход: восстановленные memory/ + extensions/ + CLAUDE.md + симлинк memory/; отчёт + напоминание перезапустить Claude Code. Инвариант: НЕ перезаписывает населённую memory/ или extensions/ без явного подтверждения пользователя.

Оркестрация, не реализация. Скилл судит (свежее устройство vs существующая инсталляция, резолв пути, подтверждение) и зовёт детерминированный примитив scripts/restore-from-exocortex.sh. Сам file-ops не делает. На голом терминале без агента используется скрипт напрямую — это bootstrap-путь (см. SETUP-GUIDE).

Алгоритм

Шаг 1. Резолв скрипта и пути

  • Скрипт: $IWE_SCRIPTS/restore-from-exocortex.sh → fallback $WORKSPACE_DIR/FMT-exocortex-template/scripts/restore-from-exocortex.sh. Нет файла → см. Режим отказа.
  • Governance-репо: аргумент пользователя, иначе $WORKSPACE_DIR/${GOVERNANCE_REPO:-DS-strategy}. Убедиться, что <gov>/exocortex/ существует.

Шаг 2. Pre-flight (judgment — здесь LLM уместен)

  • Определить целевую auto-memory: ~/.claude/projects/$(echo "$HOME" | tr '/_.' '-')-IWE/memory (Claude Code слугифицирует /, _, . → -; tr '/' '-' промахнётся при _ в username).
  • Пусто/нет → свежее устройство, восстановление без --force.
  • Населена → существующая инсталляция. Это destructive: показать --dry-run и спросить подтверждение перед --force (Правило 7, исключение «необратимое»).

Шаг 3. Превью → восстановление

  1. Всегда сначала restore-from-exocortex.sh <gov> --dry-run — показать пользователю, что будет сделано.
  2. После согласия (или сразу, если memory пуста) — запуск без --dry-run (с --force, если memory населена и пользователь подтвердил).

Шаг 4. Отчёт

  • Сколько memory-файлов восстановлено, восстановлен ли CLAUDE.md, создан ли симлинк.
  • Напомнить: перезапустить Claude Code — память грузится при старте сессии.

Режим отказа

| Сценарий | Поведение | |---------|-----------| | exocortex/ не найден | Стоп: backup отсутствует/не запушен. Подсказать git pull governance-репо или проверить путь | | Скрипт не найден | До мержа #151 — взять из ветки: git checkout feat/exocortex-sync-restore -- scripts/restore-from-exocortex.sh; иначе bug-report | | memory населена, нет подтверждения | НЕ перезаписывать. Показать dry-run, ждать явного «да»/--force | | Агент ещё не настроен (голое устройство) | Скилл недоступен → инструктировать запуск скрипта из терминала (bootstrap-путь, SETUP-GUIDE) |

<!-- USER-SPACE --> <!-- /USER-SPACE -->

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/restore-exocortex-memory-mtpag6cj' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/restore-exocortex-memory-mtpag6cj/download' --output '.skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md.part' && mv '.skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md.part' '.skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md' && test -s '.skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/restore-exocortex' && cp -R '.skill-downloads/restore-exocortex-memory-mtpag6cj' '.claude/skills/restore-exocortex'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/restore-exocortex-memory-mtpag6cj'

openskills read 'restore-exocortex-memory-mtpag6cj'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/restore-exocortex-memory-mtpag6cj/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills