Agent skill

Kb Import

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

Import knowledge from existing documents into structured KB entries.

MITAuto-check passedDocuments & Office

Install Kb Import

skills CLI
$ npx skills add techwolf-ai/ai-first-toolkit --skill kb-import -a claude-code

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

GitHub CLI
$ gh skill install techwolf-ai/ai-first-toolkit kb-import --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/kb-import .claude/skills/kb-import && 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
kb-import
GitHub stars
132
Token cost
~1.5k tokens
SKILL.md length
687 words
Files
1
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

Import knowledge from existing documents into structured KB entries.

  • Works in 6 steps: Understand the KB Structure → Read the Source Document → Plan the Extraction → …
  • Tasks that involve Word documents
  • SKILL.md covers When to Use, Modes, Step 1: Understand the KB… and Step 2: Read the Source Document, plus 5 more sections
  • Calls python3

What it does

Kb Import is an agent skill from techwolf-ai/ai-first-toolkit. Import knowledge from existing documents into structured KB entries. Reads source documents (Markdown, PDF, DOCX, plain text), extracts key information, and creates properly formatted KB entries with YAML frontmatter.

Its SKILL.md is about 1.5k 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 Documents & Office, covering Word documents and PDF. It works with Microsoft Word. 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 Word documents
  • Tasks that involve PDF

Example prompts

  • “/kb-import”

Requirements

  • Python 3

Workflow steps

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

  1. Understand the KB Structure
  2. Read the Source Document
  3. Plan the Extraction
  4. Create KB Entries
  5. Update the Index and Validate
  6. 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

Kb Import loads about 1.5k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 687 words of instructions outside code blocks.

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

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). 687 words, ~1,490 tokens.

Download SKILL.mdSave it as .claude/skills/kb-import/SKILL.md (or your agent's skills folder).
name
kb-import
description
Import knowledge from existing documents into structured KB entries. Reads source documents (Markdown, PDF, DOCX, plain text), extracts key information, and creates properly formatted KB entries with YAML frontmatter.

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:

markdown
---
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
File Naming
  • Use lowercase with hyphens: data-encryption.md, product-overview.md
  • Name should reflect the topic, not the source document

Step 5: Update the Index and Validate

After creating entries, regenerate the index and validate:

bash
python3 scripts/kb-index.py --write   # rewrite kb/index.md's "All Files by Category"
python3 scripts/kb-validate.py        # check frontmatter, categories, related links

Review the stdout output to verify all new entries appear correctly. Resolve any validate errors before continuing.

Step 6: Summary

Report to the user:

  • How many entries were created
  • Which categories they were placed in
  • Any information from the source document that was skipped (and why)
  • Suggestion to review entries and add related: links between them
Show full SKILL.md (282 more words)Show less

Bulk Mode

Use this when the user wants to ingest many documents in one go (e.g., "import everything in ~/docs/policies/", or a list of 5+ files).

Bulk Step 1: Enumerate the source set
  • If the user provided a directory, list supported files in it recursively (.md, .pdf, .txt, .docx). Skip obvious noise (.DS_Store, node_modules, hidden files).
  • If the user provided a list of paths, use exactly those.
  • Present the file count and a sample (first 10) to the user. Confirm before reading anything heavy.
Bulk Step 2: Plan across the whole batch

Read the frontmatter / first page of each file to get a title guess. Produce a single combined plan:

| # | Source file | Proposed KB entry | Category |
|---|-------------|-------------------|----------|
| 1 | policies/acceptable-use.pdf | security/acceptable-use.md | security |
| 2 | policies/retention.pdf      | security/data-retention.md | security |
| ...

Rules:

  • One KB entry per source file by default. Split a source into multiple entries only when it clearly covers multiple distinct topics.
  • Prefer nested categories (e.g., security/access) when the batch is large enough that a flat category would become unwieldy (> ~10 entries in one category).
  • Flag duplicates up front: if a planned entry already exists in the KB, mark it "UPDATE" instead of "CREATE".

Wait for user confirmation on the full plan before proceeding.

Bulk Step 3: Process in parallel
  • For ≤ 5 files, process sequentially (easier to follow, fewer context switches).
  • For > 5 files, dispatch a subagent per file (or per small group of related files) with the import instructions, the target path from the plan, and the existing KB index as context. Collect results.
  • If any subagent fails, keep the successful entries and report the failures so the user can retry a smaller batch.
Bulk Step 4: Finalize

After all files are processed:

bash
python3 scripts/kb-index.py --write
python3 scripts/kb-validate.py
python3 scripts/kb-search.py "sanity-check-term"   # spot-check a term that should appear

Report: X created, Y updated, Z skipped (with reason per skip). Flag any validate warnings or errors.

© 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/kb-import of techwolf-ai/ai-first-toolkit.

Open the folder on GitHubat commit 2ee7841

Compare with similar skills

Kb Import 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.

Kb Import compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kb Import this skilltechwolf-ai/ai-first-toolkit132—~1.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Gzh Designisjiamu/gzh-design-skill3.9k1 repos~2.2kAutomated safety check: PassAGPL-3.0
GenOffice Document CLIgenspark-ai/genoffice8.8k—~19kAutomated safety check: PassApache-2.0
Translate Bookdeusyu/translate-book2.1k—~5.5kAutomated safety check: NotesMIT
Docsagentdocsagent/docsagent625—~834Automated safety check: PassNone

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    3.9k GitHub starsUsed in 1 repo~2.2k tokens
    Documents & OfficeAuto-check passed
  • GenOffice Document CLI

    genspark-ai/genoffice

    Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.

    8.8k GitHub stars~19k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Translate Book

    deusyu/translate-book

    Translate books (PDF/DOCX/EPUB) into any language using parallel sub-agents.

    2.1k GitHub stars~5.5k tokensUpdated 13 days ago
    Documents & OfficeAuto-check: notes
  • Docsagent

    docsagent/docsagent

    Search and manage private, local document collections (PDF, PPTX, DOCX) offline.

    625 GitHub stars~834 tokensUpdated 9 days ago
    Documents & OfficeAuto-check passed
  • Markitdown

    jimmc414/Kosmos

    Convert various file formats (PDF, Office documents, images, audio, web content, structured data) to Markdown optimized for LLM processing.

    594 GitHub starsUsed in 2 repos~1.7k tokens
    Documents & OfficeAuto-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

Works with

Questions about Kb Import

What does Kb Import do?

Import knowledge from existing documents into structured KB entries. Kb Import is an agent skill from techwolf-ai/ai-first-toolkit. Import knowledge from existing documents into structured KB entries.

When should I use Kb Import?

Kb Import fits situations like: tasks that involve Word documents; tasks that involve PDF.

How do I install Kb Import in Claude Code?

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

How do I install Kb Import in Codex?

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

Can I use Kb Import 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 kb-import -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kb-import, .gemini/skills/kb-import, .github/skills/kb-import and .opencode/skills/kb-import in your project.

What does Kb Import need to run?

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

Does Kb Import 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 Kb Import 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 Kb Import use?

Kb Import 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 Kb Import use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Kb Import?

Skills that share tags, products or a category with Kb Import: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 3.9k stars), GenOffice Document CLI (genspark-ai/genoffice, 8.8k stars) and Translate Book (deusyu/translate-book, 2.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kb Import?

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.