kb-import

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

A document-import workflow that turns Markdown, PDF, DOCX, or plain-text files into structured entries for a knowledge base, a searchable collection of organized notes.

In plain words
What is it for?
Use it to import one document or many documents, split their contents into entries, and prepare them with the required metadata.
Why use it?
It provides a repeatable way to extract useful information from existing documents while fitting the results into the knowledge base's categories and format.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/kb-index.py --write # rewrite kb/index.md's "All Files by Category".

Part of the knowledge-base plugin — 4 skills shipped together

Good fit Use it to import one document or many documents, split their contents into entries, and prepare them with the required metadata.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/techwolf-ai/ai-first-toolkit
agentmods
npx agentmods add skills/techwolf-ai/ai-first-toolkit/kb-import

Made for: Claude Code.

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-import

README.md
[![agentmods](https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/kb-import/github.svg)](https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/kb-import)
Your own site
<a href="https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/kb-import"><img src="https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/kb-import/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kb-import

Your own site · 80×15
<a href="https://agentmods.dev/skills/techwolf-ai/ai-first-toolkit/kb-import"><img src="https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/kb-import.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,365 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00042 $0.01365
Opus 5.5 $0.00017 $0.00546
Sonnet 5.5 $0.00008 $0.00273
Haiku 4.5 $0.00004 $0.00136

Measured 1mo ago against content hash a4a8a6e4e82e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kb-import 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 1mo 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-import/SKILL.md · 159 lines

How it starts

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

KB Import Workflow

Import knowledge from existing documents into your knowledge base.

When to Use

  • Adding knowledge from existing documentation
  • Converting unstructured docs into structured KB entries
  • Bulk-importing content into a new KB

Modes

  • Single-document mode (default): one source document is split into one or more KB entries. Use Steps 1 to 6 below.
  • Bulk mode: many source documents are ingested at once from a directory or a list of files. Use when the user points at a folder or provides a list longer than ~3 files. See Bulk Mode at the bottom.

Step 1: Understand the KB Structure

Read the KB config to understand available categories:

kb/.kb-config.yaml

Read the index to see what already exists:

kb/index.md

Step 2: Read the Source Document

Read the source file provided by the user. Supported formats:

  • Markdown (.md)
  • PDF (.pdf, use the Read tool with page ranges for large files)
  • Plain text (.txt)

Step 3: Plan the Extraction

Analyze the document and propose a plan to the user:

  1. How many KB entries should be created?
  2. What categories do they belong to?
  3. Suggested titles for each entry

Present this as a table:

| # | Title | Category | Source Section |
|---|-------|----------|---------------|
| 1 | ... | ... | ... |

Wait for user confirmation before proceeding.

Step 4: Create KB Entries

For each planned entry, create a markdown file with YAML frontmatter:

---
title: "Entry Title"
description: "Brief one-liner for index lookup"
category: {category}
tags: [{tag1}, {tag2}]
sources: ["{source_filename}"]
last_updated: "{today's date}"
related:
  - {category}/{related-file}.md
---

## Section Title

Content here. Write clear, quotable statements.
Each fact should be a self-contained sentence that can be cited as evidence.

Content Guidelines

  • Preserve specifics: Keep exact numbers, dates, names, versions. Keep concrete customer/product examples by name (e.g., "Acme Corp", "Globex") — they make abstract concepts tangible and shouldn't be stripped "for neutrality".
  • One topic per entry: Don't create catch-all files
  • Quotable statements: Write so that individual sentences can be cited as evidence
  • Capture the easily-missed content types when the source covers them: stakeholders (one entry per key person with role + ownership + contact pattern), projects (goal/owner/status), repositories (purpose/ownership). These are the most commonly skipped in first-pass imports.
  • No opinions or speculation: Only include facts from the source document
  • Use markdown structure: Headers, bullet points, tables for structured data

Read the full file on GitHub · 159 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. 1mo ago First seen · 159 lines · 42 tokens per session scan A a4a8a6e4e82e

Subscribe to this mod's changes

kb-import is a skill published in the GitHub repository techwolf-ai/ai-first-toolkit (135 stars, last pushed 21d ago), licensed MIT. It adds 42 tokens to every session and 1,365 once invoked, about $0.0002 per session on Opus 5.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.