Agent skill

Z Md To PDF

by tjxj in tjxj/z-skills

将 Markdown、Obsidian 笔记、技术文章、白皮书或长文排成中文 PDF。用户说“转成 PDF”“Markdown 转 PDF”“md 转 pdf”“排版成电子书”“生成指定风格 PDF”“一次生成多种风格”“学术风/书籍风/报告风”,或要编译 my-girlfriend-jingtian-latex 项目时,都应使用本…

MITAuto-check passedDocuments & Office

Install Z Md To PDF

skills CLI
$ npx skills add tjxj/z-skills --skill z-md-to-pdf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tjxj/z-skills z-md-to-pdf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tjxj/z-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/z-md-to-pdf .claude/skills/z-md-to-pdf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
z-md-to-pdf
GitHub stars
548
Token cost
~711 tokens
SKILL.md length
154 words
Files
12 (incl. scripts)
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

将 Markdown、Obsidian 笔记、技术文章、白皮书或长文排成中文 PDF。用户说“转成 PDF”“Markdown 转 PDF”“md 转 pdf”“排版成电子书”“生成指定风格 PDF”“一次生成多种风格”“学术风/书籍风/报告风”,或要编译 my-girlfriend-jingtian-latex 项目时,都应使用本…

  • Works in 5 steps: 环境检查通过 → 用户指定的每种风格均生成非空 PDF → PDF 能被 pdfinfo 读取,页数合理 → …
  • Tasks that involve PDF
  • SKILL.md covers 完成标准, 风格选择, 第一次使用 and 生成 PDF, plus 5 more sections
  • Runs Shell scripts from its folder; calls bash and pdftotext

What it does

Z Md To PDF is an agent skill from tjxj/z-skills. 将 Markdown、Obsidian 笔记、技术文章、白皮书或长文排成中文 PDF。用户说“转成 PDF”“Markdown 转 PDF”“md 转 pdf”“排版成电子书”“生成指定风格 PDF”“一次生成多种风格”“学术风/书籍风/报告风”,或要编译 my-girlfriend-jingtian-latex 项目时,都应使用本 Skill。内置学术朴素风、文楷书籍风、现代报告风,支持只生成一种或批量生成全部风格,并附带上游 XeLaTeX 项目原样复编工具。

Its SKILL.md is about 710 tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts (for example `README.md`, `evals/evals.json` and `examples/sample.md`). Compatibility notes: macOS 或 Linux;需要 Bash、Pandoc、XeLaTeX。setup.sh 可自动补齐环境。

It sits in Documents & Office, covering PDF, LaTeX and Markdown. It works with LaTeX and Obsidian. The repository describes itself as: A collection of reusable skills. The licence is MIT.

When your agent uses it

  • Tasks that involve PDF
  • Tasks that involve LaTeX
  • Tasks that involve Markdown

Example prompts

  • “转成 PDF”
  • “Markdown 转 PDF”
  • “md 转 pdf”
  • “/z-md-to-pdf”

Requirements

  • A Bash shell
  • Compatibility (from SKILL.md): macOS 或 Linux;需要 Bash、Pandoc、XeLaTeX。setup.sh 可自动补齐环境。

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. 环境检查通过
  2. 用户指定的每种风格均生成非空 PDF
  3. PDF 能被 pdfinfo 读取,页数合理
  4. pdftotext 能提取出中文正文,说明没有空白或乱码
  5. 批量模式缺少任一风格时,任务失败并修复

What it can do on your machine

Read from SKILL.md and the folder at commit a29467e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 7 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • pdftotext

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    macOS 或 Linux;需要 Bash、Pandoc、XeLaTeX。setup.sh 可自动补齐环境。

    From compatibility in the SKILL.md frontmatter.

Context cost

Z Md To PDF loads about 711 tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 154 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~711

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from tjxj/z-skills at commit a29467e, republished under its MIT licence (© tjxj). 154 words, ~711 tokens.

