Saltar al contenido
Skillpedia
PDF, Word y diapositivas9,5 mil · #12273

xberg-picking-a-format

Qué hace

Esta habilidad explica qué formato de salida elegir al extraer texto de documentos. Está pensada para personas que alimentan herramientas de IA, bases de datos de búsqueda u otro software con los resultados.

Cuándo usarla

  • ✓Cuando envías texto extraído a un modelo de IA y quieres una salida limpia.
  • ✓Cuando cargas documentos en un almacén vectorial o en un índice de búsqueda.
  • ✓Cuando necesitas una salida estructurada que pueda leer otro programa.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Estoy extrayendo documentos para mi chatbot de IA. ¿Qué formato de salida debo usar?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente hace coincidir el consumidor de la salida con el formato y el ajuste de contenido adecuados, como Markdown para un modelo de IA o JSON para un programa, y también puede eliminar espacios en blanco sobrantes.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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.

Preguntas frecuentes

¿Cuál es la diferencia entre formato y formato de contenido?

El formato fija cómo imprime el comando el resultado, mientras que el formato de contenido fija cómo se escribe el texto que contiene.

¿Qué formato encaja con un modelo de IA?

La habilidad sugiere una salida en texto o Markdown para el contexto del modelo de IA.

¿Qué hace la reducción de tokens?

Elimina los espacios en blanco sobrantes y el texto repetitivo, en niveles desde desactivado hasta máximo, para ahorrar espacio en los prompts de IA.

Detalles

Descripción original del autor

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

Popularidad

Estrellas en GitHub
9,5 mil
Posición en el ranking
#12273
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas