Skip to content
Agent Memory
Skill

/wiki

LLM Wiki — persistent, compounding knowledge base inside Obsidian. Use when the user says "/llm-wiki:wiki", "wiki init", "wiki ingest", "wiki query", "wiki lint", or asks about managing a knowledge base wiki.

BOOST
From plugin
llm-wiki
1121 skill1 command1 hook
Install
$ npx -y skills add ekadetov/llm-wiki --skill wiki --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/wiki

Context preview

The summary Claude sees to decide when to auto-load this skill.

LLM Wiki — persistent, compounding knowledge base inside Obsidian. Use when the user says "/llm-wiki:wiki", "wiki init", "wiki ingest", "wiki query", "wiki lint", or asks about managing a knowledge base wiki.

SKILL.md

wiki.SKILL.md
name: wiki
description: >-
  LLM Wiki — persistent, compounding knowledge base inside Obsidian.
  Use when the user says "/llm-wiki:wiki", "wiki init", "wiki ingest",
  "wiki query", "wiki lint", or asks about managing a knowledge base wiki.
argument-hint: init <name> | ingest <path|url> | compile [<path>] | query <question> | lint | remove <name>

LLM Wiki

Persistent, compounding knowledge base inside an Obsidian vault.

Operations

/llm-wiki:wiki init my-topic
/llm-wiki:wiki ingest ~/ObsidianVault/03-Resources/my-topic/raw/article.md
/llm-wiki:wiki ingest https://example.com/article
/llm-wiki:wiki query "What is X?"
/llm-wiki:wiki lint

---

Active Wiki Detection

Walk up from `cwd` looking for a directory containing **both** `CLAUDE.md` and a `wiki/` subfolder.

1. Start at `cwd`. Check if `CLAUDE.md` and `wiki/` exist in the current directory. 2. If found → that directory is the **active wiki root**. Read `CLAUDE.md` for schema. 3. If not found → move to parent directory and repeat until filesystem root. 4. If no wiki found anywhere in the path, prompt the user: > "Which wiki should I use?" List available wikis by running: `ls -d ~/ObsidianVault/03-Resources/*/wiki 2>/dev/null` and presenting the parent directory names.

---

qmd Availability

Reference paths used throughout this skill:

QMD="env -u BUN_INSTALL ${CLAUDE_PLUGIN_DATA}/node_modules/.bin/qmd"
MARP="${CLAUDE_PLUGIN_DATA}/node_modules/.bin/marp"

**Check:** Test if `"${CLAUDE_PLUGIN_DATA}/node_modules/.bin/qmd"` exists and is executable via Bash: `test -x "${CLAUDE_PLUGIN_DATA}/node_modules/.bin/qmd"`.

**Important:** Always invoke qmd via `env -u BUN_INSTALL` to force Node.js runtime. If `BUN_INSTALL` is set in the environment, qmd runs under Bun, which uses a SQLite build without extension loading support and cannot load sqlite-vec.

  • **If present:** use it for `query` and `embed` operations. ALWAYS use the full path — never bare `qmd`.
  • **If absent:** fall back to reading `wiki/index.md` manually and grepping wiki files.

---

`init <name>`

Create a new wiki scaffold under the Obsidian vault.

Steps

1. **Check if wiki already exists:** If `~/ObsidianVault/03-Resources/<name>/` exists, abort with: "Wiki '<name>' already exists at ~/ObsidianVault/03-Resources/<name>/. Use `wiki remove <name>` first, or choose a different name."

2. Create directory structure:

    mkdir -p ~/ObsidianVault/03-Resources/<name>/raw/articles
    mkdir -p ~/ObsidianVault/03-Resources/<name>/raw/attachments
    mkdir -p ~/ObsidianVault/03-Resources/<name>/wiki/queries
    mkdir -p ~/ObsidianVault/03-Resources/<name>/outputs/reports

3. Write `~/ObsidianVault/03-Resources/<name>/CLAUDE.md` using the **CLAUDE.md template** below (fill in `<name>`).

4. Write `~/ObsidianVault/03-Resources/<name>/wiki/index.md` using the **index.md template** below.

5. Write `~/ObsidianVault/03-Resources/<name>/log.md` using the **log.md template** below.

6. Write `~/ObsidianVault/03-Resources/<name>/.gitignore` using the **.gitignore template** below.

7. Write `~/ObsidianVault/03-Resources/<name>/qmd.yml` using the **qmd.yml template** below.

8. Commit to vault git:

   git -C ~/ObsidianVault add "03-Resources/<name>/" && git -C ~/ObsidianVault commit -m "init: <name> wiki"

9. If qmd available:

   "${QMD}" collection add ~/ObsidianVault/03-Resources/<name>/wiki --name <name> && "${QMD}" embed --collection <name>

10. Print Web Clipper setup instruction:

     Obsidian Web Clipper setup:
     1. Install: https://obsidian.md/clipper
     2. In clipper settings, set Destination folder to:
        03-Resources/<name>/raw/articles
     3. Set filename template to: {{date:YYYY-MM-DD}}-{{title}}
     4. After clipping, run: /llm-wiki:wiki ingest ~/ObsidianVault/03-Resources/<name>/raw/articles/<clipped-file>.md

---

`ingest <path|url>`

Acquire a source and save it to the raw library. Does NOT create wiki pages — use `compile` for that.

Steps

1. **Detect active wiki** (see Active Wiki Detection). Read `CLAUDE.md` for schema.

2. **Acquire source:**

  • If input is a **URL**: use the WebFetch tool to retrieve content.
  • If input is a **file path**: read the file directly.
  • If the source file is in `raw/` directly (not in a subdirectory), read it from there. Sources saved before the `raw/articles/` convention are still valid.

3. **Classify** the source as one of: `article` | `paper` | `transcript` | `conversation` | `image-set`.

4. **Save to raw library:** Write to `raw/articles/YYYY-MM-DD-<slug>.md` with frontmatter:

   ---
   date: YYYY-MM-DD
   source-type: <classification>
   source-url: <original URL or file path>
   title: <extracted or inferred title>
   compiled: false
   ---

If input was a file path already in `raw/`, skip this step (source is already saved).

5. **Append to `log.md`:**

   ## [YYYY-MM-DD] ingest | <title>
   Saved <source-type> from <source> to raw/articles/.

6. **Commit:**

   git -C ~/ObsidianVault add "03-Resources/<wiki-name>/" && git -C ~/ObsidianVault commit -m "ingest: <title>"

7. **Print:** "Source saved to raw/articles/<filename>. Run `wiki compile` to integrate into the wiki."

---

`compile [<path>]`

Read raw sources and create/update wiki pages with entity extraction and cross-references.

  • If `<path>` is given: compile that specific raw source.
  • If no argument: scan `raw/articles/` for sources without a corresponding source-summary page in `wiki/`, and compile those.

Steps

1. **Detect active wiki.** Read `CLAUDE.md` for schema and templates.

2. **Identify sources to compile:**

  • If path argument given: use that file.
  • Otherwise: list files in `raw/articles/`. For each, check if a corresponding source-summary page exists in `wiki/` (match by slug or title). Compile any source without a matching summary.

-

Read more
Ships withllm-wiki

A Claude Code plugin that builds persistent, compounding knowledge bases inside Obsidian using the Karpathy LLM Wiki pattern. Ingest sources, query synthesized knowledge, lint for gaps — all from your Claude Code session.

Get the whole plugin
Stats
112
Stars
15
Forks
Quiet
Maintenance
Python
Language
MIT
License
6mo ago
Last commit
6mo ago
Created
3h ago
Added

Repo: ekadetov/llm-wiki