Download SKILL.mdSave it as .claude/skills/z-md-to-pdf/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
z-md-to-pdf
description
将 Markdown、Obsidian 笔记、技术文章、白皮书或长文排成中文 PDF。用户说“转成 PDF”“Markdown 转 PDF”“md 转 pdf”“排版成电子书”“生成指定风格 PDF”“一次生成多种风格”“学术风/书籍风/报告风”,或要编译 my-girlfriend-jingtian-latex 项目时,都应使用本 Skill。内置学术朴素风、文楷书籍风、现代报告风,支持只生成一种或批量生成全部风格,并附带上游 XeLaTeX 项目原样复编工具。
compatibility
macOS 或 Linux;需要 Bash、Pandoc、XeLaTeX。setup.sh 可自动补齐环境。

Markdown → 多风格 PDF

把 Markdown 交给 Pandoc,再由 XeLaTeX 完成中文字体、页面、目录、页眉页脚和 PDF 输出

完成标准

一次任务只有同时满足以下条件才算完成:

  1. 环境检查通过
  2. 用户指定的每种风格均生成非空 PDF
  3. PDF 能被 pdfinfo 读取,页数合理
  4. pdftotext 能提取出中文正文,说明没有空白或乱码
  5. 批量模式缺少任一风格时,任务失败并修复

风格选择

风格参数中文名适用场景
academic学术朴素风论文笔记、研究报告、课程材料
book文楷书籍风长文、随笔、电子书、个人作品集
report现代报告风技术白皮书、方案、商业报告
all全部风格同一内容一次生成三份 PDF 供比较

用户没有指定风格时,使用 all

第一次使用

先检测:

bash
bash <skill目录>/scripts/setup.sh --check

检测失败时自动安装:

bash
bash <skill目录>/scripts/setup.sh

安装脚本会准备 Pandoc、轻量 TeX 环境、中文排版组件。构建脚本会自动发现 TinyTeX,无需修改终端配置

生成 PDF

指定一种风格:

bash
bash <skill目录>/scripts/build.sh \
  -i /absolute/path/article.md \
  -o /absolute/path/dist/article \
  --style book \
  --title "文章标题" \
  --author "作者"

一次生成全部风格:

bash
bash <skill目录>/scripts/build.sh \
  -i /absolute/path/article.md \
  -o /absolute/path/dist/article \
  --style all

输出文件会自动带中文风格后缀:

  • article-学术朴素风.pdf
  • article-文楷书籍风.pdf
  • article-现代报告风.pdf

正文第一个一级标题会作为默认 PDF 标题。使用 --no-toc 可关闭目录

复编孙宇晨项目

用户给出 my-girlfriend-jingtian-latex 本地目录并要求变成 PDF 时,使用:

bash
bash <skill目录>/scripts/build-upstream.sh \
  /absolute/path/my-girlfriend-jingtian-latex \
  /absolute/path/output/我的女友景甜.pdf

这个入口直接使用上游仓库里的 main.tex、封面和字体,连续编译两次,保留原项目的 5×8 英寸版式

上游当前的 assets/cover.pdf 在常见渲染器中会显示为空白页。仓库自带成品 PDF 时,脚本会临时提取成品第一页作为正常封面,整个过程不改动上游文件

上游仓库当前没有声明开源许可证。不要把它的正文、封面、字体或 main.tex 复制进本 Skill,也不要把本 Skill 的 MIT 许可证解释成对上游文件的授权。精确复编时让用户自己提供已下载的上游项目目录

输入兼容

  • 标准 Markdown 标题、列表、引用、代码块、表格和链接
  • Obsidian 图片语法 ![[image.png]],构建前会转成标准 Markdown 图片
  • 中文与英文混排
  • 图片相对路径,按源 Markdown 所在目录查找

外链图片下载失败时,保留编译日志并明确提示。不要把缺图的 PDF 当成成功交付

验收

完成构建后运行:

bash
pdfinfo /absolute/path/output.pdf
pdftotext /absolute/path/output.pdf - | head

需要同时回归三套模板和上游项目时运行:

bash
bash <skill目录>/scripts/smoke-test.sh \
  --upstream /absolute/path/my-girlfriend-jingtian-latex

扩展模板

三套风格分别由以下文件控制:

  • scripts/academic-style.tex
  • scripts/book-style.tex
  • scripts/modern-report-style.tex

