Build, maintain, and query an autonomous wiki knowledge base inside an Obsidian vault. Trigger when the user wants to: set up a new wiki vault, ingest source documents into wiki pages, query compiled wiki knowledge with citations, lint wiki pages for broken links or stale content, manage wiki page scores, or rebuild the wiki search index. Trigger phrases: "set up wiki vault", "ingest into wiki", "query the wiki", "lint wiki links", "wiki knowledge base", "score wiki pages", "rebuild wiki index". Do NOT trigger for: general Wikipedia references, markdown syntax questions, or knowledge management discussions that don't involve an Obsidian vault.
An autonomous, self-compounding knowledge base in an Obsidian vault. You ingest raw sources (articles, PDFs, code, docs), synthesize them into interlinked wiki pages with [[wikilinks]], and periodic linting keeps everything consistent. Knowledge is pre-synthesized and cross-referenced — not re-queried from raw documents each time.
The human sources material and asks questions. You handle summarizing, cross-referencing, filing, and bookkeeping.
Three layers: Raw Sources (immutable inputs) → Wiki Pages (synthesized knowledge) → Index/Schema (coordination files).
Three operations: Ingest (source → pages), Query (search → answer), Lint (health checks).
When the user asks to set up a new wiki:
Ask language preference — store in .manifest.json as "language": "<code>" (e.g. "zh-CN", "en"). All wiki content uses this language; technical terms and proper nouns stay in their original language. Default to the user's current language if unspecified.
Check dependencies — verify required and optional packages:
python3 -c "import yaml; print('Python OK')"
node -e "console.log('Node.js OK')"
pyyaml and Node.js 18+ are required. mineru is optional (document extraction). Ask before installing into a venv:
python3 -m venv <vault-path>/.venv
<vault-path>/.venv/bin/pip install pyyaml "mineru[all]"
Create vault structure:
<vault-root>/
├── .obsidian/app.json # Minimal Obsidian config
├── raw/ # Immutable source documents
│ └── .manifest.json # Source tracking (hash, pages, language)
├── wiki/ # Synthesized knowledge pages
├── index.md # Page catalog by category
├── log.md # Append-only operation history
├── schema.md # Copy from references/schema.md
└── .stats.json # Page scoring counters
Initialize files — create index.md, log.md, schema.md (from references/schema.md), .manifest.json, .stats.json with their initial content (see Coordination Files section for schemas).
Start PGlite sidecar — required for search index and DatabaseBackend:
node <skill-dir>/scripts/sidecar/server.js --data-dir <vault-path>/index
This auto-initializes the schema on first run. Listens on port 5488 by default.
Build the search index:
python <skill-dir>/scripts/index.py rebuild <vault-path>
Register with Obsidian (if installed): open "obsidian://open?path=<vault-path>"
Gitignore the vault directory if inside a tracked repo.
The subdirectories under both raw/ and wiki/ are not prescribed — they emerge from the content. The agent discovers files by scanning recursively. Common patterns include concepts/, entities/, topics/, sources/, queries/ — but let the content dictate the taxonomy.
Every wiki page has two zones separated by ---:
See references/schema.md for full templates and examples.
---