Skill detail
wiki-setup
Directly initializes and repairs Obsidian wiki vaults.
Inspect before use
Automated review checks relevance, not safety or endorsement. Read the source instructions before using this skill.
SKILL.md
The saved excerpt is a snapshot from review. The external source remains the complete and most current version.
---
name: wiki-setup
description: >
Initialize a new Obsidian wiki vault with the correct structure, special files, and configuration.
Use this skill when the user wants to set up a new wiki from scratch, initialize the vault structure,
create the .env file, or says things like "set up my wiki", "initialize obsidian", "create a new vault",
"get started with the wiki". Also use when the user needs to reconfigure their existing vault or
fix a broken setup.
---
# Obsidian Setup — Vault Initialization
You are setting up a new Obsidian wiki vault (or repairing an existing one).
## Step 1: Create .env
If `.env` doesn't exist, create it from `.env.example`. Ask the user for:
1. **Where should the vault live?** → `OBSIDIAN_VAULT_PATH`
- Default: `~/Documents/obsidian-wiki-vault`
- Must be an absolute path (after expansion)
2. **Where are your source documents?** → `OBSIDIAN_SOURCES_DIR`
- Can be multiple paths, comma-separated
- Default: `~/Documents`
- Local git repo clones (public or private, any host) can be listed here too — clone
the repo locally first, then add its path. See "Ingesting Git Repositories" in
`wiki-ingest/SKILL.md` for how repo sources are handled.
3. **Want to import Claude history?** → `CLAUDE_HISTORY_PATH`
- Default: auto-discovers from `~/.claude`
- Set explicitly if Claude data is elsewhere
4. **Have QMD installed?** → `QMD_WIKI_COLLECTION` / `QMD_PAPERS_COLLECTION` / `QMD_TRANSPORT`
- Optional. Enables semantic search in `wiki-query` and source discovery in `wiki-ingest`.
- Default to `QMD_TRANSPORT=mcp` unless the user wants the agent to call the local `qmd` CLI directly.
- If using CLI mode, set `QMD_CLI_SEARCH_MODE=quality` by default; suggest `balanced` if reranking is too slow.
- If unsure, skip for now — both skills fall back to `Grep` automatically.
- Install instructions: see `.env.example` (QMD section).
- **If `QMD_WIKI_COLLECTION` is set, verify the collection excludes `_raw/`.** The wiki
collection and papers collection must stay disjoint — `wiki-query` cites them as
separate layers (compiled knowledge vs. raw staging), and `OBSIDIAN_VAULT_PATH` contains
`_raw/`, so a plain `qmd collection add <vault>` silently merges the two.
Read `~/.config/qmd/index.yml`, find the entry for `$QMD_WIKI_COLLECTION`, and check its
`ignore` list includes `_raw/**` (and ideally `log.md`, which has no semantic value). If
the collection doesn't exist yet, create it (`qmd collection add "$OBSIDIAN_VAULT_PATH"
--name <collection-name>`), then add the `ignore` block to `index.yml` by hand — `qmd`
has no `--ignore` flag and refuses a second `collection add` on a path that already has
one, so editing the YAML is the only way to scope it. Run `qmd update` after editing.
If the collection already exists without the `ignore` block, tell the user their
wiki collection is indexing `_raw/` (including `_raw/_archived/` drafts left behind by
`wiki-ingest`) and offer to add the `ignore` block and re-run `qmd update`.
5. **Token budget warning threshold?** → `WIKI_TOKEN_WARN_THRESHOLD`
- Default: `100000` (warn when full-wiki read would cost > 100K tokens)
- Set to `0` to disable the warning entirely
- `wiki-status` shows a token footprint table and emits this warning automatically
6. **Enable staged writes?** → `WIKI_STAGED_WRITES`
- Default: unset / `false` (pages written directly to their final location)
- Set to `true` for team wikis, high-stakes domains, or any vault where the human wants final say on every LLM-written page
- When enabled: all new/updated pages land in `_staging/` first; run `/wiki-stage-commit` to review and promote them
- `wiki-status` shows a "Staged writes pending" count when files are waiting
## Step 2: Create Vault Directory Structure
```bash
mkdir -p "$OBSIDIAN_VAULT_PATH"/{concepts,entities,skills,references,synthesis,journal,projects,_archives,_raw,_staRead the full source on GitHub (opens external page)