kb-import

kb-import is a skill for Claude Code, Codex 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 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-import
Any agent
npx skills add techwolf-ai/ai-first-toolkit --skill kb-import
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-import

README.md
[![agentmods](https://agentmods.dev/badge/skills/techwolf-ai/ai-first-toolkit/kb-import.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.svg" alt="Measured on agentmods" 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. 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.00042 $0.01365
Opus 5 $0.00021 $0.00682
Sonnet 5 $0.00008 $0.00273
Haiku 4.5 $0.00004 $0.00136

Measured 4d ago against content hash a4a8a6e4e82e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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-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. 4d 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 (98 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 1,365 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

yuque

Read and write Yuque (语雀) documents on the user's own account — list knowledge bases (知识库), read a document, publish Markdown, and update or delete one. Works with either the user's browser login (free) or a personal access token. Use when the user wants to publish Markdown to 语雀, list their 语雀 knowledge bases, or…

AceDataCloud/Skills · 84 tokens

citra

Skill "citra" from SylphxAI/pdf-reader-mcp, covering citra — pdf evidence for agents, install, or, tools and sdk.

SylphxAI/pdf-reader-mcp · 0 tokens

mathodology-award-gates

Use when running Mathodology award-workflow phase gates, judge panels, structured handoffs, figure QA, or rendered-PDF QA in a contest run.

sweetcornna/mathodology · 40 tokens

wrap

Session end - document updates, commit.

mag123c/toktrack · 9 tokens

product-implement

Generate a full Product Requirements Document (PRD.md) from accepted PDRs using multi-agent DAG orchestration. Reads individual PDR files, generates PRD sections from templates, validates output, and promotes accepted PDRs to memory. Use after /product-clarify.

tikalk/adlc-team-skills · 60 tokens

paper2xhs

把学术论文 PDF 转成小红书多图帖(标题 + 正文 + 标签 + 封面 + 论文主图/主实验结果配图)。你主导设计的协调式:机械活(MinerU 解析 PDF、生成封面与配图、半自动发布)交给 scripts/ 下的小工具,论文理解、选题角度、文案撰写由你亲自完成并在关键点与用户确认。当用户说“论文转小红书”、“paper2xhs”、“把这篇论文发小红书”、“论文转社交媒体”、“PDF 转小红书帖子”时触发。.

QuZhan51496/paper2anything · 143 tokens