Skip to content
Productivity
Command

/obsidian-init

Scan your vault and generate a _CLAUDE.md operating manual, index.md catalog, and log.md pointer

From plugin
obsidian-second-brain
5.3k49 skills49 commands3 hooks
> /plugin marketplace add eugeniughelbur/obsidian-second-brain
> /plugin install obsidian-second-brain@obsidian-second-brain

Command definition

obsidian-init.md
description: Scan your vault and generate a _CLAUDE.md operating manual, index.md catalog, and log.md pointer
category: meta
triggers_en: ["init vault", "bootstrap vault", "setup vault", "scan vault"]
triggers_de: ["Vault einrichten", "Vault initialisieren", "Vault konfigurieren", "Vault scannen"]
triggers_es: ["inicializa el vault", "arranca el vault", "configura el vault", "escanea el vault", "inicia el vault", "deja listo el vault"]
triggers_pt: ["inicialize o vault", "bootstrap do vault", "configure o vault", "escaneie o vault"]
triggers_zh: ["初始化知识库", "为这个知识库生成初始配置", "扫描并配置我的知识库", "生成知识库操作手册"]

Use the obsidian-second-brain skill. Execute `/obsidian-init`:

1. Glob the vault (`<vault>/**/*.md`) to map the full vault structure

  • Before reading note bodies, honor any existing sensitive-content rules in `_CLAUDE.md`. Discovery of a path does not authorize reading private content.
  • **Optional First-Brain wiki-style variant:** if `First-Brain/` exists, offer this variant; otherwise offer it as an explicit layout choice when setting up wiki-style. An existing `First-Brain/` triggers an offer, never an automatic layout switch. A root folder whose name differs from `First-Brain` only by case, `_`, or a space (for example `First_Brain/` or `first brain/`) triggers the same offer: ask whether it is the human source layer. Preserve the current layout when the variant is declined. See `references/vault-schema.md` under "First-Brain wiki-style variant".
  • When selected, ensure `First-Brain/` exists, creating it if absent with filesystem tools. Before creating directories, check that planned paths remain inside the vault and existing paths are directories; stop on a file named `First-Brain` or an unsafe linked path. If the user confirmed an existing folder with another spelling as the source layer, use that folder and do not create `First-Brain/` beside it. Record the exact folder name the user confirmed; every later step writes that name wherever this playbook or the template says `First-Brain/`. Do not move, rename, edit, or ingest existing notes during initialization.
  • Resolve output destinations through `references/folder-map.md`, using wiki-style defaults for this variant even if `wiki/` was absent before this run. Create missing destination directories with filesystem tools. Include raw-source subfolders (articles, transcripts, pdfs, videos), research, operation logs, and Bases in their established locations. Keep existing custom output routes unless the user approves replacing them; never route generated outputs under the source folder.

2. Spawn parallel subagents to discover vault context simultaneously:

  • **Dashboard agent**: read `Home.md` or equivalent dashboard
  • **Templates agent**: read all files in `Templates/`
  • **Boards agent**: read all files in `Boards/`
  • **Samples agent**: read one existing note per major folder to capture naming conventions and frontmatter patterns

3. Merge all agent results into a complete picture of the vault 4. Generate a complete `_CLAUDE.md` using the template bundled with the skill at `SKILL_ROOT/references/claude-md-template.md` (its absolute path was given at session start as **Skill root**), filled with real values from the vault

  • For the selected variant, include the template's **First Brain Protection** section and a `First-Brain/` source-layer row, plus explicit note-type destinations resolved through `references/folder-map.md`. Cover entities, concepts/synthesis, projects, meetings, decisions/conflicts, tasks/recurring obligations, daily notes, work logs, reviews, agenda, and boards; keep raw captures, research, operation logs, and Bases in their established locations. Update auto-save rules, propagation rules, and key-file references to those resolved destinations rather than copying human-first defaults. Human originals are not candidates for AI-first conversion. Carry these ownership rules into any subagent instructions.

5. Generate `index.md` at the vault root - a catalog of all pages organized by category:

  • List every note in the vault grouped by folder (Projects, People, Ideas, etc.)
  • Include a one-line description for each note (from frontmatter or first paragraph)
  • Claude reads this file FIRST when navigating the vault - cheaper and faster than searching
  • Format: `- [[Note Name]] - brief description`
  • For protected sources, catalog only permitted metadata; do not read private note bodies merely to generate descriptions. First Brain catalog entries are source pointers, not permission to rewrite those files.

6. Initialize the vault operations log:

  • Create `Logs/` directory at the vault root
  • Write `log.md` at the vault root as a thin pointer file: explains the per-day structure, points at `Logs/`, and ships the entry template (do NOT put log entries in `log.md` itself)
  • Write today's `Logs/YYYY-MM-DD.md` with the init entry: `**HH:MM** - init | Vault initialized with _CLAUDE.md, index.md, Logs/`
  • Per-day file format: frontmatter (`type: log`, `date`, `ai-first: true`) + `**HH:MM** - action | description` entries, append-only

7. Create `Bases/` at the vault root if it does not exist. Stamp the four premade base files from `SKILL_ROOT/references/bases/` (the skill root given at session start):

| Template | Output file | Obsidian-style folder | Wiki-style folder | |---|---|---|---| | `projects.base.template` | `Bases/Projects.base` | `Projects` | `wiki/projects` | | `people.base.template` | `Bases/People.base` | `People` | `wiki/entities` | | `tasks.base.template` | `Bases/Tasks.base` | `Tasks` | `wiki/tasks` | | `daily.base.template` | `Bases/Daily.base` | `Daily` | `wiki/daily` |

Use the selected First-Brain variant's wiki-style routes when applicable; otherwise detect vault style from the folder structure discovered in step 1: if `wiki/` exists at the root, use wiki-style folder names; otherwise use obsidian-style. Honor approved custom Folder

Read more
@eugeniughelbur
Ships withobsidian-second-brain

Persistent memory for Claude Code, Codex and 6 other AI agents, stored as plain markdown in your Obsidian vault. New: Crew, one shared logbook so Claude Code, Codex, Cursor and Grok Bot know what each other did. 48 commands: semantic search, self-rewriting notes, key-less research, scheduled agents.

Stars on GitHub

Momentum

stars in total
5.3k
Star history of eugeniughelbur/obsidian-second-brain on GitHub, a chart by star-history.com

Other commands on obsidian-second-brain.

More commands from other plugins.

analyze-cohorts

analyze-cohorts

Command

Perform cohort analysis on user data — retention curves, feature adoption, and engagement trends

@phuryn@phurynInstall Command
again

again

Command

PUA Again — 用于再试试、换个方法、别放弃、为什么还不行、同一路径失败多次;要求停止微调同一思路,改用本质不同方案。

pua2mo20k
@tanweai@tanweaiInstall Command