← 返回 Skills 市场
danielefavi

Bookify - Convert Markdown to PDF or EPUB

作者 Dan · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ 安全检测通过
124
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install bookify
功能描述
Convert Markdown files to styled PDF or EPUB ebook using md-bookify. Use when the user wants to generate a PDF document or EPUB ebook from markdown content o...
使用说明 (SKILL.md)

Convert Markdown to PDF or EPUB

Use the md-bookify npm package via npx to convert Markdown files to styled PDF documents or EPUB ebooks.

Interpreting Arguments

  • If $ARGUMENTS contains a file path (ends in .md or .markdown), convert that file
  • If $ARGUMENTS includes pdf or epub, use that format (default: PDF)
  • If $ARGUMENTS is descriptive (e.g. "convert the README to elegant PDF"), parse the intent
  • If no file is specified, use Glob to find markdown files and ask which to convert

PDF Conversion

npx [email protected] \x3Cinput.md> [options]

Options:

  • -o, --output \x3Cpath> — Output PDF file path (default: same name with .pdf extension)
  • -t, --title \x3Ctitle> — Document title (default: filename)
  • --author \x3Cname> — Author name
  • -f, --format \x3Cformat> — Page format: A4 (default), Letter, Legal
  • -s, --style \x3Cname> — Style name or path to .css file (see Styles below)
  • --landscape — Landscape orientation (good for wide tables or code)
  • --margin-top \x3Cmargin> — Top margin (e.g. 20mm)
  • --margin-right \x3Cmargin> — Right margin
  • --margin-bottom \x3Cmargin> — Bottom margin
  • --margin-left \x3Cmargin> — Left margin

EPUB Conversion

npx [email protected] epub \x3Cinput.md> [options]

Options:

  • -o, --output \x3Cpath> — Output EPUB file path (default: same name with .epub extension)
  • -t, --title \x3Ctitle> — Document title (default: filename)
  • --author \x3Cname> — Author name
  • --language \x3Ccode> — Language code (default: en)
  • --publisher \x3Cname> — Publisher metadata
  • --description \x3Ctext> — Book description metadata
  • --cover \x3Cpath> — Path to cover image file

Important: EPUB ignores --style, --format, --landscape, and --margin-* flags — those are PDF-only.

Built-in Styles (PDF only)

Style Description
default Clean, modern sans-serif styling
serif Traditional book appearance with serif fonts
elegant Refined typography with tasteful spacing
eink Optimized for e-ink displays, high contrast
eink-serif Serif variant optimized for e-ink readers

Use with -s: npx [email protected] file.md -s elegant

You can also pass a path to any .css file: npx [email protected] file.md -s ./custom.css

Supported Markdown Features

  • GitHub Flavored Markdown (tables, task lists, strikethrough)
  • Fenced code blocks with syntax highlighting (TypeScript, JavaScript, Python, Go, Rust, Java, Bash, JSON, CSS, HTML, YAML, SQL, Diff)
  • KaTeX math: $inline$ and $$block$$
  • Images with relative paths (resolved from source file directory)

Error Recovery

  • Chromium not found: Run npx puppeteer@24 browsers install chrome
  • File not found: Verify the path exists. Use Glob to search for markdown files if needed.
  • Node version: Requires Node >= 20

Examples

# Basic PDF
npx [email protected] README.md

# Styled PDF with author
npx [email protected] report.md -s elegant --author "Jane Doe" -o output/report.pdf

# US Letter format, landscape
npx [email protected] data.md -f Letter --landscape

# EPUB ebook with cover
npx [email protected] novel.md epub --author "Author Name" --cover cover.jpg

# EPUB with metadata
npx [email protected] docs.md epub -t "User Guide" --publisher "Acme Corp" --description "Complete user guide"
安全使用建议
This skill is coherent for converting Markdown to PDF/EPUB, but it runs npm packages via npx at runtime. Before using it, verify the [email protected] package reputation and source (check the npm package page and recent release notes), ensure the execution environment has Node >= 20 and is trusted, and consider running conversions in a sandboxed or limited-permission environment. If you prefer not to fetch code at runtime, preinstall the package versions you trust on the host and ensure Chromium is available to avoid on-demand downloads.
能力评估
Purpose & Capability
The name/description say 'convert Markdown to PDF or EPUB using md-bookify' and the instructions explicitly invoke npx [email protected] and (when needed) npx puppeteer to install Chromium. Required tools/paths/credentials are consistent with that purpose.
Instruction Scope
SKILL.md only tells the agent to locate/read Markdown files (via Glob/Read) and run md-bookify (and optionally puppeteer to install Chromium). These actions are proportionate to converting markdown files; there are no instructions to access unrelated system files, credentials, or external endpoints beyond npm-driven package fetches and the normal package runtime behavior.
Install Mechanism
This is an instruction-only skill with no install spec, but it relies on npx to fetch and execute [email protected] and puppeteer@24 at runtime from the npm registry. Fetching and executing packages on-demand is coherent for this task but carries typical supply-chain risk (remote code execution from npm). The SKILL.md pins versions, which reduces some risk, but users should still verify the package and version.
Credentials
No environment variables or secrets are requested. The only environmental requirements are Node >= 20, ability to run npx, and (optionally) downloading Chromium via puppeteer. Those are appropriate for running an npm-based converter and for rendering PDFs.
Persistence & Privilege
The skill is not always-enabled, doesn't request persistent system-wide changes, and doesn't ask to modify other skills' configs. It will run packages at execution time but does not claim elevated or persistent privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install bookify
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /bookify 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Updated to use md-bookify version 2.2.1 and puppeteer version 24 for improved compatibility and features. - The Bash commands now explicitly specify [email protected] and puppeteer@24. - Added a source link to the npm package in the skill description. - All usage instructions and example commands updated to reference the new package versions.
v1.0.0
- Initial release of the "bookify" skill. - Converts Markdown files to styled PDF or EPUB using the md-bookify npm package. - Supports flexible input: specify file, format, or descriptive intent. - Includes custom output options, styling, and metadata for both PDF and EPUB. - Built-in error recovery for missing files, dependencies, and node version requirements.
元数据
Slug bookify
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Bookify - Convert Markdown to PDF or EPUB 是什么?

Convert Markdown files to styled PDF or EPUB ebook using md-bookify. Use when the user wants to generate a PDF document or EPUB ebook from markdown content o... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 124 次。

如何安装 Bookify - Convert Markdown to PDF or EPUB?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install bookify」即可一键安装,无需额外配置。

Bookify - Convert Markdown to PDF or EPUB 是免费的吗?

是的,Bookify - Convert Markdown to PDF or EPUB 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Bookify - Convert Markdown to PDF or EPUB 支持哪些平台?

Bookify - Convert Markdown to PDF or EPUB 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Bookify - Convert Markdown to PDF or EPUB?

由 Dan(@danielefavi)开发并维护,当前版本 v1.0.1。

💬 留言讨论