Init
A Claude Code plugin for Obsidian — Karpathy's LLM Wiki shipped as a four-layer, hook-enforced agent stack with multi-agent orchestration.
npx -y skills add odere-pro/claude-wiki-pages-plugin --skill initAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Onboarding entry point. Scaffold a new LLM Wiki vault in the user's project by copying from the skill's own template/, stamp the schema version, and orient the user. Trigger when the user says "set up a wiki", "initialize the vault", "start a new LLM Wiki", "bootstrap the vault", or invokes /claude-wiki-pages:init directly.
SKILL.md
12.7 KB, as published. Nobody here has run it
LLM Wiki — Onboarding
Bootstrap a fresh vault/ in the user's project and hand off to the ingest
pipeline. The skill is idempotent and self-repairing: it always persists
the chosen vault path, creates the vault directory if it is missing, and
fills in any missing required files or subdirectories from the plugin's
reference scaffold without overwriting user content. Running it twice on a
healthy vault is a no-op.
This skill owns initialization. It does not ingest, lint, or query — those
roles belong to /claude-wiki-pages:ingest,
/claude-wiki-pages:lint, and /claude-wiki-pages:query.
When to invoke
- The user has installed the plugin and asks how to start.
- No
vault/directory exists in the user's project. - The vault directory exists but is empty or missing required files / folders.
- The user explicitly asks for a new vault or wants to reset to a known-good scaffold.
Safe to invoke even when a populated vault already exists — the skill detects that case, reports the current state, ensures settings are persisted, and exits without overwriting anything.
Reading contract
Sealed inputs this skill may read:
- The plugin's own
${CLAUDE_PLUGIN_ROOT}/skills/init/template/tree — the reference scaffold used as the copy source. This is always the plugin cache path, never a project-local path (even when the user's chosen vault happens to bedocs/vault). - The plugin's
${CLAUDE_PLUGIN_ROOT}/skills/init/template/CLAUDE.md— the authoritative schema. - The user's project root — to determine the target install path and detect a prior install.
This skill MUST NOT read raw/ or wiki/ content from any other source.
Writing contract
Two write targets, both scoped to the user's project:
<project>/<vault>/— the scaffold tree. Only missing files and directories are written; existing user content is never overwritten.<project>/.claude/claude-wiki-pages/settings.json— written viascripts/set-vault.shso the chosen vault path persists across sessions.
- Copy missing pieces from
${CLAUDE_PLUGIN_ROOT}/skills/init/template/into<project>/<vault>/verbatim. - Confirm
<project>/<vault>/CLAUDE.mddeclaresschema_version: 2. - Do NOT populate
wiki/_sources/,wiki/_synthesis/, or any topic folder beyond what the reference scaffold already contains. - Do NOT write to
<project>/outside the newvault/subtree and the.claude/claude-wiki-pages/settings path. In particular, do not touch the user's existingREADME.md,.gitignore, or any other top-level file.
Vault location
The vault root is resolved in this order (first match wins):
CLAUDE_WIKI_PAGES_VAULTenv var — explicit override; good for local dev and CI..claude/claude-wiki-pages/settings.json→current_vault_path— the persisted per-project vault path. Written byscripts/set-vault.shand self-healed by any hook that resolves the vault.- Auto-detect — scan the project (up to 4 levels deep) for a directory that
contains both
CLAUDE.md(declaringschema_version) and awiki/subdirectory. Use the first match. - Default —
docs/vaultrelative to the project root. (This is the read-side default for existing vaults. When this wizard scaffolds a new vault with no path named anywhere, it instead derivesdocs/<root-slug>-vaultfrom the project root folder name — see Workflow step 1 — and persists it viaset-vault.sh, so later sessions resolve it at tier 2.)
The shell scripts implement this via scripts/resolve-vault.sh. Claude should
follow the same logic when deciding where to read or write vault files:
IF CLAUDE_WIKI_PAGES_VAULT is set → use that path
ELSE IF .claude/claude-wiki-pages/settings.json has current_vault_path → use that
ELSE run: find . -maxdepth 4 -name "CLAUDE.md" | xargs grep -l "schema_version"
pick the first match whose parent also contains a wiki/ directory
ELSE use: docs/vault
CLAUDE_WIKI_PAGES_VAULT accepts relative paths (resolved from the project root) or
absolute paths:
export CLAUDE_WIKI_PAGES_VAULT=docs/vault # explicit relative — same as default
export CLAUDE_WIKI_PAGES_VAULT=my-wiki # custom vault name
export CLAUDE_WIKI_PAGES_VAULT=/abs/path # absolute, e.g. shared / multi-project vault
Workflow
The workflow is designed so a first-time user sees zero error messages on a clean install. Every step tolerates pre-existing state and fills in only what is missing.
- Resolve
<vault>. In priority order:- Path named in the user's prompt (e.g. "my vault is docs/vault").
CLAUDE_WIKI_PAGES_VAULTenv var..claude/claude-wiki-pages/settings.json→current_vault_path.- Auto-detected directory (CLAUDE.md with
schema_version+wiki/sibling). - Existing default:
docs/vault— use it when it already exists (back-compat; never rename an existing vault). - New vault:
docs/<root-slug>-vault, the project root folder name slugified (lowercase, non-alphanumerics →-, repeats collapsed) —default_new_vault_pathinscripts/resolve-vault.sh:bash -c 'source ${CLAUDE_PLUGIN_ROOT}/scripts/resolve-vault.sh && default_new_vault_path'. Obsidian displays the vault's folder name, so projectmy-project/shows up as my-project-vault instead of a generic "vault". Step 2 persists the path, so every later session resolves it at tier 3 of the read-side order; the multi-vault registry picks up the same folder name automatically (vault_adddefaults the registrynameto the path's basename).
- Persist path (always). Run
bash ${CLAUDE_PLUGIN_ROOT}/scripts/set-vault.sh <vault>. This creates<project>/.claude/claude-wiki-pages/settings.jsonwith defaults if it does not exist, then writescurrent_vault_path: <vault>. Do this before touching the vault directory so the configuration is correct even if a later step fails. - Scaffold vault (create + populate). Run
bash ${CLAUDE_PLUGIN_ROOT}/scripts/scaffold-vault.sh <vault>. The script is idempotent: it creates<vault>if missing and copies any top-level entries from${CLAUDE_PLUGIN_ROOT}/skills/init/template/that are not already present in<vault>. Existing files are never overwritten (no-clobber). After scaffolding, the script git-inits the vault as its own git repo (using the engine'sensureRepoviadoctor --fix) so every structural write is committed and reversible. The nesting guard skips the git-init when the target is already inside a git work tree (e.g. the user's project repo). Its stdout contract (CREATED: …/EXISTS: …/READY: vault at …; N created, M preserved; git=<initialised|skipped(already-in-repo)>) feeds the orientation summary in step 6. The vault is always a git repo upon completion (or was already covered by an outer repo). Assert, don't trust: after the script returns, rungit -C <vault> rev-parse --is-inside-work-treeand require it to printtrue. Both scaffold outcomes count as success —git=initialised(vault got its own repo) andgit=skipped(already-in-repo)(covered by the parent project repo; vault commits are pathspec-scoped to the vault). If the assertion fails, runbash ${CLAUDE_PLUGIN_ROOT}/scripts/engine.sh doctor --fix --target <vault>(or plaingit init+ an initial commit when Bun is absent) and re-assert before continuing — git coverage is the safety net every later write depends on. 3c. Project intake — the "set up the wiki for this repo" choice. When the project root is a git work tree, present this as an explicit choice (it is what a user means by "generate a vault for the project"), not a buried option: "Ingest this whole project's docs into the wiki? I'll snapshot the project's markdown docs (README, docs/, ADRs/RFCs — never source code) intoraw/wired/and turn them into wiki pages./claude-wiki-pages:synckeeps them current later. (Or skip and start with the bundled sample source.)" On yes, runbash ${CLAUDE_PLUGIN_ROOT}/scripts/wire-source.sh add --vault <vault>. This registers the wired source in settings.json and runs the initial pull; the snapshots land nested under<vault>/raw/wired/<name>/, soingest_pendingflips true naturally and the orchestrator chains ingest on the next/claude-wiki-pages:wiki. The ingest agent enumerates pending sources recursively (viaengine.sh backlog), so these nested docs are picked up — not just top-levelraw/files. On no (or when the project is not a git repo), skip — wiring is available later via the same command. - Schema check. Confirm
<project>/<vault>/CLAUDE.mdstarts withschema_version: 2. Step 3 already copies it when absent; if it exists but is missing the version header, stamp the correct frontmatter; do not rewrite unrelated content. - Verify. Invoke
bash ${CLAUDE_PLUGIN_ROOT}/scripts/verify-ingest.sh --target <vault>. Expect exit 0. If non-zero, surface the output verbatim, but only after steps 2–4 have completed — persistence and scaffolding must not be gated on verification passing on the very first run. - Orient. Print a "you are here" summary:
- The path to the vault.
- The schema version present in
<vault>/CLAUDE.md. - Whether settings were created fresh, updated, or already correct.
wired=<name>when Step 3c wired the project (with the snapshot count), orwired=none.- Note that
<vault>/raw/sample-source.mdis the bundled sample source — it is ready to ingest so the user can see a real result immediately. - Three suggested next steps, in order of increasing commitment:
- Run
/claude-wiki-pages:wiki— the orchestrator detects the bundled sample source inraw/and chains the ingest pipeline automatically. No file from you is required to get a first result. - Run
/claude-wiki-pages:statusto confirm every hook fires. - Read
docs/llm-wiki/01-getting-started.mdfor the long-form guide.
- Run
Hook enforcement
SessionStartprints the schema-reminder preamble the first time a vault is opened — this is owned by Layer 4, not this skill.PreToolUsefrontmatter validation blocks any Write to a scaffolded file whose frontmatter does not match the schema. Surface those failures to the user; do not try to bypass them.
Completion signal
Print exactly one of these shapes:
READY: vault scaffolded at <vault-path>; schema version 2; git repo initialised; settings persisted; verify-ingest clean.READY: vault repaired at <vault-path> (<N> files added); schema version 2; git repo initialised; settings persisted; verify-ingest clean.READY: existing vault at <vault-path>; <N> pages, last log <date>; git repo present; settings persisted.WARN: vault at <vault-path> ready but verify-ingest reported: <message>. Settings persisted; no scaffold changes overwritten.
The git repo initialised / git repo present note in the READY line confirms the vault is its own git repo after init completes.
FAILED: is reserved for cases where set-vault.sh itself cannot write
settings (filesystem permission error) — every other condition must resolve
to a READY: or WARN: outcome.
The pipeline agent (claude-wiki-pages-ingest-agent) looks for the READY: prefix when
chaining onboarding with an immediate first ingest.
After the READY: or WARN: line, always print exactly one trailing
NEXT_STEP: line with this shape:
NEXT_STEP: ingest_pending=<true|false> raw_count=<N> recommended=<claude-wiki-pages-ingest-agent|none>
ingest_pending=truewhen one or more files in<vault>/raw/are not yet referenced in<vault>/wiki/log.mdingest entries; otherwisefalse.raw_countis the count of unreferenced raw files (0 when pending is false).recommendedisclaude-wiki-pages-ingest-agentwhen pending is true, otherwisenone.
The claude-wiki-pages-orchestrator-agent (Layer 4 dispatch for
/claude-wiki-pages:wiki) parses this line to decide whether the user's session
should chain into an immediate ingest or end here. A missing or malformed
NEXT_STEP: line breaks the orchestrator's chaining contract and is a Tier 1
test failure.