xberg-picking-a-format
ما الذي تفعله
تشرح هذه المهارة أي صيغة إخراج تختار عند استخراج النص من المستندات. وهي مناسبة لمن يغذّون النتائج لأدوات الذكاء الاصطناعي أو قواعد البحث أو برامج أخرى.
متى تستخدمها
- ✓عندما ترسل النص المستخرج إلى نموذج ذكاء اصطناعي وتريد مخرجات نظيفة.
- ✓عندما تحمّل المستندات في مخزن متجهات أو فهرس بحث.
- ✓عندما تحتاج إلى مخرجات منظمة يستطيع برنامج آخر قراءتها.
رابط المهارة
https://github.com/xberg-io/xberg/blob/main/plugin/.ai-rulez/skills/xberg-picking-a-format/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أستخرج المستندات لروبوت المحادثة الخاص بي. أي صيغة إخراج أستخدم؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يطابق وكيلك الجهة التي ستستهلك المخرجات مع الصيغة وإعداد المحتوى المناسبين، مثل markdown لنموذج الذكاء الاصطناعي أو JSON لبرنامج. ويستطيع أيضاً إزالة المسافات الزائدة.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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
markdownas 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
plainonly when downstream cannot tolerate any markup. - Reach for
djotonly if you're already in a djot/pandoc pipeline. - Reach for
htmlonly when re-rendering for the web. - Reach for
jsonfor a heading-driven content tree, ordoctagsfor 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.
الأسئلة الشائعة
ما الفرق بين الصيغة وصيغة المحتوى؟
تحدد الصيغة طريقة طباعة الأمر للنتيجة، بينما تحدد صيغة المحتوى طريقة كتابة النص داخلها.
أي صيغة تناسب نموذج الذكاء الاصطناعي؟
تقترح المهارة مخرجات نصية أو markdown لسياق نموذج الذكاء الاصطناعي.
ماذا تفعل خاصية تقليل الرموز؟
تزيل المسافات الزائدة والنصوص الجاهزة المتكررة، بمستويات من الإيقاف حتى الحد الأقصى، لتوفير مساحة في أوامر الذكاء الاصطناعي.
التفاصيل
الوصف الأصلي من المؤلف
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
الشعبية
- نجوم GitHub
- 9.5k
- الترتيب
- #12273
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
xberg-batch-extraction
9.5kيساعد وكيلك على معالجة مستندات كثيرة دفعة واحدة باستخدام Xberg، بخيارات مشتركة، ودون أن يوقف الملف الفاشل بقية التشغيل.
xberg-chunking
9.5kيساعد وكيلك على تقسيم نصوص المستندات الطويلة إلى أجزاء أصغر لأوامر الذكاء الاصطناعي أو فهارس البحث، بأحجام محددة وتداخل اختياري.
xberg-extracting-keywords
9.5kيساعد وكيلك على استخراج الكلمات المفتاحية أو العبارات المهمة من المستند، وعلى التعرف على لغته، باستخدام إعدادات Xberg للكلمات المفتاحية.
xberg-extracting-tables
9.5kيساعد وكيلك على استخراج الجداول من ملفات PDF والجداول الحسابية والصور، مع الحفاظ على الصفوف والأعمدة كما هي بصيغة markdown أو بيانات منظمة.
مهارات مشابهة
feishu-doc
394kيساعد وكيلك على قراءة مستندات Feishu السحابية وإنشائها وتعديلها، بما فيها النصوص والصور والجداول، باستخدام أداة المستندات.
feishu-drive
394kيتيح لوكيلك تصفح الملفات في مجلد سحابي على Feishu شاركته مع البوت، وتنظيمها، والتعليق عليها.
feishu-perm
394kيساعد وكيلك على معرفة من يستطيع الوصول إلى ملف Feishu وتغيير ذلك، مع اختيار أدنى صلاحية تلبي طلبك.