setup-brain
Skill1 starsChanged 3 months agoMITView on GitHub
Initialize or refine this brain-vault — run a pre-check, quickly fill the shared identity layer in `CLAUDE.md` (identity, goals, current projects, and collaboration-preference handling) with AskUserQuestion so Claude Code, Codex, and Copilot can all consume it, then optionally verify local organize tools (markitdown, Pillow, whisper, ffmpeg) and configure organize capabilities. Use this whenever the user says /setup-brain, setup brain, initialize brain-vault, 初始化 brain-vault, 补全身份层, 首次配置这个 vault, or wants to refine this repo's brain-vault setup.
- Installs packages
4 other projects use a version of this.
Adopted by
Most recently taken up by
- Melvynx/ai-sprint-skillstheir own version, first seen Nov 8, 2026
- Melvynx/ai-maxxing-skillstheir own version, first seen Nov 1, 2026
- mayersmargiela/brain-kittheir own version, first seen Aug 24, 2026
- mycelium-hq/ai-brain-startertheir own version, first seen Apr 10, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- mycelium-hq/ai-brain-starter★ 50same name
- Melvynx/ai-maxxing-skills★ 46same name
- Melvynx/ai-sprint-skills★ 16same name
- mayersmargiela/brain-kit★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- ingestSkill
- meditateSkill
- recallSkill
- setup-brainSkill
- ingestSkill
- meditateSkill
- recallSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
37 rules. 0 are common, 22 are distinctive, and 15 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
22
Distinctive
This author's own choices. Worth a look.
15
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
If the current directory is not a git repository, say so first and ask whether to initialize git.
- Distinctive: line 14
If CLAUDE.md already contains real user content, do not silently overwrite it.
- Distinctive: line 40
If there are uncommitted changes, do not auto-overwrite the related files.
- Distinctive: line 42
After pre-check, do not dump the raw command output back to the user.
- Distinctive: line 67
Prefer a two-stage interview.
- Very specific: line 71
Use one AskUserQuestion call with 4 questions so the user can answer in a single interactive panel and switch between questions.
- Very specific: line 80
Use preview for the first 3 questions when comparing answer shapes.
- Distinctive: line 84
If the user is not working in Chinese, localize the wording but keep the same structure, recommendation order, and preview intent.
- Very specific: line 86
After the interactive answers return, ask only for the missing concrete text needed to fill ## Who I am, ## This year's goals, and ## …
- Very specific: line 100
If the user chose 轻微调整 or 完全替换, add - 协作偏好:…… to the same follow-up instead of opening a fresh broad interview.
- Distinctive: line 104
If the user only wants a quick initialization, conservative defaults are acceptable: keep existing collaboration preferences, create empty …
- Distinctive: line 112
If the user only wants one Stage B slot, ask only that slot.
- Distinctive: line 113
If the user already said some slots should be skipped, deferred, or handled later, confirm that in one short line and do not reopen those …
- Distinctive: line 114
If the user is asking for the *shape of the next question* rather than asking you to actually continue the whole setup, answer with the …
- Distinctive: line 115
Do not drag shared-identity-layer collection back into a Stage B-only turn unless the user explicitly asked to resume Stage A or you are …
- Very specific: line 125
Only ask for free-text details after a Stage B choice actually requires them.
- Distinctive: line 127
When the user narrows Stage B to a single slot, keep the answer equally narrow:
- Distinctive: line 136
Update these sections in CLAUDE.md from the user's answers:
- Distinctive: line 145
Keep the Vault conventions, common commands, tool tiers, and project-level pitfalls below those sections.
- Distinctive: line 149
Ensure these directories exist:
- Distinctive: line 200
Prefer giving commands and letting the user decide whether to run them.
- Very specific: line 201
Do not guess package names or parameters.
- Very specific: line 205
If the user enables document conversion and markitdown is missing:
- Very specific: line 207
If uv is available, first run uv tool install --help to verify the command exists, then suggest:
- Very specific: line 213
If there is no uv but python3 is available, suggest the user pick their own Python package manager to install MarkItDown.
- Distinctive: line 221
If the user wants to confirm which AI CLI entries in this repo are already usable, do read-only verification only:
- Very specific: line 223
If copilot is available, run copilot --help to verify the command works.
- Very specific: line 224
If gh is available, run gh copilot --help to verify the GitHub CLI entry is present.
- Very specific: line 225
If codex is available, run codex --help to verify the command works.
- Distinctive: line 226
Do not ask a dedicated Stage B AI CLI question.
- Distinctive: line 229
If the user enables audio transcription:
- Very specific: line 238
If whisper is missing and brew is available, first run brew info openai-whisper to verify the formula exists.
- Very specific: line 244
If ffmpeg is missing and will not be installed via brew install openai-whisper, first run brew info ffmpeg to verify the formula exists, …
- Distinctive: line 251
If the user already has a Python or system package manager workflow, allow them to provide the install command.
- Distinctive: line 284
If not executable, run:
- Distinctive: line 317
Keep the output concise and organized around outcomes the user can act on:
- Very specific: line 322
Use status words such as detected, verified usable, missing, or deferred so command detection is not confused with readiness.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Setup Brain
You are the brain-vault initialization wizard. The goal is a safe, repeatable initialization in the current vault root. Do not read or exfiltrate credentials. Do not delete user files. Confirm before running install commands, overwriting existing config, committing to git, or scheduling tasks.
Prerequisites
- The working directory should be the brain-vault root.
- If the current directory is not a git repository, say so first and ask whether to initialize git.
- If
CLAUDE.mdalready contains real user content, do not silently overwrite it; read it first and explain which sections will be updated.
Initialization flow
1. Pre-check
Run and record:
pwd
git status --short
find . -maxdepth 2 -type d \( -path './.git' -o -path './.claude' -o -path './.agents' -o -path './.codex' -o -path './.copilot' -o -path './.github' \) -prune -o -type d -print
command -v markitdown || true
command -v whisper || true
command -v ffmpeg || true
command -v copilot || true
command -v gh || true
command -v codex || true
command -v uv || true
command -v brew || true
command -v python3 || true
command -v python3 >/dev/null && python3 -c "import importlib.util, sys; sys.stdout.write('Pillow\n' if importlib.util.find_spec('PIL') else '')" || trueCommand hits in pre-check only establish detection. Before claiming a tool is ready, verify it with --help, an import check, or the relevant validation command from the sections below.
If there are uncommitted changes, do not auto-overwrite the related files; list them as protected paths.
After pre-check, do not dump the raw command output back to the user. Summarize only the few facts that affect the next step:
- whether the current directory is the vault root,
- whether this is a git repository and whether the worktree is clean,
- whether the shared identity-layer file still looks like a template or already contains real user content,
- whether the core PARA directories already exist,
- whether any protected paths, missing prerequisites, or notable AI CLI detection status will change what happens next.
Keep this handoff short: usually 3-6 bullets plus one transition sentence. Use status words such as ready, template, detected, missing, or protected so the user can scan quickly. Avoid ending with a long free-text questionnaire such as “please answer these 4 questions”. Instead, give one short recommendation and then immediately open the Stage A AskUserQuestion interaction.
A good Chinese handoff looks like this:
基础检查已完成:
- 当前目录正确,且是 git 仓库。
- 工作区干净。
- PARA 目录已存在。
- `CLAUDE.md` 里的共享身份层仍是模板,适合先做快速初始化。
- 工具目前仅完成 detected 级检查;是否继续 capability verification 可以稍后再定。
建议先完成共享身份层初始化;下面我会用一轮简短的交互式问题收集信息。2. Interview the user
Prefer a two-stage interview.
Stage A: quick initialization (recommended)
Use one AskUserQuestion call with 4 questions so the user can answer in a single interactive panel and switch between questions. Prefer suggestion-style options over forcing the user to compose everything from scratch. Adapt labels, descriptions, and previews to the user's language.
Unless the user already provided equivalent information, Stage A should cover exactly these 4 slots and put the recommended option first with (Recommended):
身份— choose a summary style such as单一角色,多重角色, or转型中.目标— choose a goal structure such as三项目标,按主题, or按里程碑.项目— choose a project layout such as简短列表,按优先级, or按领域.偏好— choose whether to保留现有,轻微调整, or完全替换the existing collaboration preferences.
Use preview for the first 3 questions when comparing answer shapes; the collaboration-preference question usually does not need a preview. Explain that the built-in Other path can be used for custom input when none of the suggestions fit.
For the exact default Stage A payload and copy-ready option wording, read references/interactive-prompts.md before drafting the interaction.
If the user is not working in Chinese, localize the wording but keep the same structure, recommendation order, and preview intent.
After the interactive answers return, ask only for the missing concrete text needed to fill ## Who I am, ## This year's goals, and ## Current projects. Keep this follow-up short and structured, and match the template to the formats the user selected. For example:
Please fill in the template below:
- Who I am: I am a …, mainly responsible for …, current focus is …
- This year's goals:
- …
- …
- …
- Current projects:
1. Project A: …
2. Project B: …If the user chose 轻微调整 or 完全替换, add - 协作偏好:…… to the same follow-up instead of opening a fresh broad interview.
Recommend this path first. Explain that organize capability choices, AI CLI verification, and automation can be configured afterward if needed.
If the user only wants a quick initialization, conservative defaults are acceptable: keep existing collaboration preferences, create empty PARA directories, and only detect tools without installing. Do not pull Stage B questions into the first round unless the user explicitly asks to continue capability setup.
Stage B: optional capability details
Only ask follow-up questions when the user explicitly wants to customize capabilities after Stage A, or when a later decision depends on them. Prefer AskUserQuestion here as well because these are mostly bounded choices. Keep each call within the tool limit of 1-4 questions; if needed, use a second short call instead of a large free-text prompt.
Scope discipline matters in Stage B:
- If the user only wants one Stage B slot, ask only that slot; do not reconstruct the full Stage B checklist.
- If the user already said some slots should be skipped, deferred, or handled later, confirm that in one short line and do not reopen those slots in the same turn.
- If the user is asking for the shape of the next question rather than asking you to actually continue the whole setup, answer with the exact next bounded question you would send, not a broader recap of unrelated setup work.
- Do not drag shared-identity-layer collection back into a Stage B-only turn unless the user explicitly asked to resume Stage A or you are actually about to update
CLAUDE.md.
Stage B should usually cover these 3 slots, and if the user only wants a subset, trim the payload rather than asking irrelevant questions:
格式— choose among文档+图片 (Recommended),仅文档,仅图片, or暂不启用.转录— choose among暂不启用 (Recommended),启用默认,稍后再配, or现在指定.自动化— choose among手动运行 (Recommended),会话内定时,系统定时, or以后再说.
For the exact default Stage B payload and canonical option wording, read references/interactive-prompts.md before drafting the interaction.
Only ask for free-text details after a Stage B choice actually requires them. For example, ask for Whisper model/language only after 现在指定.
When the user narrows Stage B to a single slot, keep the answer equally narrow:
格式only → ask only the格式question and stop there.转录only +现在指定→ first acknowledge that格式/自动化stay skipped or deferred, then ask only forWhisper modelandlanguage.- In that transcription-only branch, do not re-ask whether the user accepts first-download behavior if they already said they want to specify the values now; save the reminder for the final output or the moment before a real transcription.
- In that transcription-only branch, do not pull
Who I am/goals/projectsback into the turn unless the user explicitly switched back to identity initialization.
3. Generate or update the shared identity layer
Update these sections in CLAUDE.md from the user's answers:
## Who I am## This year's goals## Collaboration preferences## Current projects
Treat CLAUDE.md as the canonical shared identity layer for this vault — the single maintenance source. Claude Code reads it directly; Codex and DeepSeek Harness read AGENTS.md, which is a symlink to CLAUDE.md (AGENTS.md -> CLAUDE.md) so content stays identical by construction. If the symlink is ever replaced by a plain file (e.g. Windows checkout or accidental edit), .githooks/pre-commit restores it on the next commit, or run .claude/bin/sync-agents-md manually. Never edit AGENTS.md directly. .github/copilot-instructions.md should point Copilot at the same sections rather than duplicating identity text.
Keep the Vault conventions, common commands, tool tiers, and project-level pitfalls below those sections. Do not write temporary task state, one-off information, or credentials.
4. Ensure directory structure
Ensure these directories exist:
Inbox/
Projects/
Areas/
Resources/
Archive/
.claude/bin/
.claude/skills/setup-brain/
.claude/skills/ingest/
.claude/skills/meditate/
.claude/skills/recall/
.agents/skills/setup-brain/
.agents/skills/ingest/
.agents/skills/meditate/
.agents/skills/recall/
.codex/skills/setup-brain/
.codex/skills/ingest/
.codex/skills/meditate/
.codex/skills/recall/
.copilot/.github/plugin/
.copilot/skills/setup-brain/
.copilot/skills/ingest/
.copilot/skills/meditate/
.copilot/skills/recall/
.github/Preserve empty directories with .gitkeep.
The personal vault maintains the same multi-AI entry structure as the open-source projections: .claude/ is canonical and owns scripts/wrappers, .agents/ is the Codex session copy, .codex/ is the Codex CLI thin entry, and .copilot/ plus .github/copilot-instructions.md are the Copilot CLI / GitHub Copilot entries. Do not maintain .Codex/ as a runtime directory unless a target host explicitly requires that legacy casing.
5. Tool detection and limited CLI verification
Basic detection
markitdown: converts.doc/.docx/.xls/.xlsx/.ppt/.pptx/.pdf/.txt/.text/.markdown/.csv/.json/.jsonl/.html/.htm/.epub/.ipynbto Markdown.Pillow: generates screenshot-placeholder Markdown for.png/.jpg/.jpeg/.webp.whisper: converts.mp3/.m4a/.wav/.mp4/.mov/.aac/.aiff/.flac/.ogg/.opus/.webmto Markdown.ffmpeg: local dependency required by Whisper to decode audio/video.- Whisper model: the first real transcription may download the default model; verify the current default model and
--modelparameter withwhisper --help, and specify viaWHISPER_MODELif needed. copilot/gh copilot: for the GitHub Copilot CLI entry.codex: for the OpenAI Codex CLI entry.uv,brew,python3: used to decide the recommended install path.
Install principles
- Cloning the repository does not install any tool.
- Detection and read-only verification need no confirmation; confirm before running any install command.
- For AI CLI support in this template, focus on detecting and verifying existing commands, not on guiding installation.
- Prefer giving commands and letting the user decide whether to run them.
- Do not guess package names or parameters; before installing, verify the command against
--helpor official/local docs of an existing tool. When verification is impossible, state the uncertainty and let the user install manually.
Recommended install paths
If the user enables document conversion and markitdown is missing:
If
uvis available, first runuv tool install --helpto verify the command exists, then suggest:uv tool install markitdown- If there is no
uvbutpython3is available, suggest the user pick their own Python package manager to install MarkItDown; do not guess a global pip strategy for them. Verify after install:
command -v markitdown markitdown --help
If the user wants to confirm which AI CLI entries in this repo are already usable, do read-only verification only:
- If
copilotis available, runcopilot --helpto verify the command works. - If
ghis available, rungh copilot --helpto verify the GitHub CLI entry is present. - If
codexis available, runcodex --helpto verify the command works. If the command exists but fails to start, report that clearly as detected-but-not-usable instead of turning setup into an installation guide. - Do not ask a dedicated Stage B AI CLI question. Only surface this verification when the user explicitly asks, or as a short factual note in the pre-check / final summary.
- Explain the repo entry points factually when relevant:
.claude/is canonical,.agents/is the Codex app/session copy,.codex/is the Codex CLI thin entry, and.copilot/plus.github/copilot-instructions.mdare the Copilot CLI / GitHub Copilot entries.
If the user enables audio transcription:
Detect
whisperandffmpeg:command -v whisper || true command -v ffmpeg || trueIf
whisperis missing andbrewis available, first runbrew info openai-whisperto verify the formula exists; if the output shows it depends onffmpeg, Homebrew will handle that dependency, then suggest:brew install openai-whisperIf
ffmpegis missing and will not be installed viabrew install openai-whisper, first runbrew info ffmpegto verify the formula exists, then suggest:brew install ffmpeg- If there is no
brewbutuvis available, first runuv pip install --helpto verify the command exists; installing Whisper via Python usually needs a target environment andffmpegmay still need a separate install, so let the user choose the environment first; do not silently install globally. - If the user already has a Python or system package manager workflow, allow them to provide the install command.
Verify after install:
command -v whisper command -v ffmpeg whisper --help ffmpeg -version
whisper --help shows the current default model and the --model parameter; if the default is not the model the user wants, suggest running organize with WHISPER_MODEL=<model>. Whisper models can be large and the first real transcription may download one; do not silently trigger a model download at setup time — remind the user before a real transcription.
6. Wrapper check
Confirm the following files exist and are executable:
test -x .claude/bin/safe-markitdown
test -x .claude/bin/safe-whisper
test -x .claude/bin/safe-mkdir
test -x .claude/bin/safe-git-add
test -x .claude/bin/safe-git-mv
test -x .claude/bin/safe-git-commit
test -x .claude/bin/ingest-scan
test -x .claude/bin/ingest-prepare
test -x .claude/bin/ingest-apply-duplicates
test -x .claude/bin/meditate-scan
test -x .claude/bin/meditate-apply-safe
test -x .claude/bin/meditate-finalize-log
test -x .claude/ingest.sh
test -x .claude/meditate.shIf not executable, run:
chmod +x .claude/bin/safe-markitdown .claude/bin/safe-whisper .claude/bin/safe-mkdir .claude/bin/safe-git-add .claude/bin/safe-git-mv .claude/bin/safe-git-commit .claude/bin/ingest-scan .claude/bin/ingest-prepare .claude/bin/ingest-apply-duplicates .claude/bin/meditate-scan .claude/bin/meditate-apply-safe .claude/bin/meditate-finalize-log .claude/ingest.sh .claude/meditate.shRun syntax checks:
python3 -m py_compile .claude/bin/safe-markitdown .claude/bin/safe-whisper .claude/bin/safe-mkdir .claude/bin/safe-git-add .claude/bin/safe-git-mv .claude/bin/safe-git-commit .claude/bin/ingest-scan .claude/bin/ingest-prepare .claude/bin/ingest-apply-duplicates .claude/bin/meditate-scan .claude/bin/meditate-apply-safe .claude/bin/meditate-finalize-log
zsh -n .claude/ingest.sh
zsh -n .claude/meditate.sh
python3 -m json.tool .copilot/.github/plugin/plugin.json >/tmp/brain-vault-plugin-json-check.out7. Optional auto-organize
Treat this as an after-initialization option, not a first-round requirement. If the user wants auto-organize after the identity layer is initialized, explain the three options. The default recommendation is now ingest + meditate rhythm: run ingest first, then meditate after it. Nightly cadence = ingest.sh then meditate.sh nightly; weekly cadence = ingest.sh then meditate.sh weekly.
- In-session: use a Claude Code scheduled task to trigger
/ingestand/meditate; closing the session or task expiry affects execution. - System-level: use crontab/launchd to run
VAULT=/path/to/brain .claude/ingest.shand thenVAULT=/path/to/brain .claude/meditate.sh nightly, plus a weeklyVAULT=/path/to/brain .claude/meditate.sh weekly. On Windows, prefer Task Scheduler with the PowerShell ingest entry plus the same meditate shell entry through a compatible shell. - Manual: periodically run
/ingest,/meditate,.claude/ingest.sh,.claude/ingest.ps1, or.claude/meditate.sh [nightly|weekly].
Confirm before modifying the system crontab/launchd.
8. Final verification and output
Run:
git status --shortKeep the output concise and organized around outcomes the user can act on:
- Shared identity layer initialized: which sections in
CLAUDE.mdwere updated. - Multi-client alignment: Codex / Copilot entry files now point to the same shared identity layer.
- Capability status: document conversion, screenshot placeholder, audio/video transcription, and AI CLI verification status.
- Use status words such as
detected,verified usable,missing, ordeferredso command detection is not confused with readiness. - Reminders: Whisper default model / model-download reminder when transcription is enabled or requested.
- Next steps: put material into
Inbox/and run/ingest; run/recallwhen you want to query existing knowledge; run/meditateor.claude/meditate.sh [nightly|weekly]when you want consolidation or a health check on already-organized notes.
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
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.

