kb-refresh

kb-refresh is a skill for Claude Code from olegvg/olegvg-skills. It costs 77 tokens per session (3,122 once invoked), scanned B, original, MIT.

A skill for updating a repository's .kb knowledge base after selected source files or folders change. A knowledge base here is a set of stored summaries and indexes about the code.

In plain words
What is it for?
Use it to refresh specified corpus paths, update affected summaries and indexes, and record the new refresh point.
Why use it?
It keeps those summaries aligned with recent changes instead of leaving outdated information for later work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the kb-for-agents plugin — 6 skills shipped together , and of olegvg-skills

Good fit Use it to refresh specified corpus paths, update affected summaries and indexes, and record the new refresh point.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/olegvg/olegvg-skills/kb-refresh
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 olegvg/olegvg-skills --skill kb-refresh
Clone the repo
git clone --depth 1 https://github.com/olegvg/olegvg-skills

Made for: Claude Code.

Or install kb-for-agents, the plugin that ships this one along with the rest of its 6 skills.

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-refresh

README.md
[![agentmods](https://agentmods.dev/badge/skills/olegvg/olegvg-skills/kb-refresh/github.svg)](https://agentmods.dev/skills/olegvg/olegvg-skills/kb-refresh)
Your own site
<a href="https://agentmods.dev/skills/olegvg/olegvg-skills/kb-refresh"><img src="https://agentmods.dev/badge/skills/olegvg/olegvg-skills/kb-refresh/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kb-refresh

Your own site · 80×15
<a href="https://agentmods.dev/skills/olegvg/olegvg-skills/kb-refresh"><img src="https://agentmods.dev/badge/skills/olegvg/olegvg-skills/kb-refresh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,122 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00077 $0.03122
Opus 5.5 $0.00031 $0.01249
Sonnet 5.5 $0.00015 $0.00624
Haiku 4.5 $0.00008 $0.00312

Measured 11d ago against content hash 324f79048bf2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

kb-refresh scanned grade B with 1 finding 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 11d 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.

Subtle steeringmediumPrompt injection

Instructions that bias recommendations or shape behaviour without the user noticing.

- **Drift artifact is optional fuel, not a contract.** If it exists and matches, reuse it. If not, do the work yourself. Never warn the user about a stale artifact — silently ignore.
skills/kb-refresh/SKILL.md · 186 lines

How it starts

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

kb-refresh — Synchronize .kb/ After Corpus Changes

When to use

User invokes /kb-refresh <path1> [<path2> ...] after making changes to the corpus. Manual, targeted operation. Never automatic.

If the user did not specify any path, do not infer the scope from git status or pick "the whole corpus" silently — even in non-interactive / auto modes. Either ask, or invoke kb-check-drift first (see step 0 below) and propose specific paths. A bare refresh against the whole corpus is the most expensive form of this skill and almost never what the user wants.

Input

  • One or more paths — subdirectories or files within the corpus. Multi-path is the preferred form when several scopes need refreshing in the same pass; it does one git diff and one state advance over the union of paths.
  • --base-sha <sha> (optional) — override .kb/.kb-state.json:last_linted_sha. Use the same base for each invocation when splitting one batch.
  • --no-advance-state (optional) — refresh without writing the watermark. Use it on each split invocation before the final successful one.

Scope budget (hard gates)

These limits exist to keep the main agent's context bounded. Check them after step 3 (diff). If a gate trips, switch flow as instructed — do not plow ahead in the main context.

Signal Soft threshold Hard threshold
Changed source files (excluding .kb/) 15 25
Diff insertions+deletions across scope 1500 lines 3000 lines
.kb/summaries/** files needing edits 8 15
Distinct KB areas touched 3 5
  • Below soft threshold: proceed inline (steps 5–8).
  • Between soft and hard threshold: switch to multi-area subagent dispatch (step 5b). Do not attempt inline patching.
  • At or above hard threshold: STOP. Report the count and ask the user to narrow scope (split <path> into subpaths and re-invoke per area), or to run kb-build for the affected area if it has structurally changed.

The thresholds are calibrated to "one main-agent context window can hold the diff, the relevant summaries, and the edits to them without compaction." Cross any of them and the refresh is no longer a refresh — it is a partial rebuild.

Read the full file on GitHub · 186 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago Changed · +3 lines 324f79048bf2
  2. 12d ago Changed b60111a58bdd
  3. 3mo ago First seen · 183 lines · 77 tokens per session scan B 1bf9736ec4ba

Subscribe to this mod's changes

kb-refresh is a skill published in the GitHub repository olegvg/olegvg-skills (10 stars, last pushed 12d ago), licensed MIT. It adds 77 tokens to every session and 3,122 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (subtle steering). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

kb-refresh compared with skills from other repositories

kb-refresh next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kb-refresholegvg/olegvg-skillsSkill1012d agoMITB77Claude Code
engram-digesttechtheist/engramSkill3714d agoMITA98Claude Code
engram-sleeptechtheist/engramSkill3714d agoMITA114Claude Code
engramtechtheist/engramSkill3714d agoMITA78Claude Code
thoughtline-memoryAgusLoza2021/ThoughtlineSkill49d agoMITA40Claude Code
bootstrap-llm-synthesisdigipulse-engineering/GAAI-frameworkSkill16413d agononeA69Claude Code, Codex
memory-delta-triagedigipulse-engineering/GAAI-frameworkSkill16413d agononeA58Claude Code, Codex