Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when choosing an output format for extracted documents — text, markdown, djot, html, or JSON. Maps consumer (LLM, parser, archive) to the right `--format` / `--content-format` pair.
.claude/skills/xberg-io-picking-a-format/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -13% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -7% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 2% | 0% |
<!-- AI-RULEZ :: GENERATED FILE — DO NOT EDIT Content-Hash: blake3:bcdbffe958890e1c589f3ea44540c67c86540196a844e6de5c011faccdd345fc Source-Hash: blake3:ef1fa958e3b61fa61d2a2275a9c04dfab5c94186e3351a2216afb25cbb36ff1a Schema-Version: v1 -->
Xberg has two orthogonal format knobs. Get them right up front and the downstream code stays simple.
| Knob | What it controls | Values | Default | | ------------------- | ------------------------------------------------- | -------------------------------------- | ---------------- | | --format | How the CLI prints the result | text, json, toon | text (extract), json (batch) | | --content-format | How extracted content is rendered inside result | plain, markdown, djot, html, json, doctags | plain | | --token-reduction | Strip whitespace / boilerplate for LLM contexts | off, light, moderate, aggressive, maximum | off |
--format json returns an envelope wrapping the ExtractedDocument — the document lives under .result for extract and under .results[] for batch, with content, metadata, tables, and images as fields of that nested document. --format text prints just content. --content-format is what shows up inside that content field.
textWho consumes the output? ├── LLM (Claude, GPT, Gemini, local) — embed/prompt context │ --format text --content-format markdown ├── Vector store / RAG indexer │ --format json --content-format markdown │ (markdown preserves structure for chunking) ├── Downstream parser that expects machine-readable JSON │ --format json --content-format plain │ (cleanest text + structured metadata) ├── Human review / archival │ --format text --content-format markdown ├── HTML re-rendering / web display │ --format json --content-format html ├── Lossless intermediate for pandoc / academic tooling │ --format json --content-format djot └── Token-budget-constrained pipeline --format text --content-format plain (drops markup; add --token-reduction moderate for further savings)
Feed a PDF directly into an LLM:
bashxberg extract paper.pdf --content-format markdown
Index a corpus into a RAG store with tables and headings preserved:
bashxberg batch docs/*.pdf --format json --content-format markdown \ | jq -c '.results[] | {content: .content, tables: .tables}'
Strip a file to bare text for a token-tight summarizer:
bashxberg extract long.pdf \ --content-format plain \ --token-reduction moderate
Pull metadata only, ignore content:
bashxberg extract file.pdf --format json | jq '.result.metadata'
markdown as the content format. It is the bestcompromise across LLMs, RAG, and human review, and Xberg has the most faithful renderer for it.
plain only when downstream cannot tolerate any markup.djot only if you're already in a djot/pandoc pipeline.html only when re-rendering for the web.json for a heading-driven content tree, or doctags for Docling-compatible output.--token-reduction collapses whitespace, strips repeated headers/footers, and trims boilerplate. It composes with any --content-format:
off (default), light, moderate, aggressive, maximum.Use moderate as a safe starting point for LLM context windows. maximum is lossy — verify before relying on it.
See references/cli-reference.md for the full flag set and references/configuration.md for the equivalent output_format and token_reduction keys in xberg.toml.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 15,145 | 5,957 | -61% | 1 | 1 | 0% | 2,296 | 1,995 | -13% | 0 | 0 | — |
case-02 | fail→pass | 15,280 | 4,915 | -68% | 1 | 1 | 0% | 2,209 | 1,705 | -23% | 0 | 0 | — |
case-03 | fail→pass | 17,296 | 9,658 | -44% | 1 | 1 | 0% | 2,584 | 2,416 | -7% | 0 | 0 | — |
case-04 | fail→pass | 9,625 | 5,169 | -46% | 1 | 1 | 0% | 1,464 | 1,735 | +19% | 0 | 0 | — |
case-05 | fail→pass | 11,810 | 5,961 | -50% | 1 | 1 | 0% | 1,723 | 1,766 | +2% | 0 | 0 | — |
case-06 | fail→pass | 15,911 | 8,789 | -45% | 1 | 1 | 0% | 2,138 | 2,196 | +3% | 0 | 0 | — |
case-07 | fail→pass | 15,495 | 4,300 | -72% | 1 | 1 | 0% | 2,193 | 1,622 | -26% | 0 | 0 | — |
case-08 | fail→pass | 9,650 | 3,511 | -64% | 1 | 1 | 0% | 1,482 | 1,503 | +1% | 0 | 0 | — |
case-09 | fail→pass | 15,816 | 6,419 | -59% | 1 | 1 | 0% | 2,132 | 1,848 | -13% | 0 | 0 | — |
case-10 | fail→pass | 11,306 | 5,309 | -53% | 1 | 1 | 0% | 1,775 | 1,731 | -2% | 0 | 0 | — |
case-11 | pass→pass | 13,387 | 5,359 | -60% | 1 | 1 | 0% | 1,842 | 1,874 | +2% | 0 | 0 | — |
case-12 | pass→pass | 10,408 | 3,610 | -65% | 1 | 1 | 0% | 1,616 | 1,508 | -7% | 0 | 0 | — |
case-13 | fail→pass | 16,012 | 5,252 | -67% | 1 | 1 | 0% | 2,138 | 1,868 | -13% | 0 | 0 | — |
case-14 | pass→pass | 14,900 | 3,086 | -79% | 1 | 1 | 0% | 1,999 | 1,477 | -26% | 0 | 0 | — |
case-15 | pass→pass | 23,867 | 3,547 | -85% | 1 | 1 | 0% | 4,063 | 1,674 | -59% | 0 | 0 | — |
case-16 | pass→pass | 22,039 | 3,866 | -82% | 1 | 1 | 0% | 3,696 | 1,406 | -62% | 0 | 0 | — |
case-17 | fail→pass | 14,618 | 4,719 | -68% | 1 | 1 | 0% | 2,212 | 1,774 | -20% | 0 | 0 | — |
case-18 | pass→pass | 15,265 | 4,351 | -71% | 1 | 1 | 0% | 2,104 | 1,642 | -22% | 0 | 0 | — |
case-19 | pass→pass | 29,172 | 2,880 | -90% | 1 | 1 | 0% | 4,587 | 1,445 | -68% | 0 | 0 | — |
case-20 | fail→pass | 10,342 | 3,784 | -63% | 1 | 1 | 0% | 1,337 | 1,546 | +16% | 0 | 0 | — |
case-21 | pass→pass | 8,634 | 3,583 | -59% | 1 | 1 | 0% | 1,428 | 1,501 | +5% | 0 | 0 | — |
case-22 | fail→pass | 7,779 | 3,560 | -54% | 1 | 1 | 0% | 1,091 | 1,325 | +21% | 0 | 0 | — |
case-23 | fail→fail | 9,553 | 12,623 | +32% | 1 | 1 | 0% | 1,419 | 2,989 | +111% | 0 | 0 | — |
case-24 | fail→fail | 18,071 | 8,314 | -54% | 1 | 1 | 0% | 2,721 | 2,227 | -18% | 0 | 0 | — |
case-25 | fail→pass | 14,393 | 9,105 | -37% | 1 | 1 | 0% | 2,382 | 2,316 | -3% | 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. 25 cases were attempted. The headline lift of +60 percentage points is the difference between those two pass rates over the 25 comparable cases.
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 | 9/19/2026 | +61% |
| gemini-3.6-flash | verified | 9/9/2026 | +70% |
| gemini-3.6-flash | verified | 9/1/2026 | +65% |
| gemini-3.6-flash | verified | 8/17/2026 | +68% |
| gemini-3.6-flash | verified | 8/11/2026 | +50% |
Other measured skills in the registry, with their headline benchmark lift.