Extraction Pipeline Patterns
БесплатноБез исполняемых скриптовНе проверенChange extraction orchestration: cache, fallback, processing and concurrency.
от xberg-io★ 9 642 звезды на GitHubОб этом скилле
Extraction Pipeline Patterns
Format detection → extractor routing → post-processing over the FORMATS registry
The full-registry counts are verified against published claims by
scripts/sync_supported_counts.py verify. Runtime SUPPORTED_FORMAT_COUNT and
SUPPORTED_EXTENSION_COUNT values are derived from the full static FORMATS registry.
Layout
crates/xberg/src/core/pipeline/— orchestration (mod.rs,cache.rs,execution.rs,features.rs,format.rs,initialization.rs,page_markers.rs)crates/xberg/src/core/mime.rs,core/formats.rs— detection and theFORMATSregistrycrates/xberg/src/extractors/— one module per format, each implementingInternalDocumentExtractorcrates/xberg/src/extraction/— shared parsing/rendering helpers used by those extractorscrates/xberg/src/core/config/,core/config_validation/— both directories, not files
Flow
- Detect — MIME from extension via
EXT_TO_MIME, or from bytes viadetect_mime_type_from_bytes; validate againstSUPPORTED_MIME_TYPES. - Route — registry returns the highest-
priority()extractor registered for that MIME. - Extract — the extractor produces an
InternalDocument. - Post-process —
core::pipeline::run_pipeline(doc, config)(async) orrun_pipeline_sync(WASM) runs validators, quality processing, chunking and hooks, and returnsExtractedDocument. Every extraction path goes through it.
Extractor modules
- Office: DOCX, PPTX, PPT, DOC, XLSX/XLS, ODT, ODP, iWork, HWP/HWPX, and WordPerfect under
extractors/{docx,pptx,ppt,doc,excel,odt,odp,hwp,hwpx,wordperfect}.rsandextractors/iwork/. - Markup: Markdown, text, RST, Org, RTF, AsciiDoc, Typst, and Djot under
extractors/{markdown,text,rst,orgmode,asciidoc,typst}.rsandextractors/{rtf,djot_format}/. - Academic: LaTeX, BibTeX, JATS, Jupyter, DocBook, EPUB, and FictionBook under
extractors/{bibtex,jupyter,docbook,fictionbook}.rsandextractors/{latex,jats,epub}/. - PDF: text, encrypted-document, and OCR-fallback handling under
extractors/pdf/. - Images: PNG, JPEG, TIFF, WebP, HEIC, SVG, and QR under
extractors/andextraction/. - Web: HTML, XHTML, XML, and MDX under
extractors/andextraction/html/. - Email: EML, MSG, and PST under
extractors/andextraction/email/. - Archives: ZIP, TAR, GZIP, and 7z under
extractors/archive.rsandextraction/archive/. - Structured: JSON, GeoJSON, YAML, TOML, CSV, DBF, SQLite, and GeoPackage under
extractors/.
Fallback strategies
- Password-protected PDFs — try the configured password, then the secondary list; on
failure report
is_encryptedin metadata rather than erroring out. - OCR fallback — a PDF page with no extractable text routes to the OCR pipeline;
config.force_ocrandconfig.force_ocr_pagesforce it. - Nested archives — recursive with a depth limit from
SecurityLimits. - Corrupted input — emit what parsed and attach the error location; never panic.
The cross-extractor fallback chain runs only for UnsupportedFormat and Plugin errors as
defined by is_extractor_fallback_eligible. Parsing, IO, OCR, and validation errors abort the
chain. A successful fallback records an extractor-fallback processing warning.
Cache and concurrency
- Extraction keys are
<cache_version_tag>-<content_hash>-<config_hash>, never path-based. The tag hashesCARGO_PKG_VERSION,CACHE_SCHEMA_VERSION,env!("XBERG_BUILD_ID")and the debug/release bit (cache/version.rs);XBERG_BUILD_IDis the commit SHA plus a hash of any uncommitted diff (build.rs), so it IS a build fingerprint. - Two builds from different commits therefore get different entries with no schema bump needed.
The exception is a build that cannot reach git metadata and gets
XBERG_BUILD_ID = ""-- a crates.io/docs.rs tarball (safe: immutable source per version) or a Docker build (.dockerignoreexcludes**/.git/, and nothing passes the--build-argescape hatch). BumpCACHE_SCHEMA_VERSIONwhen behavior can change and those builds must not collide. For A/B or revert checks, disable the cache or export distinctXBERG_BUILD_IDvalues per arm, so the experiment cannot replay the control. - Configuration that affects output belongs in the config hash. Check the cache before extraction so a hit skips processing.
- Default batch concurrency uses host CPU count capped by any detected Linux cgroup quota via
core/config/concurrency.rs::resolve_thread_budget. core/io.rs::read_file_asynccurrently reads the whole file withtokio::fs::read; there is noAsyncReadextraction surface. Treat streaming as an open gap.- Cache hit and miss OTel counters exist, but no hit-rate target is computed or enforced.
Plugin integration
crates/xberg/src/plugins/. Registry selection is by priority(), highest wins — not by
registration order. Register above 50 to override a built-in. See
`plugin-architecture-patter
Установить Extraction Pipeline Patterns в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл Extraction Pipeline Patterns?
Change extraction orchestration: cache, fallback, processing and concurrency.
Как установить скилл Extraction Pipeline Patterns?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Extraction Pipeline Patterns запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub