本文へ移動
cccskills
無料GitHub で公開

xberg

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

インストール方法を見る

含まれるファイル(2)

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

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

coss

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

CherryHQ/stella532026年10月2日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

CherryHQ/stella532026年10月2日 更新

email

無料

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

日本語の概要は準備中です。原文の説明を表示しています。

CherryHQ/stella532026年10月2日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

CherryHQ/stella532026年10月2日 更新

lark-cli

無料

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.

日本語の概要は準備中です。原文の説明を表示しています。

CherryHQ/stella532026年10月2日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

CherryHQ/stella532026年10月2日 更新

CherryHQ のスキルをすべて見る

このスキルの問題を報告する