Agent skill

Setup Knowledge Base

by techwolf-ai in techwolf-ai/ai-first-toolkit

Interactive onboarding to create a structured knowledge base.

MITAuto-check passedKnowledge Management

Install Setup Knowledge Base

skills CLI
$ npx skills add techwolf-ai/ai-first-toolkit --skill setup-knowledge-base -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install techwolf-ai/ai-first-toolkit setup-knowledge-base --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/knowledge-base/skills/setup-knowledge-base .claude/skills/setup-knowledge-base && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
setup-knowledge-base
GitHub stars
132
Token cost
~1.2k tokens
SKILL.md length
535 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Interactive onboarding to create a structured knowledge base.

  • Works in 7 steps: Discover Purpose → Confirm Plan → Scaffold the KB → …
  • Tasks that involve Knowledge bases
  • SKILL.md covers When to Use, Step 1: Discover Purpose, Step 2: Confirm Plan and Step 3: Scaffold the KB, plus 4 more sections
  • Calls python3

What it does

Setup Knowledge Base is an agent skill from techwolf-ai/ai-first-toolkit. Interactive onboarding to create a structured knowledge base. Defines categories, scaffolds the directory structure, creates the index, and optionally imports initial content. Run this first before using /kb-answer or /kb-import.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering Knowledge bases and Project scaffolding. The repository describes itself as: Open-source Claude Code skills and Codex skills for AI-first work. Audit, re-engineer, and bootstrap projects with AI-first design principles. The licence is MIT.

When your agent uses it

  • Tasks that involve Knowledge bases
  • Tasks that involve Project scaffolding

Example prompts

  • “/setup-knowledge-base”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Discover Purpose
  2. Confirm Plan
  3. Scaffold the KB
  4. Create Project CLAUDE.md
  5. Populate from Sources
  6. Verify
  7. Summary

What it can do on your machine

Read from SKILL.md and the folder at commit 2ee7841. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Setup Knowledge Base loads about 1.2k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 535 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from techwolf-ai/ai-first-toolkit at commit 2ee7841, republished under its MIT licence (© techwolf-ai). 535 words, ~1,215 tokens.

