kb-refresh

kb-refresh is a skill for Claude Code, Codex from techwolf-ai/ai-first-toolkit. It costs 46 tokens per session (1,221 once invoked), scanned A, original, MIT.

A command for adding sources to a knowledge base or re-scraping existing sources for updates. The supported sources include Notion, Slack, Confluence, and local files.

In plain words
What is it for?
Use it to import new documents, add knowledge sources, or refresh information that has changed since the last scrape.
Why use it?
It keeps the knowledge base current without rebuilding it from scratch and checks whether the required setup already exists.

Skill for Claude CodeCodex

Part of the knowledge-base plugin — 4 skills 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/techwolf-ai/ai-first-toolkit/kb-refresh
Any agent
npx skills add techwolf-ai/ai-first-toolkit --skill kb-refresh
Clone the repo
git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit

Made for: Claude Code, Codex.

Or install knowledge-base, the plugin that ships this one along with the rest of its 4 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/techwolf-ai/ai-first-toolkit/kb-refresh.svg)](https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/kb-refresh)
Your own site
<a href="https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/kb-refresh"><img src="https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/kb-refresh.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,221 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.00046 $0.01221
Opus 5 $0.00023 $0.00611
Sonnet 5 $0.00009 $0.00244
Haiku 4.5 $0.00005 $0.00122

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

Security

Grade A, and why

kb-refresh 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/knowledge-base/skills/kb-refresh/SKILL.md · 126 lines

How it starts

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

KB Refresh

Add content from new sources or update existing KB entries from their original sources.

When to Use

  • Adding a new knowledge source (Notion page, Slack channel, etc.) after initial setup
  • Re-scraping sources to pick up recent changes
  • Importing additional documents into the KB

Prerequisites

Check that kb/ and kb/.kb-config.yaml exist. If not, tell the user to run /setup-knowledge-base first.

Step 1: Understand Current KB

Read the KB config and index to understand what's already there:

kb/.kb-config.yaml
kb/index.md

Run the index script to see the current state:

python3 scripts/kb-index.py

Step 2: Discover Sources

Ask the user (use AskUserQuestion with multiSelect):

"What sources do you want to add or refresh?"

  • Notion pages
  • Slack channels
  • Confluence pages
  • Local files or folders
  • Other

Collect Entry Points

For each selected source, ask the user for the entry point:

Source What to ask MCP tool
Notion Page URL (will scrape the page and all subpages recursively) notion-fetch with the page URL, then notion-search or notion-get-page-descendants for child pages
Slack Channel name(s) to extract knowledge from slack_read_channel to read recent messages
Confluence Space key or page URL getConfluencePage + getConfluencePageDescendants for recursive scraping
Local files Directory path or file paths Read tool directly

Step 3: Choose Processing Mode

Ask the user (use AskUserQuestion):

"Process one at a time or all in parallel?"

  • One at a time (review each before continuing)
  • All in parallel (faster, review at the end)

Step 4: Scrape and Extract

For each source, launch a subagent (or process sequentially, per the user's choice):

You are populating a knowledge base from an external source.

SOURCE: {source_type}: {url_or_path}

KB CATEGORIES (place entries in the most relevant one):
{list of categories from .kb-config.yaml}

EXISTING ENTRIES (avoid duplicating these):
{output from kb-index.py}

INSTRUCTIONS:
1. Read/scrape the source content using the appropriate tool
2. For Notion/Confluence: follow all child pages and subpages recursively
3. For Slack: focus on pinned messages, bookmarks, and high-signal threads (not casual chat)
4. Split the content into distinct topics. Create one .md file per topic, not one giant file.
5. If an existing entry covers the same topic, UPDATE it rather than creating a duplicate.
   Read the existing file first, merge the new information, and update last_updated.
5a. For org-context KBs (company/team/personal knowledge, not just policy docs), actively hunt for these content types — they are the most commonly missed:
    - **Stakeholders**: one entry per key person (role, ownership areas, how to reach them, what they care about). Without these, the KB can't answer "who should I talk to about X?".
    - **Projects**: one entry per initiative (goal, owner, status, links). Distinct from generic "strategy" entries.
    - **Repositories / codebases**: one entry per repo (purpose, key files, how to run, ownership).
    - **Customer examples**: keep concrete names (e.g., "Acme Corp", "Globex") that make abstract concepts tangible. Don't strip them for anonymity unless the user asks.
6. For new entries, create a file in kb/{category}/ with this format:

---
title: "Topic Title"
description: "Brief one-liner for index lookup"
category: {category}
tags: [{relevant}, {tags}]
sources: ["{source_url_or_path}"]
last_updated: "{today's date}"
---


## Content

Write clear, quotable statements. Each fact should be independently citable.

7. Use lowercase-with-hyphens for filenames: product-overview.md, data-encryption.md
8. Preserve specifics: exact numbers, dates, names, versions
9. No opinions or speculation, only facts from the source
10. Skip content that is outdated, trivial, or not worth preserving

REPORT: When done, list all files created or updated with their category and a one-line description.

Read the full file on GitHub · 126 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 · 126 lines · 46 tokens per session scan A 03acdb19fdb5

Subscribe to this mod's changes

kb-refresh is a skill published in the GitHub repository techwolf-ai/ai-first-toolkit (98 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 1,221 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

memory-sync

Review the auto-extracted candidates in .claude/memory/pending.md and commit keepers to the canonical memory files (landmarks.md, libraries.md, decisions.md, landmines.md, conventions.md, pending-questions.md, backlog.md). Invoke at session start when the SessionStart hook reports pending candidates, or any time…

friedbotstudio/baseline · 99 tokens

notion

Read, create, and update Notion pages and databases via the Notion REST API.

taracodlabs/aiden · 20 tokens

obsidian

Read, search, and create notes in Obsidian vaults.

taracodlabs/aiden · 16 tokens

research

Workflow Phase 3 — Research and Solution Exploration. Surfaces 2–4 candidate solution approaches with concrete tradeoffs, grounded in current library docs (fetched through the provider named in .claude/docs-provider.json) — never in training-data recall. Output lives at docs/research/ .md. Candidate ranking and the…

friedbotstudio/baseline · 96 tokens

sprint-planner

Propose the next dependency-ready sprint from the ALREADY-DECOMPOSED roadmap — standup's active sibling. Reads docs/roadmap-execution-plan.md + the memory backlog, computes per-task readiness from the roadmap's machine-readable status, orders with roadmap-planner's graph engine, and emits a proposed task-set…

friedbotstudio/baseline · 134 tokens

faithful-capture

Capture what someone actually said without contaminating it with your own inference. Invoke when eliciting intent in conversation (design discussion, requirement interview, decision surfacing) and when turning a conversation into a durable record (ADR, decision node, memory entry, spec ## Decisions row). Enforces…

friedbotstudio/baseline · 111 tokens