knowledge-base-from-vault

knowledge-base-from-vault is a skill for Claude Code, Codex from skrun-dev/skrun. It costs 91 tokens per session (1,451 once invoked), scanned A, original, MIT.

A tool that turns a folder of Markdown notes into a searchable, linked static website packed as a ZIP file. It also tracks repeated concepts across runs to build a denser index over time.

In plain words
What is it for?
Use it to publish an Obsidian vault, Notion export, or documentation folder as a navigable knowledge base with related concepts and pages.
Why use it?
It makes scattered notes easier to browse and find without requiring a note-taking app or manual page linking.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/skrun-dev/skrun/knowledge-base-from-vault
Any agent
npx skills add skrun-dev/skrun --skill knowledge-base-from-vault
Clone the repo
git clone --depth 1 https://github.com/skrun-dev/skrun

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for knowledge-base-from-vault

README.md
[![agentmods](https://agentmods.dev/badge/skills/skrun-dev/skrun/knowledge-base-from-vault.svg)](https://agentmods.dev/skills/skrun-dev/skrun/knowledge-base-from-vault)
Your own site
<a href="https://agentmods.dev/skills/skrun-dev/skrun/knowledge-base-from-vault"><img src="https://agentmods.dev/badge/skills/skrun-dev/skrun/knowledge-base-from-vault.svg" alt="Measured on agentmods" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,451 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00091 $0.01451
Opus 5 $0.00046 $0.00726
Sonnet 5 $0.00018 $0.00290
Haiku 4.5 $0.00009 $0.00145

Measured 3d ago against content hash 9f4540a8ddc4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

knowledge-base-from-vault scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/build_site_zip.ts, scripts/read_vault.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/knowledge-base-from-vault/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Knowledge Base from Vault

You are a knowledge curator. You take a folder of unstructured Markdown notes and turn it into a polished, navigable static site (single kb.zip artifact). Across multiple runs, you maintain a concept graph — terms that appear in multiple vaults gain count and importance, building a richer index over time.

State you receive

If this is not the first run, the runtime injects Previous state containing the concept graph:

{
  "concept_graph": {
    "event-sourcing": {
      "count": 3,
      "first_seen_run": "2026-04-15",
      "last_seen_run": "2026-04-22",
      "related_pages": ["concepts/event-sourcing.html", "how-to/event-replay.html"]
    }
  },
  "runs_processed": 4
}

If no state, treat as the first run with concept_graph: {} and runs_processed: 0.

Workflow

  1. Read the vault — call read_vault with the user's vault_dir. The tool returns an array of:

    { path, slug, title, frontmatter, headings, internal_links, content_preview }
    

    where internal_links are both [[wiki-style]] and [markdown](url) references.

  2. Extract concepts — for each note, identify 3–7 key concepts:

    • Extract candidates from H2/H3 headings, bolded terms, and [[wiki-links]].
    • Normalize to kebab-case, lowercase.
    • Skip generic terms ("the", "and", "introduction"), short tokens (< 3 chars), and stopwords.
  3. Update the concept graph (deep merge with prior state):

    • For each concept seen in this run:
      • If new: add { count: 1, first_seen_run: today, last_seen_run: today, related_pages: [pages_containing_it] }.
      • If existing: increment count, update last_seen_run to today, union related_pages with new findings.
    • Today is derived from the run date — use 2026-04-26 if no other source available.
  4. Build the index pageindex.html body:

    • Site title H1
    • Short paragraph (1-2 sentences) describing the vault's contents (synthesize from note titles)
    • "All notes" section: a <ul> with one <li> per note (linked to its slug.html)
    • "Concept index" section: a <ul> of the top concepts by count (descending). Each item: concept name + count badge (e.g., "event-sourcing (3 runs)") linked to a fragment on the page or to a per-concept page if you generated one.
    • "Stats" footer: <p> with pages_count, concept_count, runs_processed.

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 92 lines · 91 tokens per session scan A 9f4540a8ddc4

Subscribe to this mod's changes

knowledge-base-from-vault is a skill published in the GitHub repository skrun-dev/skrun (208 stars, last pushed 3mo ago), licensed MIT. It adds 91 tokens to every session and 1,451 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.