Download SKILL.mdSave it as .claude/skills/setup-knowledge-base/SKILL.md (or your agent's skills folder).
name
setup-knowledge-base
description
Interactive onboarding to create a structured knowledge base. Defines categories, scaffolds the directory structure, creates the index, and optionally imports initial content. Run this first before using /kb-answer or /kb-import.

Knowledge Base Setup

Interactive setup that creates a structured, evidence-backed knowledge base in your project.

When to Use

  • Starting a new knowledge base from scratch
  • Adding a KB to an existing project

Step 1: Discover Purpose

Ask the user (one question at a time, use AskUserQuestion):

  1. What is this KB for? (e.g., product documentation, security/compliance, company knowledge, sales enablement, internal policies)
  2. Who will query it? (e.g., you personally, your team, AI agents answering questions)
  3. What categories make sense? Suggest 3-5 based on the domain, let the user adjust.

Example category suggestions by domain:

  • Product docs: technical, integrations, deployment, security, faq
  • Company knowledge: general, policies, processes, teams, faq
  • Sales enablement: product, competitive, customer-success, pricing, faq
  • Security/compliance: security, compliance, technical, general, faq

Step 2: Confirm Plan

Before creating anything, present the plan to the user:

I'll create this structure in your project:

kb/
  .kb-config.yaml
  index.md
  scopes/
    _default.yaml
    README.md
  {category1}/
  {category2}/
  {category3}/
scripts/
  kb-index.py
  kb-verify.py
  kb-validate.py
  kb-search.py
CLAUDE.md (or append to existing)

Ready to proceed?

Wait for user confirmation.

Step 3: Scaffold the KB

Read the template files from this plugin and adapt them for the user's project:

  1. Read templates/kb/.kb-config.yaml from this plugin. Create kb/.kb-config.yaml in the user's project, replacing the placeholder categories with the ones chosen in Step 1. Replace {{today}} with today's date.

  2. Read templates/kb/index.md from this plugin. Create kb/index.md, adding seed keywords for each chosen category. For example, if the user chose "security" and "technical", add initial keyword entries:

    | encryption, certificates, access | security/ |
    | API, architecture, deployment | technical/ |
  3. Read templates/kb/scopes/_default.yaml from this plugin. Copy to kb/scopes/_default.yaml.

  4. Read templates/kb/scopes/README.md from this plugin. Copy to kb/scopes/README.md.

  5. Create empty directories for each chosen category: kb/{category1}/, kb/{category2}/, etc.

  6. Read scripts/kb-index.py from this plugin. Copy to scripts/kb-index.py in the user's project.

  7. Read scripts/kb-verify.py from this plugin. Copy to scripts/kb-verify.py in the user's project.

  8. Read scripts/kb-validate.py from this plugin. Copy to scripts/kb-validate.py in the user's project.

  9. Read scripts/kb-search.py from this plugin. Copy to scripts/kb-search.py in the user's project.

Step 4: Create Project CLAUDE.md

Read templates/CLAUDE.md from this plugin. Create (or append to existing) CLAUDE.md in the user's project root. Replace {{category}} placeholders with the actual categories chosen in Step 1.

Show full SKILL.md (207 more words)Show less

Step 5: Populate from Sources

The KB structure is ready, but empty. Ask the user:

"Do you have existing knowledge sources you'd like to import? (Notion pages, Slack channels, Confluence, local files)"

  • If yes: run /kb-refresh to populate the KB from those sources. It handles source discovery, scraping, and entry creation.
  • If no or skip: create one example entry in the first category to demonstrate the format. Read templates/kb/example/sample-entry.md from this plugin for the format, but write an entry relevant to the user's domain rather than copying the sample.

Step 6: Verify

Run the index script to confirm everything is wired up:

bash
python3 scripts/kb-index.py

Regenerate the "All Files by Category" section of kb/index.md from the current entries:

bash
python3 scripts/kb-index.py --write

Validate KB health (frontmatter, categories, related links):

bash
python3 scripts/kb-validate.py

If kb-index.py lists the entries and kb-validate.py reports "All entries valid", setup is complete.

Step 7: Summary

Tell the user:

  • What was created and where
  • How to add new entries (create .md files with YAML frontmatter in the right kb/{category}/ folder; nested sub-folders like kb/security/access/ are supported)
  • How to query the KB (/kb-answer)
  • How to import documents or bulk-import a directory (/kb-import)
  • How to add more sources or refresh existing ones (/kb-refresh)
  • How to list all entries (python3 scripts/kb-index.py)
  • How to search (python3 scripts/kb-search.py "keyword")

© techwolf-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/knowledge-base/skills/setup-knowledge-base of techwolf-ai/ai-first-toolkit.

Open the folder on GitHubat commit 2ee7841

Compare with similar skills

Setup Knowledge Base next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Setup Knowledge Base compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Setup Knowledge Base this skilltechwolf-ai/ai-first-toolkit132—~1.2kAutomated safety check: PassMIT
LLM Wikilewislulu/llm-wiki-skill655—~3.7kAutomated safety check: PassNone
LLM Wiki Knowledge GraphEgonex-AI/Understand-Anything85k1 repos~1.5kAutomated safety check: PassMIT
Xhs Virtual Productchenjin-cmd/xhs-virtual-product726—~862Automated safety check: PassMIT
OpenkbVectifyAI/OpenKB4.7k1 repos~2kAutomated safety check: WarnApache-2.0
Learn From Materialsdmoshehun-prog/learn-from-materials902—~7.9kAutomated safety check: PassMIT

Similar skills

  • LLM Wiki

    lewislulu/llm-wiki-skill

    Build and maintain a Karpathy-style LLM knowledge base — a self-compiling Obsidian markdown wiki where an Agent ingests raw sources, compiles cross-linked concept/entity/summary pages, answers…

    655 GitHub stars~3.7k tokensUpdated 5 mo ago
    Knowledge ManagementAuto-check passed
  • LLM Wiki Knowledge Graph

    Egonex-AI/Understand-Anything

    Detects a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit relationships and topic clusters.

    85k GitHub starsUsed in 1 repo~1.5k tokens
    Knowledge ManagementAuto-check passed
  • Xhs Virtual Product

    chenjin-cmd/xhs-virtual-product

    This skill helps plan, select, produce, and market Xiaohongshu (RED) virtual/digital products — templates, knowledge bases, test tools, study materials.

    726 GitHub stars~862 tokensUpdated 6 days ago
    Knowledge ManagementAuto-check passed
  • Openkb

    VectifyAI/OpenKB

    A skill your agent uses when the user asks about content in their OpenKB knowledge base — research topics, concepts compiled from their documents, cross-document synthesis — or mentions openkb, an…

    4.7k GitHub starsUsed in 1 repo~2k tokens
    Knowledge ManagementAuto-check: warnings
  • Learn From Materials

    dmoshehun-prog/learn-from-materials

    Turns books, PDFs, slides and web pages into a source-grounded knowledge base and an interactive learning page in English or Chinese, with quizzes, relationship maps and reusable methodology notes.

    902 GitHub stars~7.9k tokensUpdated 6 days ago
    Knowledge ManagementAuto-check passed
  • Onyx CLI

    onyx-dot-app/onyx

    Query the Onyx knowledge base using the onyx-cli command. An agent skill from onyx-dot-app/onyx.

    32k GitHub starsUsed in 1 repo~2.6k tokens
    Knowledge ManagementAuto-check passed

More from techwolf-ai/ai-first-toolkit

All 29 skills in this repo
  • Task Profile

    techwolf-ai/ai-first-toolkit

    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…

    132 GitHub stars~3.6k tokensUpdated 8 days ago
    Auto-check passed
  • Token Doctor

    techwolf-ai/ai-first-toolkit

    Personal diagnosis of where your Claude Code + Cowork spend goes.

    132 GitHub stars~4.1k tokensUpdated 8 days ago
    Auto-check passed
  • Session Search

    techwolf-ai/ai-first-toolkit

    Find context from past Claude Code (CLI) and Claude Cowork (desktop) sessions on this Mac.

    132 GitHub stars~1.1k tokensUpdated 8 days ago
    Auto-check passed
  • Write Blog Post

    techwolf-ai/ai-first-toolkit

    Write or develop a blog post. An agent skill from techwolf-ai/ai-first-toolkit.

    132 GitHub stars~1.1k tokensUpdated 8 days ago
    Auto-check passed
  • Write Opinion

    techwolf-ai/ai-first-toolkit

    Write or develop an opinion piece (opiniestuk/op-ed). An agent skill from techwolf-ai/ai-first-toolkit.

    132 GitHub stars~695 tokensUpdated 8 days ago
    Auto-check passed
  • AI Firstify

    techwolf-ai/ai-first-toolkit

    Analyze, re-engineer, or bootstrap projects to align with AI-first design principles.

    132 GitHub stars~646 tokensUpdated 8 days ago
    Auto-check passed

Questions about Setup Knowledge Base

What does Setup Knowledge Base do?

Interactive onboarding to create a structured knowledge base. Setup Knowledge Base is an agent skill from techwolf-ai/ai-first-toolkit. Interactive onboarding to create a structured knowledge base.

When should I use Setup Knowledge Base?

Setup Knowledge Base fits situations like: tasks that involve Knowledge bases; tasks that involve Project scaffolding.

How do I install Setup Knowledge Base in Claude Code?

Run `npx skills add techwolf-ai/ai-first-toolkit --skill setup-knowledge-base -a claude-code`. Or copy the skill folder (plugins/knowledge-base/skills/setup-knowledge-base in techwolf-ai/ai-first-toolkit) into .claude/skills/setup-knowledge-base in your project. Claude Code loads it when a task matches its description.

How do I install Setup Knowledge Base in Codex?

Run `npx skills add techwolf-ai/ai-first-toolkit --skill setup-knowledge-base -a codex`. Or copy the skill folder (plugins/knowledge-base/skills/setup-knowledge-base in techwolf-ai/ai-first-toolkit) into .agents/skills/setup-knowledge-base in your project. Codex loads it when a task matches its description.

Can I use Setup Knowledge Base in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add techwolf-ai/ai-first-toolkit --skill setup-knowledge-base -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-knowledge-base, .gemini/skills/setup-knowledge-base, .github/skills/setup-knowledge-base and .opencode/skills/setup-knowledge-base in your project.

What does Setup Knowledge Base need to run?

Going by SKILL.md and its folder, Setup Knowledge Base needs the command-line tools its instructions call (python3). Our summary lists: Python 3.

Does Setup Knowledge Base access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Setup Knowledge Base safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Setup Knowledge Base use?

Setup Knowledge Base is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Setup Knowledge Base use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Setup Knowledge Base?

Skills that share tags, products or a category with Setup Knowledge Base: LLM Wiki (lewislulu/llm-wiki-skill, 655 stars), LLM Wiki Knowledge Graph (Egonex-AI/Understand-Anything, 85k stars), Xhs Virtual Product (chenjin-cmd/xhs-virtual-product, 726 stars) and Openkb (VectifyAI/OpenKB, 4.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Setup Knowledge Base?

techwolf-ai (a GitHub organization) maintains it in techwolf-ai/ai-first-toolkit, which has 132 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on September 29, 2026.

Source: techwolf-ai/ai-first-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.