Zum Inhalt springen
Skillpedia
PDF, Word & Folien9.5k · #12273

xberg-picking-a-format

Was er macht

Dieser Skill erklärt, welches Ausgabeformat man wählt, wenn Text aus Dokumenten extrahiert wird. Er ist für Menschen gedacht, die Ergebnisse in KI-Werkzeuge, Suchdatenbanken oder andere Software einspeisen.

Wann du ihn nutzt

  • ✓Wenn du extrahierten Text an ein KI-Modell schickst und saubere Ausgabe willst.
  • ✓Wenn du Dokumente in einen Vektorspeicher oder Suchindex lädst.
  • ✓Wenn du strukturierte Ausgabe brauchst, die ein anderes Programm lesen kann.

Link zum Skill

https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Ich extrahiere Dokumente für meinen KI-Chatbot. Welches Ausgabeformat soll ich nutzen?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent ordnet den Empfänger der Ausgabe dem richtigen Format und der passenden Inhaltseinstellung zu, etwa Markdown für ein KI-Modell oder JSON für ein Programm, und kann außerdem überflüssige Leerzeichen entfernen.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

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

Who 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)

Examples

Feed a PDF directly into an LLM:

xberg extract paper.pdf --content-format markdown

Index a corpus into a RAG store with tables and headings preserved:

xberg batch docs/*.pdf --format json --content-format markdown \
  | jq -c '.result | {content: .content, tables: .tables}'

Strip a file to bare text for a token-tight summarizer:

xberg extract long.pdf \
  --content-format plain \
  --token-reduction moderate

Pull metadata only, ignore content:

xberg extract file.pdf --format json | jq '.result.metadata'

When in doubt

  • Default to markdown as the content format. It is the best compromise across LLMs, RAG, and human review, and Xberg has the most faithful renderer for it.
  • Reach for plain only when downstream cannot tolerate any markup.
  • Reach for djot only if you're already in a djot/pandoc pipeline.
  • Reach for html only when re-rendering for the web.
  • Reach for json for a heading-driven content tree, or doctags for Docling-compatible output.

Token-reduction (orthogonal)

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

Häufige Fragen

Was ist der Unterschied zwischen Format und Inhaltsformat?

Das Format legt fest, wie der Befehl das Ergebnis ausgibt, das Inhaltsformat legt fest, wie der Text darin geschrieben wird.

Welches Format eignet sich für ein KI-Modell?

Der Skill schlägt Text- oder Markdown-Ausgabe für den Kontext eines KI-Modells vor.

Was macht die Token-Reduktion?

Sie entfernt überflüssige Leerzeichen und Standardfloskeln, in Stufen von aus bis maximal, um Platz in KI-Prompts zu sparen.

Details

Originalbeschreibung des Autors

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.

repo: xberg-io/xberg

Beliebtheit

GitHub-Sterne
9.5k
Platz im Ranking
#12273
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills