kb-index

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

A tool for keeping document lists and counts in an Obsidian knowledge base up to date. It can update only changed entries or rebuild the indexes from all documents.

In plain words
What is it for?
Use it after adding or moving knowledge-base documents, when an index seems outdated, or when updating only one category.
Why use it?
It removes the need to manually find moved, added, or missing documents in the indexes. A preview mode lets you check changes before they are written.

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-index
Any agent
npx skills add ernestolee13/para-knowledge-base --skill kb-index
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-index

README.md
[![agentmods](https://agentmods.dev/badge/skills/ernestolee13/para-knowledge-base/kb-index.svg)](https://agentmods.dev/skills/ernestolee13/para-knowledge-base/kb-index)
Your own site
<a href="https://agentmods.dev/skills/ernestolee13/para-knowledge-base/kb-index"><img src="https://agentmods.dev/badge/skills/ernestolee13/para-knowledge-base/kb-index.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,908 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.1 $0.00038 $0.01908
Opus 5 $0.00019 $0.00954
Sonnet 5 $0.00008 $0.00382
Haiku 4.5 $0.00004 $0.00191

Measured 5d ago against content hash 96528c737472, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

kb-index 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 5d 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-index/SKILL.md · 203 lines

How it starts

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

KB Index — Smart Index Update

Update indexes efficiently. By default, detects what changed and updates only affected entries. Full rebuild available when needed.

Configuration and exclusions

If .para-kb/config.json exists, use its para_roots, index_file_names, and exclusions instead of assuming numbered folder names. Never treat .para-kb/, the Obsidian config directory, the active telemetry JSONL, telemetry archives, runtime state, or generated reports as knowledge documents or index entries.

Usage

/kb-index                      # Smart update (diff-based, fast)
/kb-index --full               # Full rebuild (scan everything)
/kb-index --category Projects  # Update one category only
/kb-index --dry-run            # Preview changes without writing

Update Strategy

Choose the lightest approach that fits the situation:

Tier 1: Per-File Update (via kb-ingest) — ~200 tokens

When: A single file was ingested or moved. How: kb-ingest already handles this — adds one line to _index.md, updates counts. No need to run kb-index separately.

Tier 2: Smart Diff Update (default kb-index) — ~500-1500 tokens

When: A few files changed, or "something feels off." How: Compare existing _index.md entries against actual files on disk. Only process differences.

Tier 3: Full Rebuild (kb-index --full) — ~3-4K tokens

When: Major reorganization, initial setup, or indexes are badly corrupted. How: Scan everything from scratch, regenerate all indexes.

Tier 2: Smart Diff — Execution Flow

This is the default behavior when you run /kb-index.

Step 1: READ existing indexes (cheap — ~200 tokens total)
  Read top-level index.md (~30 lines)
  Read PARA category _index.md files
  If a changed file is inside a project folder and that folder has _index.md, read that project hub too
  Extract: listed items, counts, last updated date

Step 2: DETECT changes (cheap — tool calls only, no file reads)
  For each PARA category:
    Glob: list current subdirectories and .md files on disk
    Compare against items listed in _index.md
    Classify each item:
      MATCH    — in index AND on disk → skip (no action)
      ADDED    — on disk but NOT in index → needs adding
      REMOVED  — in index but NOT on disk → needs removing

  If zero differences found:
    Log "[date] index | no changes detected" → done
    Total cost: ~200 tokens (just reading indexes + globs)

Step 3: PROCESS only differences
  For ADDED items only:
    Read the new file's overview/frontmatter (~50-100 tokens per file)
    Generate one-line index entry

  For REMOVED items:
    Delete the line from _index.md

  Skip MATCH items entirely — don't re-read, don't regenerate

Step 4: UPDATE indexes
  Edit (not rewrite) each affected _index.md:
    Insert new entries, remove deleted entries
    Update summary count line
    Update "updated: {today}" in frontmatter

  Update top-level index.md:
    Adjust category counts
    Update Recent Activity from log.md (last 5 entries)

  If a changed file is inside a project folder that has _index.md:
    Update the project hub, especially its local document list and updated date

Step 5: LOG
  "[date] index-update | added N, removed M | touched K categories"

Read the full file on GitHub · 203 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. 5d ago First seen · 203 lines · 38 tokens per session scan A 96528c737472

Subscribe to this mod's changes

kb-index is a skill published in the GitHub repository ernestolee13/para-knowledge-base (21 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 1,908 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

ingest

Ingest a URL, file, raw text, or Inbox item into the LLM Wiki with the purpose gate, mothership link search, raw-source preservation, Wiki compilation, index/log update, and review; also responds to /ingest and 인제스트.

johnfkoo951/cmds-llm-wiki · 56 tokens

render-output

Convert vault content into downstream outputs like memos, reports, slide outlines, diagrams, and plot specifications.

arnaudgelas/K-Ops · 24 tokens

wiki-ingest

Ingest exactly one research paper or source document into an open-llm-wiki vault. Use when the user explicitly asks to add, ingest, process, or publish a paper into the wiki. The workflow parses the source, drafts a source page, runs independent QA, publishes only after the quality gate passes, extracts and normalizes…

AIwork4me/open-llm-wiki · 116 tokens

llm-wiki

Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern. Extension-backed with auto-generated metadata, guardrails, and 14 custom tools (+3 opt-in agent-trajectory tools).

zosmaai/pi-llm-wiki · 52 tokens

youtube-fetcher

Turn a YouTube video into a structured, Obsidian-ready archival Markdown note containing its transcript, creator metadata, description, chapters, language, and capture provenance. Use when a user shares a YouTube URL or video ID and wants transcripts, captions, subtitles, notes, a knowledge-base record, summarization…

JimmySadek/youtube-fetcher-to-markdown · 102 tokens

papers-download-from-list

Uses colocated paper download tools to download, verify, and repair local PDFs from obsidian-vault/paperlist.csv rows so that obsidian-vault/paperPDFs/ stays complete and deduplicated. Use when candidate rows are in state=Wait and should become Downloaded before the formal analysis chain.

RipeMangoBox/BITE · 75 tokens