markdown-to-pdf by duc01226/easyplatform
npx skills add https://github.com/duc01226/easyplatform --skill markdown-to-pdf[IMPORTANT] 在开始之前,务必使用
TaskCreate将所有工作分解为小任务——包括每个文件的读取任务。这可以防止因文件过长而丢失上下文。对于简单的任务,AI 必须询问用户是否跳过。
目标: 将 Markdown 文件转换为支持语法高亮和自定义 CSS 的 PDF。
工作流程:
关键规则:
保持怀疑态度。运用批判性思维、顺序性思维。每个主张都需要可追溯的证据,并给出置信度百分比(想法应超过 80%)。
将 Markdown 文件转换为高质量的 PDF 文档,支持代码语法高亮和自定义 CSS。
此技能需要 npm 依赖项。 运行以下命令之一:
# 选项 1:通过 ClaudeKit CLI 安装(推荐)
ck init # 运行 install.sh 以处理所有技能
# 选项 2:手动安装
cd .claude/skills/markdown-to-pdf
npm install
、
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
md-to-pdfgray-matter注意: 除非检测到系统已安装 Chrome,否则首次运行可能会下载 Chromium(约 150MB)。
# 基本转换
node .claude/skills/markdown-to-pdf/scripts/convert.cjs --input ./README.md
# 指定输出路径
node .claude/skills/markdown-to-pdf/scripts/convert.cjs --input ./doc.md --output ./output.pdf
# 使用自定义 CSS
node .claude/skills/markdown-to-pdf/scripts/convert.cjs --input ./doc.md --css ./my-style.css
| 选项 | 简写 | 描述 | 默认值 |
|---|---|---|---|
--input | -i | 输入 Markdown 文件路径 | (必需) |
--output | -o | 输出 PDF 文件路径 | {input}.pdf |
--css | -c | 自定义 CSS 文件路径 | 内置 |
--no-highlight | 禁用语法高亮 | false | |
--help | -h | 显示帮助信息 |
默认的 PDF 样式包括:
成功时返回 JSON:
{
"success": true,
"input": "/path/to/input.md",
"output": "/path/to/output.pdf",
"pages": 3
}
未找到 Chrome: 技能将自动下载 Chromium。设置 PUPPETEER_SKIP_DOWNLOAD=1 可以阻止此行为。
内存问题: 大型文档可能需要更多内存。考虑拆分成多个文件。
字体问题: 通过 CSS @font-face 嵌入字体,并使用 base64 编码的字体以确保渲染一致性。
重要任务规划说明(必须遵守)
每周安装数
155
代码仓库
GitHub 星标数
5
首次出现
2026年1月24日
安全审计
安装于
gemini-cli150
opencode150
codex149
cursor148
github-copilot146
amp145
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting — including tasks for each file read. This prevents context loss from long files. For simple tasks, AI MUST ask user whether to skip.
Goal: Convert Markdown files to PDF with syntax highlighting and custom CSS support.
Workflow:
Key Rules:
Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
Convert markdown files to high-quality PDF documents with code syntax highlighting and custom CSS support.
This skill requires npm dependencies. Run one of the following:
# Option 1: Install via ClaudeKit CLI (recommended)
ck init # Runs install.sh which handles all skills
# Option 2: Manual installation
cd .claude/skills/markdown-to-pdf
npm install
Dependencies: md-to-pdf, gray-matter
Note: First run may download Chromium (~150MB) unless system Chrome is detected.
# Basic conversion
node .claude/skills/markdown-to-pdf/scripts/convert.cjs --input ./README.md
# Specify output path
node .claude/skills/markdown-to-pdf/scripts/convert.cjs --input ./doc.md --output ./output.pdf
# With custom CSS
node .claude/skills/markdown-to-pdf/scripts/convert.cjs --input ./doc.md --css ./my-style.css
| Option | Short | Description | Default |
|---|---|---|---|
--input | -i | Input markdown file path | (required) |
--output | -o | Output PDF file path | {input}.pdf |
--css | -c |
The default PDF style includes:
Returns JSON on success:
{
"success": true,
"input": "/path/to/input.md",
"output": "/path/to/output.pdf",
"pages": 3
}
Chrome not found: The skill will automatically download Chromium. Set PUPPETEER_SKIP_DOWNLOAD=1 to prevent this.
Memory issues: Large documents may require more memory. Consider splitting into multiple files.
Font issues: Embed fonts via CSS @font-face with base64-encoded fonts for consistent rendering.
IMPORTANT Task Planning Notes (MUST FOLLOW)
Weekly Installs
155
Repository
GitHub Stars
5
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli150
opencode150
codex149
cursor148
github-copilot146
amp145
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
36,300 周安装
Info Card Designer - 自动生成杂志质感信息卡,适配X/Twitter、小红书分享,支持内容密度分析与超长分割
137 周安装
头脑风暴助手 - 使用Gemini AI系统生成创意想法,支持SCAMPER、六顶思考帽等方法
137 周安装
运行时性能审计器 - 异步代码性能优化与反模式检测工具
137 周安装
ln-723 种子数据生成器:多语言ORM模式解析与智能测试数据生成工具
137 周安装
Symfony测试替身模拟指南:TDD、PHP单元测试与Mocking实践
137 周安装
Metabase 前端分析事件指南:Snowplow 事件追踪与 TypeScript 类型定义
137 周安装
| Custom CSS file path |
| built-in |
--no-highlight | Disable syntax highlighting | false |
--help | -h | Show help message |