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.
npx agentmods add skills/hraness/wrench/refresh-kbnpx skills add hraness/wrench --skill refresh-kbgit clone --depth 1 https://github.com/hraness/wrenchWrote 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.
[](https://agentmods.dev/skills/hraness/wrench/refresh-kb)<a href="https://agentmods.dev/skills/hraness/wrench/refresh-kb"><img src="https://agentmods.dev/badge/skills/hraness/wrench/refresh-kb.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00066 | $0.01396 |
| Opus 5 | $0.00033 | $0.00698 |
| Sonnet 5 | $0.00013 | $0.00279 |
| Haiku 4.5 | $0.00007 | $0.00140 |
Grade A, and why
refresh-kb 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.
Copies of this mod
2 near-identical copies found in the catalogue:
- refresh-kb — 100% identical, 0 lines differ
- refresh-kb — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refresh a knowledge base
Use a refresh-review-check loop. Keep authored prose under deliberate editorial control. A managed vault gives the marked catalog region to the tool; an authored vault leaves its complete front door untouched.
1. Locate the vault
- Resolve
<vault>to the directory containing its managed or authoredindex.md, then set the shell-localKB_ROOTto that path (KB_ROOT=kbfrom a typical repository root, orKB_ROOT=.from inside the vault). - When the change concerns
scopes/or ankb:contextmarker, resolve the repository root and setKB_REPOto that path (KB_REPO=.from the repository root). - Read the vault's applicable agent instructions and note conventions before editing.
- Preserve note voice, frontmatter, filenames, and link intent unless a reported finding justifies a specific change.
2. Refresh derived state
When several agents are still editing a managed vault, do not refresh its shared catalog in each lane. Validate the lane's Markdown and graph facts with:
kb check --root "$KB_ROOT" --no-catalog
The integrating agent performs the managed refresh once after the lanes join.
An authored vault declares kb_catalog: authored in index.md; its refresh has
no catalog write and is safe from that shared generated-file hotspot.
Run:
kb refresh --root "$KB_ROOT"
In managed mode this command atomically updates only the marked catalog region
in index.md. In authored mode it reports the index as authored and leaves the
file unchanged. Use kb catalog --root "$KB_ROOT" for a disposable exhaustive
inventory in either mode. Catalog links are navigation, so they do not count as
contextual graph edges.
3. Review the advisories
Open every reported source line and the relevant target notes before deciding whether to edit.
- Repair a broken wikilink only when its intended target is clear. Otherwise, report the uncertainty.
- Repair a broken or ambiguous typed relationship only after confirming its exact canonical target and predicate from the source note.
- Disambiguate a wikilink with a vault-root path only after confirming the author's intent.
- Treat a contextual orphan as a prompt to inspect the note, not as a demand to add a link.
- Treat an unlinked title or alias mention as a candidate, not proof that the sentence should link.
- Add a contextual wikilink only when it improves the meaning or navigation of the sentence.
- Repair a missing, escaping, ambiguous, case-mismatched, symlinked, or hard-linked local image, PDF, or tldraw target. External URLs remain outside this attachment gate.
- When a repository-owned wrapper adds lifecycle findings, treat them as
migration advisories: active plans should have descriptions and exact
repository_scopes, in-progress plans should retain execution evidence, terminal plans should record a result and durable-memory disposition, and maintained notes should declaretype: noteortype: concept. - When a repository-owned scope audit reports an absent active or maintained
scope, inspect it as possible stale routing. Future paths may intentionally
be absent; terminal records may intentionally retain retired paths. The
portable
kb refreshandkb checkcommands do not impose this lifecycle policy by themselves.
What ships with it
2 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.
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.
- 3d ago First seen · 141 lines · 66 tokens per session scan A 9227ba6e77f3
refresh-kb is a skill published in the GitHub repository hraness/wrench (4 stars, last pushed 3d ago), licensed MIT. It adds 66 tokens to every session and 1,396 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-31.
Other skills, from other repositories
knowledge-base
Build and maintain a company knowledge base as a wiki of interlinked markdown notes in the workspace — a private, compounding Wikipedia. Use when the user wants to start or organize a knowledge base / wiki, ingest sources (URLs, documents, pasted notes) into it, ask questions answered from it, or audit (lint) it.…
gno
Search local documents, files, notes, and knowledge bases. Index directories, search with BM25/vector/hybrid, get AI answers with citations. Use when user wants to search files, find documents, query notes, look up information in local folders, index a directory, set up document search, build a knowledge base, needs…
kb
Operate a hraness/kb local-first Markdown knowledge base for coding-agent memory. Use when a user asks to search or query a KB or Obsidian vault; load repository context, plans, decisions, concepts, backlinks, semantic search, or Git provenance; save, clip, scrape, or archive a URL, article, social thread, signed-in…
context-canvas-memory
Use for compaction, coordination, or two complexity cues.
stats
Show Captain Memo's corpus statistics (chunks per channel, observation counts, indexing progress, embedder info). Use when the user types /captain-memo:stats.
search
Hybrid search across Captain Memo's local memory + skills + observations. Use when the user types /captain-memo:search to retrieve top hits without the model having to decide whether to call searchall on its own.