km-content-extraction

km-content-extraction is a skill for Claude Code, Codex from treylom/knowledge-manager. It costs 57 tokens per session (982 once invoked), scanned A, original, MIT.

A content-extraction router that chooses how to read local documents, web pages, and stored vault content based on the input type. It covers formats such as PDF, Word, Excel, and Korean HWP files.

In plain words
What is it for?
Use it to route PDFs, office files, spreadsheets, images, web pages, and vault searches to the appropriate extraction process before summarising or analysing them.
Why use it?
It helps avoid using the wrong reader for a file, which can lose tables, layout, or document structure.

Skill for Claude CodeCodex

Part of the km plugin — 10 skills, 10 commands, 2 agents 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/treylom/knowledge-manager/km-content-extraction
Any agent
npx skills add treylom/knowledge-manager --skill km-content-extraction
Clone the repo
git clone --depth 1 https://github.com/treylom/knowledge-manager

Made for: Claude Code, Codex.

Or install km, the plugin that ships this one along with the rest of its 10 skills, 10 commands, 2 agents.

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 km-content-extraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/treylom/knowledge-manager/km-content-extraction.svg)](https://agentmods.dev/skills/treylom/knowledge-manager/km-content-extraction)
Your own site
<a href="https://agentmods.dev/skills/treylom/knowledge-manager/km-content-extraction"><img src="https://agentmods.dev/badge/skills/treylom/knowledge-manager/km-content-extraction.svg" alt="Measured on agentmods" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 982 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.00057 $0.00982
Opus 5 $0.00028 $0.00491
Sonnet 5 $0.00011 $0.00196
Haiku 4.5 $0.00006 $0.00098

Measured 3d ago against content hash 74e8e20b5e36, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

km-content-extraction 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 3d 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.

.agent/skills/km-content-extraction/SKILL.md · 57 lines

What it actually says

KM Content Extraction (Codex)

km-workflow Phase 2 의 추출 라우터. 입력 형식을 먼저 판정하고, 아래 표의 도구를 실제로 호출한다 — 도구 호출 없이 콘텐츠를 추측·요약하는 것은 금지. 전문(이미지 파이프라인·병렬 처리·포맷별 상세)은 플러그인 skills/km-content-extraction.md (1,087줄) 참조.

소스별 추출 라우팅 (필수 도구 호출)

소스 유형 🚨 필수 도구 호출
한글 (HWP/HWP3/HWPX/HWPML) kordoc: npx kordoc <files> -d <outdir> → 변환 md 를 Read — anydoc 은 HWP 미지원, 한글 문서는 처음부터 kordoc
PDF 1순위 Read → 2순위 opendataloader-pdf → 3순위 marker_single — 🔴 anydoc 으로 보내지 않는다(다단 레이아웃 순서 붕괴)
Word (DOCX) 1순위 npx -y @firecrawl/anydoc "[파일]" → 2순위 Read — 표가 복잡해 깨지면 kordoc
Excel (XLSX) 1순위 npx -y @firecrawl/anydoc "[파일]" (수식 없는 표 한정) — 수식·분석·편집은 xlsx 계열 도구
CSV Read (anydoc 편입 보류 — 헤더 밀림)
PowerPoint Read (anydoc 미편입 — 슬라이드 경계 소실)
TXT/MD Read
이미지 Read (Vision)
일반 웹/소셜 $km:km-browser-abstraction / $km:km-social-media
Vault 종합 $km:km-search

한국어 로컬 문서 fallback = kordoc

입력이 로컬 문서인데 기본 경로(Read·anydoc)로 충실히 못 읽는 형식 — HWP·HWPX, 표가 복잡한 XLSX/DOCX, 한국어 PDF — 은 kordoc 으로 마크다운 변환 후 진행한다:

npx kordoc <files> -d <outdir>   # HWP3/HWP/HWPX/HWPML/PDF/XLS/XLSX/DOCX → Markdown
  • <files> 복수 일괄 지원. 산출 = <outdir>/<파일명>.md.
  • 변환 md 는 원문 보존 검증(표 행수·수치 표본 대조) 후 사용한다.
  • PDF 입력은 pdfjs-dist@4 peer 의존 필요(v6 비호환).

anydoc ↔ kordoc 역할 분리

anydoc kordoc
고유 영역 epub · rtf · odt/ods/odp HWP3/HWP/HWPX/HWPML (anydoc 미지원)
겹치는 영역 DOCX · XLS/XLSX · PDF DOCX · XLS/XLSX · PDF
성격 순수 Rust · 1회 호출 = 1문서 Node · 한국어 특화 · 복수 일괄
  • DOCX·XLSX 기본 = anydoc. 깨지거나 한글(HWP) 계열이면 kordoc.
  • 🔴 PDF 는 anydoc 금지(순서 붕괴) — 위 표의 다단 경로 유지.

Phase 2 완료 검증 (필수)

□ 해당 소스 유형의 도구를 실제로 호출했는가?
□ 도구 응답에서 추출된 실제 텍스트를 확인했는가 (추측 아님)?
□ 변환 문서는 원문 보존 검증(표 행수·수치 표본)을 했는가?
⚠️ 미완료 시 Phase 3(분석) 진행 금지.
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. 3d ago First seen · 57 lines · 57 tokens per session scan A 74e8e20b5e36

Subscribe to this mod's changes

km-content-extraction is a skill published in the GitHub repository treylom/knowledge-manager (230 stars, last pushed today), licensed MIT. It adds 57 tokens to every session and 982 once invoked, about $0.0003 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-09-01.

Related

Other skills, from other repositories

thumbnail-of-pptx

Capture a thumbnail image of a slide from a OneDrive/Office presentation link. Opens the PowerPoint web viewer in a headless browser and screenshots the slide canvas, producing a clean 16:9 image with no viewer chrome. Works even when the PPTX is not downloadable (e.g. personal OneDrive shares), since it screenshots…

pamelafox/presentation-skills · 111 tokens

svg-press

Teaches agents how to hand-craft self-contained SVG diagrams that render correctly in browsers, tags, and Playwright PDF/PNG. Covers containment math, viewBox sizing, arrow construction, text hierarchy, KDCube brand color tokens, semantic zone fills, badges, the PNG inspection loop, writepng parameters, multi-diagram…

kdcube/kdcube · 87 tokens

openclaw-rpa

Record browser, Excel, Word & API actions once — replay without the LLM: faster, cheaper, no hallucinations. github.com/laziobird/openclaw-rpa . Supports computer-use automation: web clicks/fill/extract, local Excel (.xlsx via openpyxl), Word (.docx via python-docx), HTTP API calls (httpx GET/POST), and auto-login…

laziobird/openclaw-rpa · 163 tokens

single-page-pdf-export

Use when the user asks to export a local HTML file, web page, or invitation page to a single-page PDF, a no-pagination PDF, a long PDF with auto-calculated height, or a PDF without headers and footers. Trigger on phrases like 单页 PDF, 不分页, 自动计算长度, 长图 PDF, 去掉页眉页脚, export HTML to single-page PDF, or print page to one PDF…

cyberelf/agent_skills · 94 tokens

file-download

Download files from websites, save PDFs, and read downloaded content. Trigger when the user asks to: download a file, save a PDF, export a document, fetch a file from a URL, grab a report, download and read a PDF, or save page content as a file.

billy-enrizky/openbrowser-ai · 60 tokens

url-to-pdf

URL to PDF and HTML to PDF. Convert any web page URL, or a raw HTML string, into a clean PDF file. Save an invoice or a receipt, archive an article, or print an HTML report to PDF. The page renders in a real hosted browser with JavaScript on, so the PDF matches the live page, and you set paper size, margins…

toolshedlabs-hash/web-access-skills · 138 tokens