From onebrain
Clones agent's portable context (MEMORY.md, MEMORY-INDEX.md, memory files, vault.yml, OneBrain plugin) to a folder for transfer to another vault. Invoke via /clone for explicit memory migrations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/onebrain:cloneThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Package your agent's full context for transfer to a new vault.
Package your agent's full context for transfer to a new vault.
What gets cloned: Everything in the agent folder : MEMORY.md, MEMORY-INDEX.md, memory/, and CLONE.md once generated. Also includes vault.yml and the OneBrain plugin.
What does NOT get cloned: your notes, projects, areas, knowledge, resources, archive, and logs.
Usage: /clone
05-agent/MEMORY.md05-agent/MEMORY-INDEX.md ← include MEMORY-INDEX05-agent/memory/ ← all memory files (was: context/ + memory/ separately; now merged)vault.yml ← include vault.yml (has recap config).claude/plugins/onebrain/When cloning, preserve recapped: and topics: fields on all session logs.
Do NOT strip these fields — the new vault should not reprocess already-recapped logs.
AskUserQuestion: "Include [archive_folder]/[agent_folder]/memory/ (deleted memory files)?"
Options: include / skip
include: copy 06-archive/05-agent/memory/ into clone package (full history)skip: omit archive folder (clean fresh-feeling vault)Write [agent_folder]/CLONE.md (overwrite if it exists):
---
tags: [agent-clone]
updated: YYYY-MM-DD
---
# Agent Clone Manifest
## Identity
- Source: [agent_folder]/MEMORY.md
- Agent name: [read from [agent_folder]/MEMORY.md `## Identity & Personality` section — value of **Agent:** field]
- Last updated: [TODAY'S DATE]
## Index
[If [agent_folder]/MEMORY-INDEX.md exists, include a note that MEMORY-INDEX.md is present. Otherwise write: (none)]
## Memory Notes
[For each .md file in agent_folder/memory/ (skip .gitkeep and non-.md files), list: - filename : first line of file body (after frontmatter). If no .md files exist, write: (none yet)]
Show the user what will be cloned:
──────────────────────────────────────────────────────────────
📦 Ready to Clone
──────────────────────────────────────────────────────────────
✅ [agent_folder]/MEMORY.md identity and personality
✅ [agent_folder]/MEMORY-INDEX.md memory index
✅ [agent_folder]/CLONE.md this manifest
✅ [agent_folder]/memory/ {N} files
✅ vault.yml vault configuration
✅ .claude/plugins/onebrain/ OneBrain plugin
❌ notes, projects, areas, knowledge, resources, archive, logs
Ask:
How would you like to clone?
- Folder copy : I'll create
agent-clone-YYYY-MM-DD/in your vault root with all files ready to copy- Display paths : I'll list the file paths so you can copy them manually
If the user chose option 1:
agent-clone-YYYY-MM-DD/agent-clone-YYYY-MM-DD-02/, -03/, etc. Keep incrementing until you find a name that does not exist.[agent_folder]/ to [output_folder]/[agent_folder]/ (including CLONE.md, MEMORY.md, MEMORY-INDEX.md, memory/)vault.yml to [output_folder]/vault.yml.claude/plugins/onebrain/ to [output_folder]/.claude/plugins/onebrain/[archive_folder]/[agent_folder]/memory/ to [output_folder]/[archive_folder]/[agent_folder]/memory/{output_folder}/.
Copy its contents to your new vault root to restore context.
Prerequisite: new vault must have OneBrain installed before importing.
→ To import: place [agent_folder]/ at the vault root — MEMORY.md is inside.If the user chose option 2:
Print a markdown code block listing every file's relative path:
[agent_folder]/MEMORY.md
[agent_folder]/MEMORY-INDEX.md
[agent_folder]/CLONE.md
[agent_folder]/memory/[each file]
vault.yml
.claude/plugins/onebrain/
Then say:
Copy the listed files/folders to your new vault root. Your new vault needs to have OneBrain installed for the agent to work.
qmd_collection in vault.yml is vault-specific. When cloning to a new vault, the qmd_collection value will point to the old vault's collection. The user must run /qmd setup in the new vault to create a collection for the new vault and update vault.yml accordingly.
Cloned memory/ files reference project paths from the old vault. Project-type memory files may contain file paths (e.g., repo locations) that differ in the new environment. Run /memory-review after cloning to audit and update any path-specific facts.
npx claudepluginhub onebrain-ai/onebrain --plugin onebrainCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.