AGENT SKILL

kb-bootstrap

Sets up the knowledge base for a project. Creates the KB config, directory structure, and appends minimal instructions to the project's CLAUDE.md. Run this once when first using KB skills in a new project.

License 许可
MIT
最近更新
2026-04-09
Stars
★ 1
Forks
0

01 前言 Front Matter

name
kb-bootstrap
description
Sets up the knowledge base for a project. Creates the KB config, directory structure, and appends minimal instructions to the project's CLAUDE.md. Run this once when first using KB skills in a new project.
argument-hint
[kb-path]

02 资源文件 91

03 SKILL.md 正文

/kb-bootstrap — KB Setup

Sets up KB configuration and appends minimal instructions to the project's CLAUDE.md.

1. Check Prerequisites

Run which uv. If not found:

uv is required but not installed. Install it via your package manager:

brew install uv        # macOS
pip install uv         # pip

See uv installation docs for other methods. Then restart your terminal and re-run /kb-bootstrap.

Stop if uv is not available.

2. Check Existing Config

Check if .claude/knowledge-base/config.json already exists.

  • Exists: Tell user "KB is already configured." Show current kb_roots entries. Ask if they want to add another KB or re-run the CLAUDE.md update. If neither, stop.
  • Does not exist: Continue to Step 3.

3. Choose KB Location

If $ARGS provides a path, use it. Otherwise, ask the user using AskUserQuestion:

  • Options: "Use ./knowledge/ (Recommended)", "Custom path"
  • If custom: ask for the path

4. Create Config and Structure

  1. Create .claude/knowledge-base/config.json:

    {
      "kb_roots": [
        { "name": "core", "path": "./<chosen-path>" }
      ]
    }
    
  2. Create the KB directory and CHANGELOG.md:

    <kb-path>/
    └── CHANGELOG.md
    
  3. Initialize CHANGELOG.md:

    # Changelog
    

5. Update CLAUDE.md

Read the project's CLAUDE.md (if it exists). Append the content from assets/claude-md-snippet.md — do NOT replace existing content. If the file doesn't exist, create it with only the snippet content.

6. Confirm

Tell the user: "KB is set up. You can start learning with /kb-learn."

04 同仓库更多 Skills

farzadshbfn
farzadshbfn/knowledge-plugin

kb-view

Opens the KB viewer in the browser. Starts a local HTTP server that renders all configured knowledge bases with working links, fuzzy search, and knowledge graph visualization.

★ 1
farzadshbfn
farzadshbfn/knowledge-plugin

kb-monitor

Monitors KB usage patterns and skill health. Activates when KB access tracking detects frequently-read content that could become a skill, or when user corrections suggest a skill is underperforming. Also triggers on `this isn't working right`, `this skill keeps getting X wrong`, `convert this to a skill`, or `what should become a skill`. Tracks cross-session observations via memory.

★ 1
farzadshbfn
farzadshbfn/knowledge-plugin

kb-mint

Mints skills from KB topics, packages skills into plugins, and prepares them for Cowork. Use when asked to create a skill from KB content, convert to a plugin, package for distribution, or make something cowork-ready. Also triggers on `convert this to a skill`, `package as plugin`, `mint a skill`, or `make this a plugin`.

★ 1
farzadshbfn
farzadshbfn/knowledge-plugin

kb-learn

Manages a personal knowledge base with learning tracking. Modes: (1) learn from articles, (2) learn about topics, (3) fix errors. Uses markdown links with relative paths for cross-references. Maintains a rolling changelog, validates links, and keeps a markdown-compatible knowledge base. When a note reaches ~500 lines, suggests /kb-compact.

★ 1
farzadshbfn
farzadshbfn/knowledge-plugin

kb-find

Read-only KB discovery with progressive 4-tier loading and --challenge mode for counter-evidence.

★ 1
farzadshbfn
farzadshbfn/knowledge-plugin

kb-compact

Compacts KB directories — extracts legacy, unifies terminology, splits oversized notes, fixes indexes, reconciles with skill folders. Default: single directory. Use --deep for recursive bottom-up traversal.

★ 1