claude-migrate-memory-to-doc
БесплатноЗапускает вложенные скриптыНе проверенMigrates Claude Code personal memory (the per-project memory/ directory) into tool-agnostic reference docs so other AI CLIs that auto-load AGENTS.md (Codex…
от daymade★ 1 556 звёзд на GitHubОб этом скилле
Migrate Claude Code Memory to Tool-Agnostic Docs
Why this skill exists
Claude Code's personal memory lives in ~/.claude/projects/<project-slug>/memory/. It is locked to Claude Code: not version-controlled with the repo, invisible to every other tool. The moment the user runs Codex, Cursor, or any other AI CLI in the same directory, those tools cannot read "who the user is / how to work with them" — even though a user profile and collaboration preferences are exactly what any AI assistant should read first.
This skill moves the cross-tool-shareable content out of memory into a tool-agnostic location, and leaves memory as a thin handoff cache. The real problem it solves is tool lock-in, not "messy memory".
This skill runs inline (never context: fork): it spawns parallel review subagents and runs codex via Bash — a forked subagent could do neither.
First: which goal?
| Goal | The user wants | Path |
|---|---|---|
| A — end tool lock-in | other AI tools to read the same profile and preferences; memory stays as a thin handoff cache | the Workflow below, all phases |
| B — retire auto memory | a project to stop using auto memory, with documents owning everything it held | references/retire_auto_memory.md; from the Workflow below use Phase 1's scope table and Phase 6's archive rules, and do Phases 2 and 5 only if the user also wants Codex to read the result |
Goal B has no "stays in memory" bucket: handoff state, external pointers and pending rulings need a document home, the memory directory ends empty, and the project switch is turned off and proven with a control probe. When the request does not say which goal, ask.
The core insight — read this before touching anything
The hard part is not moving files. It is this:
A reference file reached only by a plain-text pointer is read on-demand and is NOT guaranteed to load — in either tool.
- Claude Code auto-preloads a reference only via
@importsyntax. A plain-text pointer ("see~/.claude/references/user/foo.md") is on-demand: the agent must choose to open it. - Codex is stricter: it does not parse or follow text paths written inside CLAUDE.md at all. It only auto-injects the doc files themselves (its
AGENTS.md/ configured fallback) along the~/.codex → git-root → cwdchain. Reference files named anything else, sitting in~/.claude/references/, are never auto-loaded by Codex.
Therefore the architecture must be a two-layer split:
| Layer | Where | Guarantee |
|---|---|---|
| Guaranteed-hit — the few facts that must be true every turn | inlined into CLAUDE.md body (both tools inject it) | always present |
| On-demand detail — full profile, war-stories, edge cases | references/ files, reached by pointer |
loaded when relevant |
Putting the hardcore facts only in a reference and trusting a pointer is the #1 way this migration silently fails. Inline them.
Tool-agnostic architecture
~/.claude/CLAUDE.md global instructions — BOTH tools inject this.
Inline the hardest user facts here (a short "User context" section).
~/.claude/references/user/ SSOT for profile / preferences / methodology / personal affairs.
~/.claude/references/user-profile.md hub: condensed core + index into the user/ files
~/.codex/AGENTS.md ──symlink──▶ ~/.claude/CLAUDE.md
so Codex's GLOBAL layer injects the same file Claude Code reads.
~/.codex/config.toml raise project_doc_max_bytes — Codex truncates docs at 32 KiB by default,
which silently drops the back half of a long CLAUDE.md.
Scope note: the wiring (the
~/.codex/symlink, the config edit, and the Phase 5 verification) is Codex-specific and was verified against Codex only (2026-06). The~/.claude/references/user/content layer transfers to any tool that auto-loads a project doc, but Cursor and others need their own wiring (Cursor reads.cursor/rules/ a project-rootAGENTS.md, not~/.codex/) — not implemented or verified here.
Workflow
Copy this checklist into your working notes and check items off:
Memory → Tool-Agnostic Doc Migration:
- [ ] Phase 1: Diagnose & scope — classify every memory file by SCOPE
- [ ] Phase 2: Tool-agnostic migration — references/ + inline hardcore + symlink + config
- [ ] Phase 3: Multi-agent review — 4 parallel reviewers
- [ ] Phase 4: Fix everything review surfaced
- [ ] Phase 5: VERIFY BY RUNNING CODEX (not by reasoning)
- [ ] Phase 6: Memory cleanup — clean / thin / keep + soft-delete to backup
Phase 1 — Diagnose & scope
Preflight — find the memory directory. Claude Code memory lives at ~/.claude/projects/<project-slug>/memory/, where <project-slug> is the working directory path with / → -. A user may have memory across several projects — list them with `ls ~/.claude/projects/*/mem
Установить claude-migrate-memory-to-doc в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл claude-migrate-memory-to-doc?
Migrates Claude Code personal memory (the per-project memory/ directory) into tool-agnostic reference docs so other AI CLIs that auto-load AGENTS.md (Codex primarily) can read the same user profile and preferences. Use when the user says "migrate my memory", "my memory is locked to Claude Code", "make Codex/Cursor read my profile", or reports memory has grown bloated with content that should be shared across tools. Also use it to retire a project's auto memory entirely (turn it off, move everything into documents, archive the directory).
Как установить скилл claude-migrate-memory-to-doc?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-migrate-memory-to-doc запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic