Skip to content
cccskills
FreePublished on GitHub

xberg

Extract text, tables, metadata, and images from 97+ document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg CLI.

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md4.1 KB
  • references/supported-formats.md17.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Xberg Document Extraction

Xberg extracts text, tables, metadata, and images from 97+ file formats. Use it for document processing, OCR, batch extraction, and embeddings.

Run xberg --help for all commands, xberg <command> --help for full flag reference.

Core Usage

# Single file → stdout (text) or JSON
xberg extract document.pdf
xberg extract document.pdf --content-format markdown --format json

# Batch
xberg batch *.pdf --content-format markdown

# Detect MIME type
xberg detect unknown-file

Embeddings

Embeddings require ONNX Runtime. Use a local preset or pipe text through standard input.

xberg embed --text "hello world" --preset balanced
echo "some text" | xberg embed --preset fast

Chunking

xberg chunk --text "..." --chunk-size 500 --chunk-overlap 50
xberg chunk --chunker-type markdown --text "# Heading\n\nParagraph..."
cat file.txt | xberg chunk --chunker-type semantic --topic-threshold 0.8

Configuration

Xberg auto-discovers xberg.toml, xberg.yaml, xberg.yml, or xberg.json in the current or parent directories. Pass any configuration file explicitly with --config <path>.

xberg extract doc.pdf                          # finds xberg.toml automatically
xberg extract doc.pdf --config my.yaml         # explicit configuration file
xberg extract doc.pdf --config-json '{"ocr":{"language":"deu"}}'

Config file skeleton (field names are snake_case — max_chars not max_characters):

use_cache = true
enable_quality_processing = true
force_ocr = false

[ocr]
backend = "tesseract"
language = "eng"

[chunking]
max_chars = 1000 # NOT max_characters
max_overlap = 200 # NOT overlap

[pdf_options]
extract_images = true

Extracting Images from PDFs

Images are not written to disk — they come back as byte arrays in JSON output. Two-step process required:

# Step 1: capture JSON
xberg extract doc.pdf --pdf-extract-images true --format json > out.json

# Step 2: save images
python3 -c "
import json, pathlib
d = json.load(open('out.json'))
pathlib.Path('images').mkdir(exist_ok=True)
for img in d.get('images', []):
    pathlib.Path(f'images/image_{img[\"image_index\"]}.{img[\"format\"]}').write_bytes(bytes(img['data']))
"

Key Flags (Non-Obvious)

FlagNote
--formatWire format for CLI output: text (default for extract) or json
--content-formatFormat of extracted text: plain, markdown, djot, html. --output-format is a deprecated alias.
--token-reductionoff/light/moderate/aggressive/maximum — reduce tokens before LLM consumption
--accelerationONNX provider: auto, cpu, coreml (macOS), cuda, tensorrt
--pdf-extract-imagesEmbeds image bytes in JSON result (see above)

Common Pitfalls

  1. --format ≠ --content-format: one controls the serialization envelope, the other the text inside it.
  2. Config auto-discovery searches xberg.toml, xberg.yaml, xberg.yml, and xberg.json.
  3. PDF images land in result.images[] as byte arrays; nothing is written to disk automatically.
  4. embed requires ONNX Runtime; install it for your platform before using embeddings.
  5. For large documents, use --token-reduction to reduce LLM context usage.

References

  • Supported formats: grep references/supported-formats.md instead of reading it whole e.g. grep '.mdoc' references/supported-formats.md

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

coss

Free

Helps implement coss UI components correctly. Use when building UIs with coss primitives (buttons, dialogs, selects, forms, menus, tabs, inputs, toasts, etc.), migrating from shadcn/Radix to coss/Base UI, composing trigger-based overlays, or troubleshooting coss component behavior. Covers imports, accessibility, Tailwind styling, and common pitfalls.

The English summary is being prepared. Showing the original description.

CherryHQ/stella53Updated Oct 2, 2026

Index of all COSS UI particle examples. Use when implementing UI features to find copy-paste-ready component patterns built on coss primitives. Each particle has a description and a JSON URL for easy installation.

The English summary is being prepared. Showing the original description.

CherryHQ/stella53Updated Oct 2, 2026

email

Free

Standard IMAP/SMTP email client for Gmail, Outlook, and self-hosted accounts. Use when user mentions email, inbox, send email, check mail, read message, compose, reply, set up email, add email account, configure email (non-Lark/Feishu accounts).

The English summary is being prepared. Showing the original description.

CherryHQ/stella53Updated Oct 2, 2026

Create polished single-file HTML artifacts for plans, reports, explainers, code reviews, lightweight dashboards, prototypes, and one-off editing tools. Use when the user asks for a standalone HTML file, single HTML, HTML artifact, interactive report, shareable local artifact, Alpine.js artifact, custom CSS artifact, copy/export UI, or a browser-openable deliverable instead of Markdown.

The English summary is being prepared. Showing the original description.

CherryHQ/stella53Updated Oct 2, 2026

Lark/Feishu workspace operations through the `lark-cli` tool — calendar and meeting rooms, docs, sheets, Base (多维表格), wiki, drive, mail, IM messages, tasks, OKR, approvals, minutes, video conferences, whiteboards, slides, contacts, attendance, and real-time events. Use whenever the user mentions 飞书 / Lark / 我的日程 / 约会议 / 订会议室 / 飞书文档 / 多维表格 / 知识库 / 云空间 / 发消息 / 群聊 / 邮件 / 待办 / OKR / 审批 / 妙记 / 会议纪要 / 画板 / 幻灯片, or asks to look up a colleague, or hands you a `feishu.cn` / `larksuite.com` URL. Also covers `lark-cli` setup, auth login, and permission-denied errors.

The English summary is being prepared. Showing the original description.

CherryHQ/stella53Updated Oct 2, 2026

Create robust Python automation with full logging and safety checks. Use when tasks need complex data processing, authenticated API work, conditional file operations, or error handling beyond simple shell commands.

The English summary is being prepared. Showing the original description.

CherryHQ/stella53Updated Oct 2, 2026

See all skills by CherryHQ

Report a problem with this skill