# Xberg Picking A Format

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

- Repository: https://github.com/xberg-io/xberg (9506 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add xberg-io/xberg --skill xberg-picking-a-format -g -a claude-code -y`
Codex: `npx skills add xberg-io/xberg --skill xberg-picking-a-format -g -a codex -y`
Cursor: `npx skills add xberg-io/xberg --skill xberg-picking-a-format -g -a cursor -y`
Gemini CLI: `npx skills add xberg-io/xberg --skill xberg-picking-a-format -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add xberg-io/xberg`

## Description

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.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

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

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

## Decision tree

The rest: https://github.com/xberg-io/xberg/blob/HEAD/plugin/.cursor-plugin/skills/xberg-picking-a-format/SKILL.md
