شعار Markdown Pdf Skill

Markdown Pdf Skill

المجتمع
GanymedeNil
markdown-pdf-skill

Convert Markdown into polished, print-ready PDF documents with deliberate typography, automatic or user-selected style templates, reliable local and remote image handling, robust CJK support, page headers and footers, and pagination-aware layout. Use when Codex needs to export, typeset, restyle, or visually QA Markdown as PDF, especially for long documents containing headings, tables, code blocks, images, lists, blockquotes, footnotes, math, or content that must cross pages cleanly.

نظرة عامة

الناشرGanymedeNil
المستودعpoxiaoxing-skills
اسم المهارةmarkdown-pdf-skill
النجوم
75
التفريعات
7
الملفات المرفقة
21
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 21

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها GanymedeNil على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Markdown Pdf Skill في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/GanymedeNil/poxiaoxing-skills/tree/main/markdown-pdf-skill
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/GanymedeNil/poxiaoxing-skills.git /tmp/poxiaoxing-skills
mkdir -p .claude/skills
cp -r /tmp/poxiaoxing-skills/markdown-pdf-skill .claude/skills/markdown-pdf-skill
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Markdown Pdf Skill في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Markdown Pdf Skill تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Markdown Pdf Skill بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Markdown PDF Skill

Turn Markdown into a professional PDF and prove that the rendered pages are sound. Treat pagination as part of the design, not as a final conversion step.

Workflow

  1. Ask about the table of contents before doing any layout work.

    • Ask the user: 是否需要加入目录?
    • Wait for the answer. Do not infer the choice from document length.
    • Skip the question only when the current request already says to include or omit a table of contents.
    • Pass --toc for yes or --no-toc for no. The exporter rejects an omitted choice.
  2. Inspect the source before exporting.

    • Identify the language, title hierarchy, long tables, long code blocks, local or remote images, raw HTML, footnotes, math, and explicit page-break requests.
    • Preserve the author's words and structure unless the user asks for editorial changes.
    • Read references/markdown-support.md when the document uses unusual Markdown, diagrams, math, raw HTML, or oversized media.
  3. Choose print geometry and style deliberately.

    • Default to A4 portrait for CJK and international documents.
    • Use Letter only for US-facing material.
    • Use landscape for genuinely wide tables; do not shrink normal prose to rescue one table.
    • Honor an explicitly requested theme. Otherwise keep --theme auto and report the selected theme and reason.
    • Run python3 scripts/export_markdown_pdf.py --list-themes or read references/themes.md when the user wants choices.
    • Read references/pagination.md before tuning a long or layout-sensitive document.
  4. Export with the bundled renderer.

    bash
    python3 scripts/export_markdown_pdf.py INPUT.md -o OUTPUT.pdf --toc --theme auto

    Use --remote-images freeze (the default) to download and embed online images. Add --orientation landscape, an explicit --theme, --math, or --css custom.css only when the content requires it. Use <!-- pagebreak --> for an intentional hard break. Use <div class="keep-together" markdown="1">...</div> sparingly for a short block that must remain intact.

  5. Inspect the actual PDF, not only the HTML.

    bash
    python3 scripts/inspect_pdf.py OUTPUT.pdf --output-dir tmp/pdfs/review

    Open the generated contact sheet, then inspect suspicious pages at full resolution. Check every page for clipped content, awkward whitespace, orphaned headings, lonely final lines, table row breaks, repeated table headers, split captions, image scale, code wrapping, page numbering, and CJK glyph fallback.

  6. Iterate until clean.

    • Fix the source structure first, then CSS.
    • Prefer local, targeted classes or page breaks over global font reduction.
    • Re-export and re-run inspection after every meaningful layout change.
    • Deliver only after the latest rendered pages show no visible defects.

Installation

Create an isolated environment and install the pinned capability set when imports are missing:

bash
python3 -m venv .venv
.venv/bin/python -m pip install -r scripts/requirements.txt

The renderer uses Python-Markdown, WeasyPrint, and Matplotlib's vector math renderer. The inspector uses PyMuPDF, pypdf, and Pillow. If WeasyPrint installation fails because native libraries are absent, follow the platform instructions printed by WeasyPrint rather than silently switching renderers; pagination differs across engines.

Rendering Rules

  • Keep headings with at least the next content block.
  • Apply widows and orphans controls to prose and list items.
  • Keep short tables, code blocks, quotes, and figures together; allow oversized blocks to split so they do not overflow or create blank pages.
  • Repeat table headers across pages and never split a table row.
  • Keep captions with their media.
  • Preserve readable type size. Change orientation or restructure an oversized table before reducing body text.
  • Use system CJK font fallbacks and verify every glyph visually.
  • Keep links clickable, footnotes legible, and syntax highlighting printable in grayscale.
  • Avoid a hard page break unless semantic grouping or visual balance clearly benefits.

Inputs and Outputs

  • Accept UTF-8 Markdown and resolve relative images from the Markdown file's directory.
  • Read optional YAML frontmatter keys: title, subtitle, author, date, and lang.
  • Resolve local images from the Markdown directory. Download and embed remote images by default; use live URLs only when the user explicitly accepts non-reproducible output.
  • Preserve raw HTML supported by WeasyPrint. Expect JavaScript-dependent content to require pre-rendering.
  • Write final PDFs to the path requested by the user. Place temporary HTML, page images, and reports under tmp/pdfs/ and remove them after final approval.
  • Keep filenames stable and descriptive.

Manual Controls

  • Insert <!-- pagebreak --> for an explicit new page.
  • Wrap a short unit in <div class="keep-together" markdown="1">...</div> to prohibit an internal break.
  • Wrap content in <div class="avoid-break-before" markdown="1">...</div> to keep it near the preceding block.
  • Add a user stylesheet with --css; keep overrides narrow and document-specific.
  • Save intermediate HTML with --html-output PATH when diagnosing selector or asset problems.

Quality Gate

Require all of the following before delivery:

  • The exporter completes without missing-asset or unsupported-feature warnings.
  • The inspector reports the expected page size, no blank pages, no out-of-bounds text or image blocks, and no heading stranded at a page bottom.
  • Contact-sheet review covers every page.
  • Full-size review covers the first page, final page, every page transition around a table or code block, and every page reported as suspicious.
  • Extracted text is non-empty and major headings appear in the expected order.
  • The final PDF contains no placeholders, debug paths, tool tokens, or accidental intermediate content.

Use references/qa-checklist.md for the final visual pass.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Markdown Pdf Skill؟

Convert Markdown into polished, print-ready PDF documents with deliberate typography, automatic or user-selected style templates, reliable local and remote image handling, robust CJK support, page headers and footers, and pagination-aware layout. Use when Codex needs to export, typeset, restyle, or visually QA Markdown as PDF, especially for long documents containing headings, tables, code blocks, images, lists, blockquotes, footnotes, math, or content that must cross pages cleanly.

لماذا تستخدم Markdown Pdf Skill على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Markdown Pdf Skill عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Markdown Pdf Skill في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/GanymedeNil/poxiaoxing-skills/tree/main/markdown-pdf-skill. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Markdown Pdf Skill؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Markdown Pdf Skill؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Markdown Pdf Skill معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Markdown Pdf Skill مجانية؟

نعم. نشرها GanymedeNil على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