wiki-setup
ar9av/obsidian-wiki
Initialize a new Obsidian wiki vault with structure, config, and special files.
What is wiki-setup?
Sets up a new Obsidian vault from scratch with the correct directory structure, configuration files, and metadata tracking. Use this when starting a fresh wiki, initializing vault structure, or repairing an existing setup.
- Creates vault directory structure with categories (concepts, entities, skills, references, synthesis, journal) and special folders (_archives, _raw, _staging)
- Generates .env configuration file with paths for vault location, source documents, Claude history, and optional QMD semantic search
- Creates special metadata files (index.md, log.md, hot.md) to track wiki state and recent activity
- Configures .obsidian/ with minimal JSON settings for optimal out-of-box Obsidian experience
- Optionally installs Stop hook for auto-capturing session findings to wiki at Claude Code session end
- Verifies complete setup with sanity checks on directories and configuration files
How to install wiki-setup
npx skills add https://github.com/ar9av/obsidian-wiki --skill wiki-setup- Obsidian installed locally
- Node.js and npm (to run the skill installer)
- Absolute file paths for vault and source directories
How to use wiki-setup
- 1.Run the skill installer: npx skills add https://github.com/ar9av/obsidian-wiki --skill wiki-setup
- 2.Answer prompts for vault location (default: ~/Documents/obsidian-wiki-vault) and source directories
- 3.Optionally configure Claude history import path, QMD semantic search, token budget warnings, and staged writes mode
- 4.Review the generated .env file and adjust paths if needed
- 5.Open the vault in Obsidian via File → Open Vault
- 6.Run wiki-status to see available sources for ingestion
- 7.Run wiki-ingest to add your first sources or claude-history-ingest to import Claude conversations
Use cases
- Starting a new personal or team knowledge base from scratch
- Initializing an Obsidian vault for the first time with proper wiki structure
- Repairing or reconfiguring a broken existing vault setup
- Setting up semantic search integration with QMD for enhanced wiki querying
- Enabling staged writes workflow for team wikis where all LLM-written pages require human review before publication
- Knowledge workers building personal wikis or team knowledge bases
- Developers integrating Claude Code with Obsidian for session-based knowledge capture
- Teams requiring staged review of AI-generated documentation
- Users wanting to organize Claude conversation history and project notes in a structured vault
wiki-setup FAQ
Run wiki-setup to repair or reconfigure your existing vault. It will preserve your .env if it exists and recreate missing directories and special files.
No, QMD is optional. If not configured, wiki-query and wiki-ingest fall back to Grep-based search automatically. Install QMD only if you want semantic search capabilities.
When WIKI_STAGED_WRITES=true, all new/updated pages land in _staging/ first for human review. Run /wiki-stage-commit to promote them to their final location. Useful for team wikis and high-stakes domains.
Yes. The optional Stop hook installs into ~/.claude/settings.json and automatically prompts /wiki-capture --quick at session end if meaningful work was done.
index.md is your wiki homepage (auto-maintained), log.md tracks all vault operations with timestamps, and hot.md maintains a ~500-word semantic snapshot of recent activity and key takeaways.
Full instructions (SKILL.md)
Source of truth, from ar9av/obsidian-wiki.
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:
-
Where should the vault live? →
OBSIDIAN_VAULT_PATH- Default:
~/Documents/obsidian-wiki-vault - Must be an absolute path (after expansion)
- Default:
-
Where are your source documents? →
OBSIDIAN_SOURCES_DIR- Can be multiple paths, comma-separated
- Default:
~/Documents
-
Want to import Claude history? →
CLAUDE_HISTORY_PATH- Default: auto-discovers from
~/.claude - Set explicitly if Claude data is elsewhere
- Default: auto-discovers from
-
Have QMD installed? →
QMD_WIKI_COLLECTION/QMD_PAPERS_COLLECTION/QMD_TRANSPORT- Optional. Enables semantic search in
wiki-queryand source discovery inwiki-ingest. - Default to
QMD_TRANSPORT=mcpunless the user wants the agent to call the localqmdCLI directly. - If using CLI mode, set
QMD_CLI_SEARCH_MODE=qualityby default; suggestbalancedif reranking is too slow. - If unsure, skip for now — both skills fall back to
Grepautomatically. - Install instructions: see
.env.example(QMD section).
- Optional. Enables semantic search in
-
Token budget warning threshold? →
WIKI_TOKEN_WARN_THRESHOLD- Default:
100000(warn when full-wiki read would cost > 100K tokens) - Set to
0to disable the warning entirely wiki-statusshows a token footprint table and emits this warning automatically
- Default:
-
Enable staged writes? →
WIKI_STAGED_WRITES- Default: unset /
false(pages written directly to their final location) - Set to
truefor 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-committo review and promote them wiki-statusshows a "Staged writes pending" count when files are waiting
- Default: unset /
Step 2: Create Vault Directory Structure
mkdir -p "$OBSIDIAN_VAULT_PATH"/{concepts,entities,skills,references,synthesis,journal,projects,_archives,_raw,_staging,.obsidian}
.obsidian/— Obsidian's own config. Creates vault recognition.projects/— Per-project knowledge (populated during ingest)._archives/— Stores wiki snapshots for rebuild/restore operations._raw/— Staging area for unprocessed drafts. Drop rough notes here;wiki-ingestwill promote them to proper wiki pages and move the originals into_raw/_archived/(created on first use)._staging/— Review queue for LLM-written pages whenWIKI_STAGED_WRITES=true. Pages here are not visible in Obsidian's graph until promoted via/wiki-stage-commit.
Step 3: Create Special Files
index.md
---
title: Wiki Index
---
# Wiki Index
*This index is automatically maintained. Last updated: TIMESTAMP*
## Concepts
*No pages yet. Use `wiki-ingest` to add your first source.*
## Entities
## Skills
## References
## Synthesis
## Journal
log.md
---
title: Wiki Log
---
# Wiki Log
- [TIMESTAMP] INIT vault_path="OBSIDIAN_VAULT_PATH" categories=concepts,entities,skills,references,synthesis,journal
hot.md
---
title: Hot Cache
updated: TIMESTAMP
---
# Hot Cache
*A ~500-word semantic snapshot of recent activity. Updated after every major write operation.*
## Recent Activity
- [TIMESTAMP] INIT — vault created at OBSIDIAN_VAULT_PATH
## Active Threads
*None yet — start ingesting sources to populate.*
## Key Takeaways
*None yet.*
## Flagged Contradictions
*None yet.*
Step 4: Create .obsidian Configuration
Create minimal Obsidian config for a good out-of-box experience:
.obsidian/app.json
{
"strictLineBreaks": false,
"showFrontmatter": false,
"defaultViewMode": "preview",
"livePreview": true
}
.obsidian/appearance.json
{
"baseFontSize": 16
}
Step 5: Recommend Obsidian Plugins
Tell the user about these recommended community plugins (they install manually):
- Dataview — Query page metadata, create dynamic tables. Essential for a wiki.
- Graph Analysis — Enhanced graph view for exploring connections.
- Templater — If they want to create pages manually using templates.
- Obsidian Git — Auto-backup the vault to a git repo.
Step 6: Verify Setup
Run a quick sanity check:
- Vault directory exists with:
concepts/,entities/,skills/,references/,synthesis/,journal/,projects/,_archives/,_raw/ -
index.mdexists at vault root -
log.mdexists at vault root -
hot.mdexists at vault root -
.envhasOBSIDIAN_VAULT_PATHset -
.obsidian/directory exists -
_staging/directory exists (required even whenWIKI_STAGED_WRITESis not set — created on setup for future use) - Source directories (if configured) exist and are readable
Report the results and tell the user they can now:
- Open the vault in Obsidian (File → Open Vault → select the directory)
- Run
wiki-statusto see what's available to ingest - Run
wiki-ingestto add their first sources - Run
claude-history-ingestto mine their Claude conversations - Run
codex-history-ingestto mine their Codex sessions (if they use Codex) - Run
wiki-statusagain anytime to check the delta
Optional: Install the Stop Hook (Auto-Capture)
Ask the user: "Want to auto-capture findings at session end?"
If yes, install the Stop hook into their global Claude Code settings so that every session
with meaningful work automatically prompts /wiki-capture --quick before closing.
What the hook does: reads the session transcript on Stop, counts file edits and shell
calls, and if significant work happened, asks Claude to run /wiki-capture --quick once.
The wiki-capture quick-mode KEEP/SKIP gate prevents noise — routine or
inconclusive sessions are skipped automatically.
Installation steps:
-
Find the obsidian-wiki repo path (the directory where this skill lives). If
OBSIDIAN_WIKI_REPOis set in config, use that. Otherwise, check common locations:~/Documents/projects/obsidian-wiki,~/obsidian-wiki, or ask the user. -
Merge the hook entry into
~/.claude/settings.json:
{
"hooks": {
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash <REPO_PATH>/.claude/hooks/wiki-stop-capture.sh"
}
]
}
]
}
}
If ~/.claude/settings.json already exists and has a hooks.Stop array, append the new
entry rather than replacing — don't clobber existing hooks.
- Confirm: "Stop hook installed. Claude Code will prompt
/wiki-capture --quickat the end of any session where you write files or run ≥ 4 shell commands."
To uninstall later: remove the hook entry from ~/.claude/settings.json or set
HIVEMIND_CAPTURE=false in your shell to skip capture for a single session.
Optional: Refresh QMD After Setup
If QMD_WIKI_COLLECTION is configured and the local QMD CLI is available, run qmd update after the initial vault files exist so the fresh vault is immediately queryable. No embedding pass is usually needed at setup time because the vault starts empty, so a plain update is enough unless you have already populated pages.
Related skills
More from ar9av/obsidian-wiki and the wider catalog.

wiki-stage-commit
>

wiki-status
Audit your wiki's ingest status, delta, and token footprint—decide whether to append or rebuild.

wiki-switch
Switch between multiple Obsidian vault profiles and manage named configurations.

wiki-synthesize
Discover and create synthesis pages connecting co-occurring concepts across your Obsidian wiki.

wiki-update
Sync project knowledge into your Obsidian wiki from any directory.

altimate-data-engineering-skills
Claude Code skills for analytics and data engineers working with dbt, Snowflake, and data pipelines