新增风格时复制其中最接近的一份样式,随后在 build.sh 增加明确的风格名、输出后缀和字体回退。新风格必须加入 smoke-test.sh,保证单独生成与批量生成都可验证

常见问题

现象处理
找不到 xelatex运行 setup.sh,构建脚本也会自动查找 TinyTeX
中文字体报错macOS 启用宋体/冬青黑体,Linux 安装 Noto CJK 字体
霞鹜文楷未安装书籍风自动回退为宋体或 Noto Serif CJK
外链图片缺失检查网络后重跑,或先把图片保存到 Markdown 同目录
只想要一份 PDF传 --style academic/book/report,避免使用 all
原项目编译失败先确认封面、两款字体和 main.tex 都在原仓库目录中

© tjxj, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 11 other files (scripts) in z-md-to-pdf of tjxj/z-skills.

  • SKILL.md
  • LICENSE
  • README.md
  • evals/evals.json
  • examples/sample.md
  • scripts/academic-style.tex
  • scripts/book-style.tex
  • scripts/build-upstream.sh
  • scripts/build.sh
  • scripts/modern-report-style.tex
  • scripts/setup.sh
  • scripts/smoke-test.sh

Open the folder on GitHubat commit a29467e

Compare with similar skills

Z Md To PDF next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Z Md To PDF compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Z Md To PDF this skilltjxj/z-skills548—~711Automated safety check: PassMIT
MineruNebutra/MinerU-Skill123—~504Automated safety check: PassMIT
Lov Any2pdflovstudio/any2pdf211—~2.4kAutomated safety check: NotesMIT
MineruNebutra/MinerU-Skill123—~1.4kAutomated safety check: PassMIT
Lecture To Mdysyecust/lecture-to-notes273—~3.9kAutomated safety check: PassCustom licence
Chinese Copyright Applicationokooo5km/Skills4U183—~2.8kAutomated safety check: NotesMIT

