Skip to main content
ClaudeWave
Install in Claude Code
Copy
git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit /tmp/kb-refresh && cp -r /tmp/kb-refresh/plugins/knowledge-base/skills/kb-refresh ~/.claude/skills/kb-refresh
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# 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:
```bash
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.
```

## Step 5: Review

After all sources are processed:
1. Run `python3 scripts/kb-index.py --write` to regenerate `kb/index.md`'s "All Files by Category" section from the current KB.
2. Run `python3 scripts/kb-validate.py` to catch missing frontmatter, bad categories, or broken `related:` links.
3. Run `python3 scripts/kb-validate.py --max-age 90` (or a shorter window if the source changes faster) to surface entries that have drifted since their last refresh.
4. Spot-check discoverability with `python3 scripts/kb-search.py "<term the refresh should have covered>"` to confirm new entries are searchable.
5. Present a summary: X entries created, Y entries updated, from Z sources. Flag any warnings, errors, or stale entries.
6. Ask the user if they want to add more sources or are done.
session-searchSkill

Find context from past Claude Code (CLI) and Claude Cowork (desktop) sessions on this Mac. Use when the user wants to recall something they did before but can't find it , phrasings like "where did I work on X", "find that session where I…", "when did I last do Y", "pull up the conversation about Z", "that time I built/tried/discussed …". Searches by kind (code/cowork), time range, title, working directory, or free-text content across all transcripts.

task-profileSkill

Mine the user's Claude Code + Cowork session history into a structured task profile, what they do with AI, how often, how successfully where friction lives, then propose atomic skills that would reduce iteration. Use when the user asks to "analyse my Claude use", "build a task profile", "what tasks do I do with Claude", "where am I spending tokens", "what skills would help me", or mentions reviewing past sessions for patterns. Produces profile.csv (shareable), explorer.html (personal coaching view with AI-first principle comparison + token-spend chart), and skill-proposals.md.

token-doctorSkill

Personal diagnosis of where your Claude Code + Cowork spend goes. Reads local transcripts, prints your conversation length distribution, marathon share, cache rebuild costs, and per-project diagnosis (good projects and problem projects) right in the terminal. Then offers a deeper dive that fans out parallel Haiku subagents over your most expensive (and most efficient) sessions and writes a tight Markdown report. Use when the user asks "why is my Claude spend so high", "where am I burning tokens", "diagnose my Claude habits", "audit my Claude usage", or asks for a personal token-cost diagnosis.

ai-firstifySkill

Analyze, re-engineer, or bootstrap projects to align with AI-first design principles. Use when asked to review, audit, improve, 'ai-firstify', or start a new project. Performs deep analysis across 7 dimensions, actively restructures existing projects, or guides new project setup through discovery questions. Based on the 9 design principles and 7 design patterns from the TechWolf AI-First Bootcamp.

analyze-performanceSkill

Analyze engagement patterns across published posts to identify what works. Use when asked to review performance, find successful patterns, or optimize future content.

brainstorm-linkedinSkill

Generate LinkedIn post ideas from external sources (files, URLs, research). Use when the user provides source material (PDFs, URLs, articles) to brainstorm topics. NOT for writing or developing drafts - use write-linkedin-post instead.

brainstorm-opinionSkill

Generate opinion piece ideas from recent LinkedIn posts (last 30 days). Use when asked to find opinion topics, brainstorm article ideas, or cross-pollinate content between LinkedIn and opinion pieces.

content-studioSkill

Entry point for the TechWolf content-studio plugin. Use to understand the workflow, pick the right content skill, or start setup for a new author/repository.