# Wiki Import

Import a wiki graph into the current vault from graph.json or an OKF/markdown bundle.

- Repository: https://github.com/Ar9av/obsidian-wiki (3650 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Ar9av/obsidian-wiki --skill wiki-import -g -a claude-code -y`
Codex: `npx skills add Ar9av/obsidian-wiki --skill wiki-import -g -a codex -y`
Cursor: `npx skills add Ar9av/obsidian-wiki --skill wiki-import -g -a cursor -y`
Gemini CLI: `npx skills add Ar9av/obsidian-wiki --skill wiki-import -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add Ar9av/obsidian-wiki`

## Description

Import a wiki graph into the current vault from graph.json or an OKF/markdown bundle. Use for transferring previously exported wiki content between vaults; pair with wiki-export for the reverse direction.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Wiki Import, Reconstruct Pages from an Export

You are importing a vault's knowledge into the current vault from one of two sources produced by `wiki-export`:

- **`graph.json`**, the graph skeleton. Reconstructs page **stubs** (frontmatter, typed relationships, a `## Related` link list, no body). Lossy.
- **OKF bundle** (a `wiki-export/okf/` directory), the actual markdown files. Reconstructs **full pages** with their real bodies. Lossless. Use this for true vault-to-vault transfer.

Either way, the import writes pages with correct frontmatter and wikilinks, then updates all vault metadata. **Step 2, Step 3 (graph only), and Step 5 are shared; Step 4 forks by source type.**

## Before You Start

**Writing profile:** Before drafting or rewriting natural-language Markdown, read and apply the `Writing Profile Resolution` section in `llm-wiki/SKILL.md`. Framework schema, provenance, safety, and operation-specific requirements take precedence.
Preserve imported source prose; apply `WRITING.md` preferences only to newly generated metadata or stubs.

1. **Resolve config**, follow the Config Resolution Protocol in `llm-wiki/SKILL.md` (inline `@name` override → walk up CWD for `.env` → global config → prompt setup). This gives `OBSIDIAN_VAULT_PATH`.
2. Read `$OBSIDIAN_VAULT_PATH/AGENTS.md` if it exists, apply any owner-specific conventions.

## Step 1: Locate and Detect Source Type

**Find the import source:**
- If the user provided a path argument, use it directly.
- Otherwise auto-detect, in order: `./wiki-export/okf/` (a directory) → `./wiki-export/graph.json` (a file).
- If neither exists, ask the user for the path.

The rest: https://github.com/Ar9av/obsidian-wiki/blob/HEAD/.skills/wiki-import/SKILL.md
