format-specific-extraction

format-specific-extraction is a skill for Claude Code, Codex from xberg-io/xberg. It costs 10 tokens per session (1,111 once invoked), scanned A, original, MIT.

A document-extraction workflow reads different file formats using format-specific methods. It can process office files such as DOCX, PPTX, and ODT, as well as PDFs, including text, tables, and metadata.

In plain words
What is it for?
It helps extract text, tables, and metadata from office documents and PDFs, with optional optical character recognition (OCR) for scanned or image-based PDF pages.
Why use it?
It handles the structural differences between document formats and limits resource use when opening potentially hostile or unusually large files.

Skill for Claude CodeCodex

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

About the project

Xberg is a document-intelligence engine that reads files, URLs, archives, and source trees and extracts text, metadata, images, tables, and structured data, with additional code-language understanding. Developers use it through language bindings, a command-line tool, REST API, or MCP server, and the catalogue entries support those integrations.

xberg-io/xberg · 9,271 stars · on GitHub · docs.xberg.io

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/xberg-io/xberg/format-specific-extraction
Any agent
npx skills add xberg-io/xberg --skill format-specific-extraction
Clone the repo
git clone --depth 1 https://github.com/xberg-io/xberg

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 format-specific-extraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/xberg-io/xberg/format-specific-extraction.svg)](https://agentmods.dev/skills/xberg-io/xberg/format-specific-extraction)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/xberg/format-specific-extraction"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/format-specific-extraction.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,111 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.1 $0.00010 $0.01111
Opus 5 $0.00005 $0.00556
Sonnet 5 $0.00002 $0.00222
Haiku 4.5 $0.00001 $0.00111

Measured 6d ago against content hash 8dc4e38bf378, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

format-specific-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 6d 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/format-specific-extraction/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Format-Specific Extraction Workflows

Office XML (DOCX/PPTX/ODT)

ZIP archive → SecurityBudget → XML parsing → Text + tables + metadata
  1. let budget = SecurityBudget::from_config(config); (extractors/security.rs), plus config.security_limits…max_files_in_archive as the member cap. The Office path does not use ZipBombValidator — that is the archive/iWork/HWPX path.
  2. Open with zip::ZipArchive::new(cursor) and read the parts (word/document.xml, ppt/slides/*.xml, content.xml).
  3. Parse with quick-xml::Reader (streaming), threading &mut budget through the recursive walkers so a hostile document exhausts a budget instead of memory.
  4. Metadata via crate::extraction::office_metadata — see the helper table below. There is no extract_metadata().
  5. See extractors/docx.rs, extractors/pptx.rs, extractors/odt.rs.

PDF

Bytes → xberg_native_pdf → Per-page text + OCR fallback → Tables → Metadata
  1. xberg_native_pdf::PdfDocument::from_bytes(content.to_vec())? — the engine takes an owned Vec<u8>, not a slice.
  2. OCR is forced by config.force_ocr (whole document) or config.force_ocr_pages (Option<Vec<u32>>); otherwise pages with no extractable text route to OCR.
  3. config.pages: Option<PageConfig> controls per-page output — it does not gate tables.
  4. Feature-gated #[cfg(feature = "pdf")]; the backend is PdfConfig.backend (native default, pdfium behind pdf-pdfium).
  5. See extractors/pdf/mod.rs.

Archives (ZIP/TAR/7z/GZIP)

ZipBombValidator → per-format metadata → per-format text content
  1. ZipBombValidator::new(limits).validate(&mut archive)? before any extraction.
  2. Metadata and content come from per-format helpers in 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().
  3. See extractors/archive.rs, extraction/archive/{zip,tar,sevenz,gzip}.rs.

Read the full file on GitHub · 92 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. 6d ago First seen · 92 lines · 10 tokens per session scan A 8dc4e38bf378

Subscribe to this mod's changes

format-specific-extraction is a skill published in the GitHub repository xberg-io/xberg (9,271 stars, last pushed today), licensed MIT. It adds 10 tokens to every session and 1,111 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

implementing-feature

Implement a feature from a product/tech spec, URL, GitHub issue, or by auto-selecting the next papercut enhancement. Reads the spec, implements the feature following Streamlit patterns, and creates a merge-ready PR. Use when given a spec folder path, document URL, or issue link to implement, or when asked to implement…

streamlit/streamlit · 83 tokens

gpu-document-processing

Use when processing large PDFs, document collections, or bulk text extraction tasks that benefit from GPU-accelerated processing. Triggers when the user provides large documents or needs bulk document analysis.

langchain-ai/deepagents · 41 tokens

csv-workbench

Analyze CSV files in /mnt/data and return concise numeric summaries.

openai/openai-agents-python · 17 tokens

typescript-providers

Implement, modify, test, or document TypeScript provider packages under ts/packages/providers, including framework adapters for OpenAI, Anthropic, Google, LangChain, Mastra, Vercel, LlamaIndex, Cloudflare, and Claude Agent SDK. Use for provider-specific TS work; do not use for core-only changes.

ComposioHQ/composio · 70 tokens

shell-python-fallback

Use runshell with embedded Python heredoc as reliable fallback when code execution tools fail.

HKUDS/OpenSpace · 21 tokens