xberg-batch-extraction

xberg-batch-extraction is a skill for Claude Code from xberg-io/xberg. It costs 47 tokens per session (1,341 once invoked), scanned A, original, MIT.

A command-line tool for extracting content from many documents in one run, using shared settings and optional per-file settings. It limits parallel work and reports individual failures without stopping the whole batch.

In plain words
What is it for?
Use it to process PDFs, Word documents, or other supported files in bulk and receive structured JSON results, timing data, and errors.
Why use it?
It avoids writing your own loop and failure handling for a folder or file pattern. It also makes large extraction jobs easier to control and inspect.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xberg plugin — 7 skills, 3 commands, 1 MCP server shipped together

Good fit Use it to process PDFs, Word documents, or other supported files in bulk and receive structured JSON results, timing data, and errors.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xberg-io/xberg/xberg-batch-extraction
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,418 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.

Any agent
npx skills add xberg-io/xberg --skill xberg-batch-extraction
Clone the repo
git clone --depth 1 https://github.com/xberg-io/xberg

Made for: Claude Code.

Or install xberg, the plugin that ships this one along with the rest of its 7 skills, 3 commands, 1 MCP server.

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 xberg-batch-extraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/xberg-io/xberg/xberg-batch-extraction/github.svg)](https://agentmods.dev/skills/xberg-io/xberg/xberg-batch-extraction)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/xberg/xberg-batch-extraction"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/xberg-batch-extraction/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 xberg-batch-extraction

Your own site · 80×15
<a href="https://agentmods.dev/skills/xberg-io/xberg/xberg-batch-extraction"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/xberg-batch-extraction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,341 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.
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.00047 $0.01341
Opus 5.5 $0.00019 $0.00536
Sonnet 5.5 $0.00009 $0.00268
Haiku 4.5 $0.00005 $0.00134

Measured yesterday against content hash 06dff516580d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

xberg-batch-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 yesterday.

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.

plugin/.ai-rulez/skills/xberg-batch-extraction/SKILL.md · 170 lines

How it starts

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

Batch extraction

Use this when processing a directory or glob of documents in one pass. xberg batch shares one extraction config across every file, runs extractions concurrently, and returns a JSON envelope — failures on individual files do not abort the run.

Basic usage

# Glob expands to many paths; results come back in a JSON envelope (default)
xberg batch *.pdf

# Mixed formats, markdown content for LLM ingestion
xberg batch docs/*.docx --content-format markdown

# Recurse with the shell, then extract
xberg batch $(find ./corpus -name '*.pdf')

batch defaults to --format json (vs --format text for single extract). The envelope contains results, total_ms, per_file_ms and, when failures occur, errors. Each results entry is a full extracted document. One input may produce multiple documents, so do not pair results with inputs by position. per_file_ms is aligned with inputs; inspect errors for per-input failures.

xberg batch reports/*.pdf \
  | jq '.results[] | {chars: (.content | length), mime: .mime_type}'

Parallelism

--max-concurrent caps how many files extract at once. When omitted, the scheduler derives document concurrency from the total thread budget. Lower it on memory-constrained hosts or when OCR/ML models are active, since each in-flight extraction holds its own buffers. Layout-heavy batches are further limited (1 concurrent extraction for all-PDF-layout batches, 2 for mixed layout):

# Cap at 4 concurrent extractions
xberg batch scans/*.pdf --ocr true --max-concurrent 4

--max-threads additionally caps total internal threads (Rayon, ONNX intra-op, the batch semaphore) for tightly constrained environments:

xberg batch *.pdf --max-concurrent 2 --max-threads 4

Per-file config overrides

A single shared config does not always fit. --file-configs points at a JSON file mapping each path to its own override object, merged on top of the shared config for that file only:

Read the full file on GitHub · 170 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 170 lines · 47 tokens per session scan A 06dff516580d

Subscribe to this mod's changes

xberg-batch-extraction is a skill published in the GitHub repository xberg-io/xberg (9,418 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 1,341 once invoked, about $0.0002 per session on Opus 5.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-10-15.

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

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, Claude Agent SDK, and TypeSafe. Use for provider-specific TS work; do not use for core-only changes.

ComposioHQ/composio · 73 tokens

document-authoring

Create, inspect and deliver charts, PDFs, Word documents and spreadsheets, and open animated browser presentations.

leon-ai/leon · 24 tokens

docetl

Build and run LLM-powered data processing pipelines with DocETL. Use when users say "docetl", want to analyze unstructured data, process documents, extract information, or run ETL tasks on text. Helps with data collection, pipeline creation, execution, and optimization.

ucbepic/docetl · 59 tokens