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.
npx skills add kreuzberg-dev/kreuzberg-lts --skill extraction-pipeline-patternsgit clone --depth 1 https://github.com/kreuzberg-dev/kreuzberg-ltsWrote 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.
[](https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns)<a href="https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns"><img src="https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns/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.
<a href="https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns"><img src="https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00011 | $0.01494 |
| Opus 5 | $0.00005 | $0.00747 |
| Sonnet 5 | $0.00002 | $0.00299 |
| Haiku 4.5 | $0.00001 | $0.00149 |
Grade A, and why
extraction-pipeline-patterns 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Extraction Pipeline Patterns
Kreuzberg's format detection -> extraction -> fallback orchestration for 75+ file formats
Core Pipeline Architecture
The extraction pipeline (crates/kreuzberg/src/core/pipeline.rs, crates/kreuzberg/src/extraction/) orchestrates:
- Format Detection - MIME type inference + extension validation -> select appropriate extractor
- Intelligent Extraction - Route to format-specific extractors (PDF, DOCX, Excel, HTML, images, archives, etc.)
- Fallback Strategies - Password-protected PDFs, OCR for images, nested archive handling, corrupted file recovery
- Post-Processing Pipeline - Validators, quality processing, chunking, custom hooks (see
core/pipeline.rs)
Format Detection Strategy
Location: crates/kreuzberg/src/core/mime.rs, crates/kreuzberg/src/core/formats.rs
Pattern: detect via magic bytes, validate extension alignment (prevent spoofing), route to extractor. Multiple extractors for same format -> choose highest confidence/specificity.
// Pseudocode: core/mime.rs
match (magic_bytes(content), extension) {
(Some(fmt), Some(ext)) if aligned -> Ok(fmt),
(Some(fmt), Some(ext)) if misaligned -> Err(FormatMismatch),
(Some(fmt), None) -> Ok(fmt), // magic bytes only
(None, Some(ext)) -> Ok(from_extension(ext)),
_ -> Err(UnknownFormat),
}
Extraction Modules (75 Formats)
| Category | Extractors | Key Modules |
|---|---|---|
| Office | DOCX, XLSX, XLSM, XLSB, XLS, PPTX, ODP, ODS | extraction/{docx,excel,pptx}.rs |
| Standard + encrypted, password attempts | pdf/ subdirectory (13 files) |
|
| Images | PNG, JPG, TIFF, WebP, JP2, SVG (OCR-enabled) | extraction/image.rs + ocr/ |
| Web | HTML, XHTML, XML, SVG (DOM parsing) | extraction/html.rs (67KB - complex table handling) |
| EML, MSG (headers, body, attachments, threading) | extraction/email.rs |
|
| Archives | ZIP, TAR, GZ, 7Z (recursive extraction) | extraction/archive.rs (31KB) |
| Markdown | MD, TXT, RST, Org Mode, RTF | extraction/markdown.rs |
| Academic | LaTeX, BibTeX, JATS, Jupyter, DocBook | extraction/{structured,xml}.rs |
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.
- 11d ago First seen · 127 lines · 11 tokens per session scan A 28ac395cd103
extraction-pipeline-patterns is a skill published in the GitHub repository kreuzberg-dev/kreuzberg-lts (15 stars, last pushed today), licensed MIT. It adds 11 tokens to every session and 1,494 once invoked, about $0.0001 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.
Other skills, from other repositories
doc-reader
PDF/DOCX/XLSX/image document intelligence — text extraction, table parsing, OCR, financial statement analysis, contract clause detection, document classification, and format conversion. Use when reading, analyzing, extracting data from, or converting documents.
paddleocr-doc-parsing
A document-parsing tool configuration for extracting structured Markdown or JSON from complex PDFs and document images, including tables, formulas, charts, and multi-column pages.
paddleocr-text-recognition
An optical character recognition tool configuration for extracting text from images, photos, scans, screenshots, and scanned PDFs. OCR means converting text visible in an image into machine-readable text.
feature-flag-policy
Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x8664 emulator), type-only and tract inference companion features, WASM/Android-safe variants, PDF backend, mutually-exclusive ORT variants, platform-conditional deps, aggregate feature sets, and build profiles. Load when adding, wiring, or…
ocr-pipeline-and-quality
Change or evaluate Xberg OCR backends, preprocessing, caching, page acceptance, geometry, hOCR structure, table reconstruction, or cross-backend quality. Load for OCR behavior and A/B quality work, not ordinary PDF text extraction.
pdf-backends
Change or diagnose Xberg PDF extraction, native/Pdfium backend selection, PDF rendering sessions, encrypted documents, OCR fallback, or backend-specific capability gaps. Load for PDF engine work, not generic image OCR.