extraction-pipeline-patterns

extraction-pipeline-patterns is a skill for Claude Code, Codex from kreuzberg-dev/kreuzberg-lts. It costs 11 tokens per session (1,494 once invoked), scanned A, original, MIT.

An implementation guide for Kreuzberg’s document-extraction pipeline, which identifies file types and chooses how to read them. It covers extraction for more than 75 formats, fallback handling, validation, OCR, archives, and post-processing.

In plain words
What is it for?
Use it when changing format detection, adding extractors, handling password-protected PDFs or archives, recovering damaged files, or adding validation, OCR, chunking, or custom processing.
Why use it?
It provides a consistent way to handle ordinary, damaged, protected, nested, or image-based documents instead of writing separate logic for each case.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when changing format detection, adding extractors, handling password-protected PDFs or archives, recovering damaged files, or adding validation, OCR, chunking, or custom processing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns
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.

Any agent
npx skills add kreuzberg-dev/kreuzberg-lts --skill extraction-pipeline-patterns
Clone the repo
git clone --depth 1 https://github.com/kreuzberg-dev/kreuzberg-lts

Made for: Claude Code, Codex.

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 extraction-pipeline-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns/github.svg)](https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/extraction-pipeline-patterns)
Your own site
<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.

agentmods 80×15 button for extraction-pipeline-patterns

Your own site · 80×15
<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>
Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,494 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00011 $0.01494
Opus 5 $0.00005 $0.00747
Sonnet 5 $0.00002 $0.00299
Haiku 4.5 $0.00001 $0.00149

Measured 11d ago against content hash 28ac395cd103, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

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.

.ai-rulez/skills/extraction-pipeline-patterns/SKILL.md · 127 lines

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:

  1. Format Detection - MIME type inference + extension validation -> select appropriate extractor
  2. Intelligent Extraction - Route to format-specific extractors (PDF, DOCX, Excel, HTML, images, archives, etc.)
  3. Fallback Strategies - Password-protected PDFs, OCR for images, nested archive handling, corrupted file recovery
  4. 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
PDF 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)
Email 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

Read the full file on GitHub · 127 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. 11d ago First seen · 127 lines · 11 tokens per session scan A 28ac395cd103

Subscribe to this mod's changes

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.

Related

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.

JansenAnalytics/claudex · 51 tokens

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.

PaddlePaddle/PaddleOCR · 140 tokens

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.

PaddlePaddle/PaddleOCR · 125 tokens

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…

xberg-io/xberg · 98 tokens

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.

xberg-io/xberg · 53 tokens

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.

xberg-io/xberg · 46 tokens