Kb Polish logo

Kb Polish

Community
waylondev
kb-polish

Convert documents (PDF, Word docx/docm, Excel xlsx/xlsm, PowerPoint pptx/pptm/ppsx/ppsm, EPUB, CSV, RTF, OpenDocument odt/ods/odp) into Markdown for kb-pilot ingestion, by wrapping AnyDoc and extracting embedded objects into assets/. Does NOT OCR. Use when converting docs to Markdown, PDF-to-MD, Word-to-MD, or pre-ingestion prep.

Overview

Publisherwaylondev
Repositorykb-pilot
Skill namekb-polish
Stars
34
Forks
3
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by waylondev on GitHub. Read the source before you install it.

Installation

Install the Kb Polish AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/waylondev/kb-pilot/tree/main/.agents/skills/kb-polish
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/waylondev/kb-pilot.git /tmp/kb-pilot
mkdir -p .claude/skills
cp -r /tmp/kb-pilot/.agents/skills/kb-polish .claude/skills/kb-polish
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Kb Polish in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Kb Polish on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Kb Polish is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

kb-polish Skill

A thin AnyDoc convenience wrapper: convert a document to a first-draft Markdown and pull its embedded objects into assets/. The LLM then organizes that draft into the kb-pilot Markdown standard before kb-ingest.

This is a convenience helper, not a required stage. Per AGENTS.md, format conversion is the user's job; kb-polish simply makes it one command and hands the semantic organization to the LLM. No mechanical validation, no scoring, no drift-check — those are exactly the guardrails AGENTS.md tells us to omit. The only multis-step rule is "exactly one H1", which is the LLM's judgment, applied on read-in, not by a script.

Steps

  • 1. Convert + extract assets: python scripts/convert_document.py {input} -o {outdir} — writes raw.md and lands embedded objects into images/ (images) and attachments/ (other files) via AnyDoc. JSON result on stdout. Pure AnyDoc: no rasterization, no per-format plugins. A scan (no text layer) fails conversion with a NeedsOcrError — that failure surfaces honestly.
  • 2. LLM organizes into standard Markdown: read raw.md, correct its layout into the kb-pilot form (see template). This is the LLM's semantic job — fix split/reordered/misaligned text, rebuild heading levels, restore table rows/columns, point image references at images/.
  • 3. Human confirmation, then hand off to kb-ingest.

Output template (what Step 2 produces)

markdown
# [Single document title]              ← exactly one # in the whole file (kb-pilot: H1 is the title, not part of the tree)
## [Section]                           ← tree starts at H2
### [Subsection, optional]             ← continuous levels, no jumps
| Header | Col | ... |                ← rows/columns map 1:1 to the source
|---|---|---|
| data | ... | ... |                  ← values/wording preserved verbatim
## [Next section]

Body text is preserved verbatim (traditional characters / original spelling / terms); no polishing, no completion, no reordering of logic. Strip headers/footers (page numbers, doc numbers, repeated titles). Multiple H1s demote & merge by default — the main title keeps H1, the rest become H2 with their internal levels shifted down; split only when blocks are fully independent.

Gotchas (field-tested, read first)

  • No OCR. A pure scan (no text layer) converts, but its content is not machine-readable — the LLM cannot read page images. Tell the user to supply a text-layer version; do not render-and-read or invent content.
  • AnyDoc does not support .html/.md/.txt/.tsv: html/md/txt are already text — ingest directly, do not run this skill; .tsv must be renamed to .csv first (content is identical).
  • AnyDoc handles .odp very weakly (field-tested: only the title survives; body/tables lost): convert ODP to .pptx first.
  • RTF and complex merged-cell tables convert poorly (garbled Chinese / misaligned data). The LLM repairs these from context in Step 2; if a table or clause cannot be reconstructed confidently, flag it for Step 3 human confirmation rather than guess.
  • Single-H1: it is the one layout rule kb-ingest requires (the tree starts at H2). Apply it as an LLM judgment, not mechanically.

Scripts

  • scripts/convert_document.py: AnyDoc conversion + embedded-asset extraction (deterministic; the only script — raw.md + images/ + attachments/)

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Kb Polish AI skill do?

Convert documents (PDF, Word docx/docm, Excel xlsx/xlsm, PowerPoint pptx/pptm/ppsx/ppsm, EPUB, CSV, RTF, OpenDocument odt/ods/odp) into Markdown for kb-pilot ingestion, by wrapping AnyDoc and extracting embedded objects into assets/. Does NOT OCR. Use when converting docs to Markdown, PDF-to-MD, Word-to-MD, or pre-ingestion prep.

Why use Kb Polish on TypingMind?

Because you install it once and use it with any model. Kb Polish is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Kb Polish in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/waylondev/kb-pilot/tree/main/.agents/skills/kb-polish. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Kb Polish?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Kb Polish?

As many as you like. As long as a model supports skills, you can use Kb Polish with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Kb Polish AI skill free?

Yes. It is published on GitHub by waylondev under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