Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Format-specific document extraction workflows
.claude/skills/xberg-io-format-specific-extraction/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 5% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -36% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -37% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -35% | 0% |
textZIP archive → SecurityBudget → XML parsing → Text + tables + metadata
let budget = SecurityBudget::from_config(config); (extractors/security.rs), plusconfig.security_limits…max_files_in_archive as the member cap. The Office path does not use ZipBombValidator — that is the archive/iWork/HWPX path.
zip::ZipArchive::new(cursor) and read the parts(word/document.xml, ppt/slides/*.xml, content.xml).
quick-xml::Reader (streaming), threading &mut budget through the recursivewalkers so a hostile document exhausts a budget instead of memory.
crate::extraction::office_metadata — see the helper table below. There is noextract_metadata().
extractors/docx.rs, extractors/pptx.rs, extractors/odt.rs.textBytes → xberg_native_pdf → Per-page text + OCR fallback → Tables → Metadata
xberg_native_pdf::PdfDocument::from_bytes(content.to_vec())? — the engine takes an ownedVec<u8>, not a slice.
config.force_ocr (whole document) or config.force_ocr_pages(Option<Vec<u32>>); otherwise pages with no extractable text route to OCR.
config.pages: Option<PageConfig> controls per-page output — it does not gate tables.#[cfg(feature = "pdf")]; the backend is PdfConfig.backend(native default, pdfium behind pdf-pdfium).
extractors/pdf/mod.rs.textZipBombValidator → per-format metadata → per-format text content
ZipBombValidator::new(limits).validate(&mut archive)? before any extraction.extraction/archive/:extract_{zip,tar,7z,gzip}_metadata, extract_{zip,tar,7z,gzip}_text_content, extract_{zip,tar,7z}_file_bytes. There is no build_archive_result().
extractors/archive.rs, extraction/archive/{zip,tar,sevenz,gzip}.rs.Single StructuredExtractor covers several MIME types: parse with the format library, pretty-print to text. See extractors/structured.rs.
Parse headers → extract body (text/html) → process attachments. Message-in-message nesting is bounded by the SecurityBudget's SecurityLimits-derived DepthValidator, the same counter every other format uses. See extraction/email.rs, extractors/email.rs, extractors/pst.rs.
| Helper | Location | | --- | --- | | extract_core_properties() | extraction/office_metadata/core_properties.rs | | extract_custom_properties() | extraction/office_metadata/custom_properties.rs | | extract_{docx,xlsx,pptx}_app_properties() | extraction/office_metadata/app_properties.rs | | extract_odt_properties() | extraction/office_metadata/odt_properties.rs | | cells_to_markdown() | extraction/markdown.rs (pub(crate)) | | SecurityBudget, SecurityLimits | extractors/security.rs | | ZipBombValidator, DepthValidator | extractors/security.rs | | StringGrowthValidator | extractors/security.rs |
The security types are pub(crate): in-crate extractors can use them, out-of-crate plugin authors cannot.
FormatEntry to the FORMATS registry in core/mime.rs. EXT_TO_MIME andSUPPORTED_MIME_TYPES are derived from it — do not hand-edit either. See mime-detection-routing for the full procedure, including the count assertion to bump.
InternalDocumentExtractor (not DocumentExtractor).supported_mime_types() and priority() (default 50).extractors/mod.rs → register_default_extractors().#[cfg(feature = "my-format")].SecurityBudget / SecurityLimits to any user-supplied content.#[cfg_attr(alef, alef(skip))] to the extractor struct or the binding regen aborts.test-corpus skill for where fixtures come from).| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 18,692 | 19,884 | +6% | 1 | 1 | 0% | 3,404 | 3,562 | +5% | 0 | 0 | — |
case-02 | fail→pass | 29,006 | 8,816 | -70% | 1 | 1 | 0% | 4,583 | 2,911 | -36% | 0 | 0 | — |
case-03 | fail→pass | 21,724 | 11,076 | -49% | 1 | 1 | 0% | 3,662 | 2,314 | -37% | 0 | 0 | — |
case-04 | fail→pass | 17,668 | 6,494 | -63% | 1 | 1 | 0% | 3,153 | 2,356 | -25% | 0 | 0 | — |
case-05 | fail→pass | 22,629 | 5,517 | -76% | 1 | 1 | 0% | 3,532 | 2,306 | -35% | 0 | 0 | — |
case-06 | fail→pass | 12,951 | 8,476 | -35% | 1 | 1 | 0% | 1,117 | 1,911 | +71% | 0 | 0 | — |
case-07 | fail→pass | 7,724 | 3,530 | -54% | 1 | 1 | 0% | 1,183 | 1,950 | +65% | 0 | 0 | — |
case-08 | fail→pass | 24,103 | 11,424 | -53% | 1 | 1 | 0% | 3,149 | 2,278 | -28% | 0 | 0 | — |
case-09 | fail→pass | 18,452 | 4,963 | -73% | 1 | 1 | 0% | 2,250 | 1,775 | -21% | 0 | 0 | — |
case-10 | fail→pass | 13,516 | 8,318 | -38% | 1 | 1 | 0% | 2,478 | 1,829 | -26% | 0 | 0 | — |
case-11 | fail→pass | 20,193 | 11,187 | -45% | 1 | 1 | 0% | 2,396 | 2,247 | -6% | 0 | 0 | — |
case-12 | fail→pass | 15,360 | 7,937 | -48% | 1 | 1 | 0% | 1,776 | 1,766 | -1% | 0 | 0 | — |
case-13 | fail→pass | 23,251 | 6,811 | -71% | 1 | 1 | 0% | 2,947 | 1,523 | -48% | 0 | 0 | — |
case-14 | fail→pass | 22,020 | 10,341 | -53% | 1 | 1 | 0% | 2,921 | 1,861 | -36% | 0 | 0 | — |
case-15 | fail→pass | 20,934 | 8,404 | -60% | 1 | 1 | 0% | 2,292 | 1,872 | -18% | 0 | 0 | — |
case-16 | fail→pass | 42,464 | 10,575 | -75% | 1 | 1 | 0% | 871 | 2,150 | +147% | 0 | 0 | — |
case-17 | pass→fail | 24,882 | 3,908 | -84% | 1 | 1 | 0% | 3,131 | 1,904 | -39% | 0 | 0 | — |
case-18 | fail→pass | 37,050 | 7,280 | -80% | 1 | 1 | 0% | 5,735 | 1,604 | -72% | 0 | 0 | — |
case-19 | pass→pass | 26,638 | 21,981 | -17% | 1 | 1 | 0% | 3,897 | 4,317 | +11% | 0 | 0 | — |
case-20 | pass→pass | 23,221 | 14,666 | -37% | 1 | 1 | 0% | 3,425 | 4,012 | +17% | 0 | 0 | — |
case-21 | pass→pass | 23,502 | 22,853 | -3% | 1 | 1 | 0% | 3,720 | 5,295 | +42% | 0 | 0 | — |
case-22 | pass→pass | 18,806 | 16,807 | -11% | 1 | 1 | 0% | 2,727 | 3,794 | +39% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +73 percentage points is the difference between those two pass rates over the 21 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/27/2026 | +73% |
| gemini-3.6-flash | verified | 8/11/2026 | +52% |
Other measured skills in the registry, with their headline benchmark lift.