Skills

Xberg Picking A Format

Use when choosing an output format for extracted documents, plain text, markdown...

Install

npx skills add xberg-io/xberg --skill xberg-picking-a-format -g -a claude-code -y
Repository
xberg-io/xberg9.5k
Category
AI and agents
Updated
3d ago
License
MIT
Context cost
Lightabout 965 tokens
Runs scripts
No, instructions only

What it does

Use when choosing an output format for extracted documents, plain text, markdown, djot, HTML, JSON, or DocTags. Maps consumer (LLM, parser, archive) to the right `--format` / `--content-format` pair.

<!-- AI-RULEZ :: GENERATED FILE, DO NOT EDIT Content-Hash: blake3:a2f204c34c2eb303812f0b7b0a9acf29c879edd1985b8cc3312555b347378e1e Source-Hash: blake3:4a90223a333b0f963ae8cdec4f38db88b769132c5dd1b7f39a7fe8e84f57f83e Schema-Version: v1 -->

Picking a format

Xberg has two orthogonal format knobs. Get them right up front and the downstream code stays simple.

KnobWhat it controlsValuesDefault
--formatHow the CLI prints the resulttext, json, toontext (extract), json (batch)
--content-formatHow extracted content is rendered inside resultplain, markdown, djot, html, json, doctagsplain
--token-reductionStrip whitespace / boilerplate for LLM contextsoff, light, moderate, aggressive, maximumoff

--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.

Decision tree

Read the whole SKILL.md on GitHub

More in AI and agents