跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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月21日 更新

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月21日 更新

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月21日 更新

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月21日 更新

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月21日 更新

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月21日 更新

查看 CherryHQ 的全部技能

报告此技能的问题