From onebrain
Clone your agent's portable context (agent folder including MEMORY.md) to a folder for transfer to another vault
npx claudepluginhub kengio/onebrain --plugin onebrainThis skill uses the workspace's default tool permissions.
Package your agent's full context for transfer to a new vault.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Performs token-optimized structural code search using tree-sitter AST parsing to discover symbols, outline files, and unfold code without reading full files.
Package your agent's full context for transfer to a new vault.
What gets cloned: Everything in the agent folder : MEMORY.md, context/, memory/, and CLONE.md once generated.
What does NOT get cloned: your notes, projects, areas, knowledge, resources, archive, and logs.
Usage: /clone
If vault.yml exists, read it and extract folders.agent. Default to 05-agent if the file does not exist or the key is absent.
Set agent_folder for all paths below.
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 Agent Identity section]
- Last updated: [TODAY'S DATE]
## Context Notes
[For each .md file in agent_folder/context/ (skip .gitkeep and non-.md files), list: - filename : first line of file body (after frontmatter). If no .md files exist, write: (none yet)]
## 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]/CLONE.md: this manifest[agent_folder]/context/: N files[agent_folder]/memory/: N filesNot cloned: your 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]/ preserving all subfolders and files (including CLONE.md and MEMORY.md)Your agent context is ready at
[output_folder]/. Copy[agent_folder]/to your new vault root to restore context. Prerequisite: Your 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]/CLONE.md
[agent_folder]/context/[each file]
[agent_folder]/memory/[each file]
Then say:
Copy the
[agent_folder]/folder to your new vault root. Your new vault needs to have OneBrain installed for the agent to work.