kb-index

kb-index is a skill for Claude Code from atman-33/workhub. It costs 51 tokens per session (1,905 once invoked), scanned A, original, MIT.

An index maintenance tool for a Workhub knowledge base. It updates lists of documents in project, knowledge, archive, and archived-task folders based on what changed.

In plain words
What is it for?
Use it to refresh indexes, rebuild them fully, update one knowledge-base area, or preview changes without writing them.
Why use it?
It prevents folder indexes from becoming out of date after documents are added, moved, or removed.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the workhub plugin — 21 skills, 1 agent shipped together

Good fit Use it to refresh indexes, rebuild them fully, update one knowledge-base area, or preview changes without writing them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atman-33/workhub/kb-index
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.

Any agent
npx skills add atman-33/workhub --skill kb-index
Clone the repo
git clone --depth 1 https://github.com/atman-33/workhub

Made for: Claude Code.

Or install workhub, the plugin that ships this one along with the rest of its 21 skills, 1 agent.

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/atman-33/workhub/kb-index.svg)](https://agentmods.dev/skills/atman-33/workhub/kb-index)
Your own site
<a href="https://agentmods.dev/skills/atman-33/workhub/kb-index"><img src="https://agentmods.dev/badge/skills/atman-33/workhub/kb-index.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,905 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00051 $0.01905
Opus 5 $0.00026 $0.00953
Sonnet 5 $0.00010 $0.00381
Haiku 4.5 $0.00005 $0.00191

Measured 4d ago against content hash 53cd7a4bafda, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 4d 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.

plugins/workhub/skills/kb-index/SKILL.md · 206 lines

How it starts

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

KB Index — Smart Index Update

Update the vault's _index.md files efficiently. By default, detects what changed and updates only affected entries. Full rebuild available when needed.

Indexed zones and their index files:

Zone Index
projects/ projects/_index.md
knowledge/ knowledge/_index.md
archive/ archive/_index.md
tasks/archive/ tasks/archive/_index.md

The board index tasks/_index.md and _ai/index/tasks.json are managed by the workhub app — never rebuild them here. tasks/archive/_index.md is a different file (a summary of completed/inactive tasks) and is managed by this command. inbox/ and journal/ are intentionally unindexed.

Usage

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

3-Tier 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. 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. Do not re-render from templates/_index.md.template in this mode.

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 from templates/_index.md.template.

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 each zone _index.md (10-20 lines each)
  Extract: listed items, last updated date

Step 2: DETECT changes (cheap — tool calls only, no file reads)
  For each zone:
    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

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

Step 5: LOG
  Append to _ai/logs/kb-log.md:
  "[date] index-update | added N, removed M | touched K zones"

Read the full file on GitHub · 206 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. 4d ago First seen · 206 lines · 51 tokens per session scan A 53cd7a4bafda

Subscribe to this mod's changes

kb-index is a skill published in the GitHub repository atman-33/workhub (2 stars, last pushed 2d ago), licensed MIT. It adds 51 tokens to every session and 1,905 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-09-03.

Related

Other skills, from other repositories

gonavi-cli

Operate databases through the GoNavi headless CLI — the gonavi executable shipped in verified GitHub Release archives. Covers listing/adding/importing saved connections, running SQL queries against saved connections or ad-hoc connection files, exporting result sets to csv/json/md/html/xlsx, batch-executing SQL files…

Syngnat/GoNavi · 144 tokens

ucai-patterns

Use when the user asks about Claude Code best practices, how to write agents, how to use hooks, how to manage context, or how to work effectively with Claude Code's native systems.

Joncik91/ucai · 42 tokens

memory-curator

Use at session-close when a session captured several new memories, or on-demand, to consolidate, deduplicate, prune, and structure the beads memory store. Triggers on "curate memories", "clean up memories", "memory sweep".

DollarDill/beads-superpowers · 52 tokens

memory

Use this skill when Pioneer should proactively use durable memory or recalled context: decide whether memory can improve a turn, answer from remembered user/project facts, request memory tools, search/list/get stored memories, save durable preferences or project decisions, forget memories, audit or clean up memory, or…

pioneerdotai/pioneer · 64 tokens

orient

Use when user invokes /orient with a topic keyword, entity type, project name, time qualifier, or combination. Also triggers on "what do we know about X", "remind me about X", "where did we leave off on X". Provides targeted context loading — searches the MCP Memory Server graph, knowledge files, journal entries, and…

harnessprotocol/harness-kit · 80 tokens

capture

Use when user invokes /capture to capture information from the current conversation into a staging file for later reflection and knowledge graph processing. Accepts no arguments (auto-extract), specific facts as text, or filter keywords like "decisions" or "technical". Do NOT use when the user wants to write directly…

harnessprotocol/harness-kit · 73 tokens