kb-init

kb-init is a skill for Claude Code, Codex from ernestolee13/para-knowledge-base. It costs 52 tokens per session (1,534 once invoked), scanned A, original, MIT.

A setup workflow for adding a portable PARA knowledge-base layer to an existing Obsidian vault. PARA is a way to organize notes into Projects, Areas, Resources, and Archive, and the workflow creates configuration, indexes, logs, and shared guidance when needed.

In plain words
What is it for?
Use it when starting a knowledge base in an existing Obsidian vault or adopting an existing numbered or unnumbered PARA layout.
Why use it?
It avoids renaming an existing vault structure and prepares the files that agents need to work with the notes consistently. It also detects the vault's layout and available Obsidian search tools.

Skill for Claude CodeCodex

Part of the para-knowledge-base plugin — 5 skills, 3 hooks shipped together

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/ernestolee13/para-knowledge-base/kb-init
Any agent
npx skills add ernestolee13/para-knowledge-base --skill kb-init
Clone the repo
git clone --depth 1 https://github.com/ernestolee13/para-knowledge-base

Made for: Claude Code, Codex.

Or install para-knowledge-base, the plugin that ships this one along with the rest of its 5 skills, 3 hooks.

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 kb-init

README.md
[![agentmods](https://agentmods.dev/badge/skills/ernestolee13/para-knowledge-base/kb-init.svg)](https://agentmods.dev/skills/ernestolee13/para-knowledge-base/kb-init)
Your own site
<a href="https://agentmods.dev/skills/ernestolee13/para-knowledge-base/kb-init"><img src="https://agentmods.dev/badge/skills/ernestolee13/para-knowledge-base/kb-init.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,534 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.00052 $0.01534
Opus 5 $0.00026 $0.00767
Sonnet 5 $0.00010 $0.00307
Haiku 4.5 $0.00005 $0.00153

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

Security

Grade A, and why

kb-init 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.

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.

skills/kb-init/SKILL.md · 137 lines

How it starts

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

KB Init — PARA Knowledge Base Setup

Set up the Knowledge Base layer on an existing PARA-structured Obsidian vault.

What It Does

  1. Detect vault — find .obsidian/ and existing .para-kb/config.json
  2. Detect structure — use configured, numbered, or unnumbered PARA roots without renaming folders
  3. Create portable config — write .para-kb/config.json without an absolute vault path
  4. Create indexes and log — only for missing files, unless the user explicitly requests replacement
  5. Install agent guidance — append a marker-bounded KB rules fragment to CLAUDE.md and/or AGENTS.md, preserving existing content
  6. Detect Obsidian CLI — configure the preferred search/backlink path and fallback strategy

Prerequisites

An Obsidian vault with either numbered or unnumbered PARA folders. Numbered example:

Vault/
├── 0. Common/        (shared: daily notes, dashboard, etc.)
├── 1. Projects/      (active projects with deliverables)
├── 2. Areas/         (ongoing responsibilities, no end date)
├── 3. Resources/     (reference material by topic)
├── 4. Archive/       (completed or paused items)
└── Inbox/            (optional — raw input landing zone)

Standard unnumbered roots (Common/, Projects/, Areas/, Resources/, Archive/) are also supported. For another layout, create .para-kb/config.json from templates/para-kb.config.json and set para_roots explicitly. Inbox/ is optional in every profile.

Execution Flow

Step 1: Detect vault root and configuration
  Find .obsidian/ directory → that parent is the vault root
  If .para-kb/config.json exists → validate and use it as source of truth
  Else detect numbered or standard PARA roots
  If neither profile is unambiguous → stop before creating folders and request a custom config

Step 2: Create/adopt portable config
  Resolve the bundled helper from ${CLAUDE_PLUGIN_ROOT:-${PLUGIN_ROOT:-}}
  Run: python3 "$PARA_KB_PLUGIN_ROOT/scripts/para_kb_telemetry.py" init-config --profile auto
  The config stores only vault-relative paths and never overwrites an existing valid config
  With --config-only or --adopt → stop after config + agent guidance; do not rewrite notes or indexes

Step 3: Check existing state
  If _index.md or index.md already exist:
    Default → preserve and adopt them
    --force-indexes → replace only after an explicit destructive confirmation
  Never overwrite CLAUDE.md, AGENTS.md, .para-kb/config.json, or a human log wholesale

Step 4: Scan and generate _index.md per category
  For each configured PARA directory:
    List subdirectories and standalone .md files
    Read overview files for status (0.*.md, *-Project.md, project-overview.md)
    Generate _index.md:
      - frontmatter: title, type: kb-index, updated: today
      - summary line with counts
      - one line per item: **name** — status/description
    Target: 10-20 lines of content per index

Step 5: Generate top-level {common}/index.md
  Aggregate from category indexes:
    Projects: count + highlights
    Areas: count + major areas
    Resources: count + categories
    Archive: completed/paused counts
    Recent: placeholder for log entries
  Target: ~30 lines

Step 6: Create {common}/log.md
  Header + initial entry:
    "[date] init | KB initialized | N index files created"

Step 7: Update agent guidance
  Render templates/KB-RULES.md.template with configured roots and paths
  If CLAUDE.md exists → append/update only the marker-bounded PARA KB section
  If AGENTS.md exists → append/update only the same marker-bounded section
  If neither exists → create the file appropriate to the active host from its wrapper template
  Never replace unrelated instructions in either file
  Shared rules include:
    Vault structure description
    KB operation rules (ingest/query/lint)
    Project lifecycle summary (promotion, durable-knowledge capture, decompose-before-archive — see templates/CLAUDE.md.template)
    Tag conventions (#proj/, #type/, #topic/)
    Wikilink rules
    Index management rules

Step 8: Detect tooling
  which obsidian → if found:
    Run: obsidian version
    Run: obsidian tags sort=count counts limit=20
    Log "obsidian CLI v{version} detected — search, backlinks, tags available"
    Record existing tag conventions for future ingest/lint use
  If not found:
    Log "obsidian CLI not available — using grep/glob fallback"
    Note: All skills fully functional without CLI

Read the full file on GitHub · 137 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 · 137 lines · 52 tokens per session scan A c32b5ee25a33

Subscribe to this mod's changes

kb-init is a skill published in the GitHub repository ernestolee13/para-knowledge-base (21 stars, last pushed 27d ago), licensed MIT. It adds 52 tokens to every session and 1,534 once invoked, about $0.0003 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.