Similar skills

  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into Markdown with MinerU — a fast, zero-config document parser for AI agents.

    123 GitHub stars~504 tokensUpdated 17 days ago
    Documents & OfficeAuto-check passed
  • Lov Any2pdf

    lovstudio/any2pdf

    Convert Markdown documents to professionally typeset PDF files with reportlab.

    211 GitHub stars~2.4k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Mineru

    Nebutra/MinerU-Skill

    An AI-Native skill for parsing PDF / Office / image files into clean Markdown with MinerU — a fast, zero-config document parser for AI agents.

    123 GitHub stars~1.4k tokensUpdated 17 days ago
    Documents & OfficeAuto-check passed
  • Lecture To Md

    ysyecust/lecture-to-notes

    把课堂视频(本地或 B 站/YouTube)、文字稿、课件三者(任意组合)整理成一份详细的中文 Markdown 课堂笔记,输出按课程标题命名的 {titlename}.md(首行为 文档标题)+ 相对路径图片。Markdown 工作流,与上游 lecture-to-notes 的 LaTeX/PDF 输出并行存在;上游 skill 完全不动。触发词:markdown 笔记、md 笔记、视频转…

    273 GitHub stars~3.9k tokensUpdated 8 days ago
    Documents & OfficeAuto-check passed
  • 中国软件著作权申请材料生成工具。申请表直接输出 Markdown 提交,源程序/用户手册/设计说明书三份生成 LaTeX 并编译为 PDF。自动分析项目代码,生成四份材料(前后各30页共60页源程序、含页眉页脚的用户手册和设计说明书、Markdown…

    183 GitHub stars~2.8k tokensUpdated 4 days ago
    Documents & OfficeAuto-check: notes
  • Marker

    benchflow-ai/skillsbench

    Convert PDF documents to Markdown using markersingle. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~520 tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed

More from tjxj/z-skills

All 15 skills in this repo
  • A skill your agent uses whenever the user wants answers, summaries, comparisons, decisions, quotations, persona simulations, articles, scripts, or claim checks that must stay grounded in…

    548 GitHub stars~1.7k tokensUpdated 19 days ago
    Auto-check passed
  • Z Qwen Audio Studio

    tjxj/z-skills

    A skill your agent uses when creating complete generated audio with qwen-audio-3.1-tts-next, including podcasts, radio drama, advertisements, multiple speakers, reference voices, ambience, sound…

    548 GitHub stars~716 tokensUpdated 19 days ago
    Auto-check passed
  • Z Mail Reader

    tjxj/z-skills

    A skill your agent uses when user wants to read emails, check inbox, fetch emails via IMAP, download email attachments, extract inline images, or summarize email content.

    548 GitHub stars~912 tokensUpdated 19 days ago
    Auto-check passed
  • Z Md Excel

    tjxj/z-skills

    Extract all Markdown tables from a .md file and export to Excel (.xlsx).

    548 GitHub stars~728 tokensUpdated 19 days ago
    Auto-check passed
  • Z Md To Word

    tjxj/z-skills

    Convert local Markdown files into Word documents. An agent skill from tjxj/z-skills.

    548 GitHub stars~815 tokensUpdated 19 days ago
    Auto-check passed
  • 将文章、讲稿或技术主题制作成王虹学术报告气质的 16:9 Notability 手写风 HTML 幻灯片,逐页导出 PNG,并默认同时生成可逐条播放动画的时间轴版 HTML。触发词:王虹PPT风格、王虹手写PPT、Notability学术手写幻灯片、手写网页PPT、手写PPT、数学家手写报告风、手写PPT时间轴版、手写演示动画。

    548 GitHub stars~952 tokensUpdated 19 days ago
    Auto-check passed

Works with

Questions about Z Md To PDF

What does Z Md To PDF do?

将 Markdown、Obsidian 笔记、技术文章、白皮书或长文排成中文 PDF。用户说“转成 PDF”“Markdown 转 PDF”“md 转 pdf”“排版成电子书”“生成指定风格 PDF”“一次生成多种风格”“学术风/书籍风/报告风”,或要编译 my-girlfriend-jingtian-latex 项目时,都应使用本…. Z Md To PDF is an agent skill from tjxj/z-skills.

When should I use Z Md To PDF?

Z Md To PDF fits situations like: tasks that involve PDF; tasks that involve LaTeX; tasks that involve Markdown.

How do I install Z Md To PDF in Claude Code?

Run `npx skills add tjxj/z-skills --skill z-md-to-pdf -a claude-code`. Or copy the skill folder (z-md-to-pdf in tjxj/z-skills) into .claude/skills/z-md-to-pdf in your project. Claude Code loads it when a task matches its description.

How do I install Z Md To PDF in Codex?

Run `npx skills add tjxj/z-skills --skill z-md-to-pdf -a codex`. Or copy the skill folder (z-md-to-pdf in tjxj/z-skills) into .agents/skills/z-md-to-pdf in your project. Codex loads it when a task matches its description.

Can I use Z Md To PDF in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tjxj/z-skills --skill z-md-to-pdf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/z-md-to-pdf, .gemini/skills/z-md-to-pdf, .github/skills/z-md-to-pdf and .opencode/skills/z-md-to-pdf in your project.

What does Z Md To PDF need to run?

Going by SKILL.md and its folder, Z Md To PDF needs a shell for the scripts in its folder and the command-line tools its instructions call (bash and pdftotext). Our summary lists: A Bash shell. Compatibility (from SKILL.md): macOS 或 Linux;需要 Bash、Pandoc、XeLaTeX。setup.sh 可自动补齐环境。.

Does Z Md To PDF access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Z Md To PDF safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Z Md To PDF use?

Z Md To PDF is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Z Md To PDF use?

About 711 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Z Md To PDF?

Skills that share tags, products or a category with Z Md To PDF: Mineru (Nebutra/MinerU-Skill, 123 stars), Lov Any2pdf (lovstudio/any2pdf, 211 stars), Mineru (Nebutra/MinerU-Skill, 123 stars) and Lecture To Md (ysyecust/lecture-to-notes, 273 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Z Md To PDF?

tjxj (a GitHub user) maintains it in tjxj/z-skills, which has 548 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on September 22, 2026.

Source: tjxj/z-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.