minimax-pdf by minimax-ai/skills
npx skills add https://github.com/minimax-ai/skills --skill minimax-pdf三项任务。一项技能。
design/design.md。| 用户意图 | 路由 | 使用的脚本 |
|---|---|---|
| 从头生成新的 PDF | CREATE | palette.py → cover.py → render_cover.js → render_body.py → merge.py |
| 填写/补全现有 PDF 中的表单字段 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| FILL |
fill_inspect.py → fill_write.py |
| 重新格式化/重新设计现有文档样式 | REFORMAT | reformat_parse.py → 然后完整的 CREATE 流程 |
规则: 当不确定是 CREATE 还是 REFORMAT 时,询问用户是否有现成的文档作为起点。如果有 → REFORMAT。如果没有 → CREATE。
完整流程 — 内容 → 设计标记 → 封面 → 正文 → 合并的 PDF。
bash scripts/make.sh run \
--title "Q3 Strategy Review" --type proposal \
--author "Strategy Team" --date "October 2025" \
--accent "#2D5F8A" \
--content content.json --out report.pdf
文档类型: report · proposal · resume · portfolio · academic · general · minimal · stripe · diagonal · frame · editorial · magazine · darkroom · terminal · poster
| 类型 | 封面样式 | 视觉标识 |
|---|---|---|
report | fullbleed | 深色背景,点阵网格,Playfair Display 字体 |
proposal | split | 左侧面板 + 右侧几何图形,Syne 字体 |
resume | typographic | 超大首词,DM Serif Display 字体 |
portfolio | atmospheric | 近黑色,径向发光,Fraunces 字体 |
academic | typographic | 浅色背景,经典衬线体,EB Garamond 字体 |
general | fullbleed | 深石板色,Outfit 字体 |
minimal | minimal | 白色 + 单条 8px 强调色条,Cormorant Garamond 字体 |
stripe | stripe | 3 条粗体水平色带,Barlow Condensed 字体 |
diagonal | diagonal | SVG 斜切,深色/浅色两半,Montserrat 字体 |
frame | frame | 内嵌边框,角落装饰,Cormorant 字体 |
editorial | editorial | 幽灵字母,全大写标题,Bebas Neue 字体 |
magazine | magazine | 暖奶油色背景,居中堆叠,主图,Playfair Display 字体 |
darkroom | darkroom | 海军蓝背景,居中堆叠,灰度图像,Playfair Display 字体 |
terminal | terminal | 近黑色,网格线,等宽字体,霓虹绿色 |
poster | poster | 白色背景,厚侧边栏,超大标题,Barlow Condensed 字体 |
封面附加项(通过 --abstract、--cover-image 注入到标记中):
--abstract "text" — 封面上的摘要文本块(magazine/darkroom 类型)--cover-image "url" — 主图 URL/路径(magazine、darkroom、poster 类型)颜色覆盖 — 始终根据文档内容选择这些:
--accent "#HEX" — 覆盖强调色;accent_lt 是通过向白色提亮自动派生的--cover-bg "#HEX" — 覆盖封面背景颜色强调色选择指南:
你对强调色拥有创意决定权。根据文档的语义上下文(标题、行业、目的、受众)来选择它,而不是从通用的“安全”选项中选择。强调色出现在章节分隔线、突出显示栏、表格标题和封面上:它承载着文档的视觉标识。
| 上下文 | 建议的强调色范围 |
|---|---|
| 法律 / 合规 / 金融 | 深海军蓝 #1C3A5E,炭灰色 #2E3440,石板色 #3D4C5E |
| 医疗保健 / 医学 | 蓝绿色 #2A6B5A,冷绿色 #3A7D6A |
| 技术 / 工程 | 钢蓝色 #2D5F8A,靛蓝色 #3D4F8A |
| 环境 / 可持续性 | 森林绿 #2E5E3A,橄榄绿 #4A5E2A |
| 创意 / 艺术 / 文化 | 酒红色 #6B2A35,梅子色 #5A2A6B,陶土色 #8A3A2A |
| 学术 / 研究 | 深蓝绿色 #2A5A6B,图书馆蓝 #2A4A6B |
| 企业 / 中性 | 石板色 #3D4A5A,石墨色 #444C56 |
| 奢华 / 高端 | 暖黑色 #1A1208,深青铜色 #4A3820 |
规则: 选择一个有思想的设计师会为这个特定文档选择的颜色 — 而不是该类型的默认颜色。柔和、低饱和度的色调效果最好;避免鲜艳的原色。不确定时,选择更深、更中性的颜色。
content.json 块类型:
| 块类型 | 用途 | 关键字段 |
|---|---|---|
h1 | 章节标题 + 强调色分隔线 | text |
h2 | 子章节标题 | text |
h3 | 子子章节(粗体) | text |
body | 两端对齐段落;支持 <b> <i> 标记 | text |
bullet | 无序列表项(• 前缀) | text |
numbered | 有序列表项 — 计数器在遇到非编号块时自动重置 | text |
callout | 带有强调色左侧栏的高亮见解框 | text |
table | 数据表格 — 强调色标题,交替行底色 | headers, rows, col_widths?, caption? |
image | 嵌入图像,缩放到列宽 | path/src, caption? |
figure | 带有自动编号“图 N:”说明的图像 | path/src, caption? |
code | 带有强调色左边框的等宽代码块 | text, language? |
math | 显示数学公式 — 通过 matplotlib mathtext 的 LaTeX 语法 | text, label?, caption? |
chart | 使用 matplotlib 渲染的条形图 / 折线图 / 饼图 | chart_type, labels, datasets, title?, x_label?, y_label?, caption?, figure? |
flowchart | 通过 matplotlib 的节点 + 边绘制的流程图 | nodes, edges, caption?, figure? |
bibliography | 带有悬挂缩进的编号参考文献列表 | items [{id, text}], title? |
divider | 强调色全宽分隔线 | — |
caption | 小型柔和标签 | text |
pagebreak | 强制换页 | — |
spacer | 垂直空白 | pt (默认 12) |
图表 / 流程图模式:
{"type":"chart","chart_type":"bar","labels":["Q1","Q2","Q3","Q4"],
"datasets":[{"label":"Revenue","values":[120,145,132,178]}],"caption":"Q results"}
{"type":"flowchart",
"nodes":[{"id":"s","label":"Start","shape":"oval"},
{"id":"p","label":"Process","shape":"rect"},
{"id":"d","label":"Valid?","shape":"diamond"},
{"id":"e","label":"End","shape":"oval"}],
"edges":[{"from":"s","to":"p"},{"from":"p","to":"d"},
{"from":"d","to":"e","label":"Yes"},{"from":"d","to":"p","label":"No"}]}
{"type":"bibliography","items":[
{"id":"1","text":"Author (Year). Title. Publisher."}]}
填写现有 PDF 中的表单字段,不改变布局或设计。
# 步骤 1: 检查
python3 scripts/fill_inspect.py --input form.pdf
# 步骤 2: 填写
python3 scripts/fill_write.py --input form.pdf --out filled.pdf \
--values '{"FirstName": "Jane", "Agree": "true", "Country": "US"}'
| 字段类型 | 值格式 |
|---|---|
text | 任意字符串 |
checkbox | "true" 或 "false" |
dropdown | 必须与检查输出中的选项值匹配 |
radio | 必须与单选按钮值匹配(通常以 / 开头) |
始终先运行 fill_inspect.py 以获取确切的字段名称。
解析现有文档 → content.json → CREATE 流程。
bash scripts/make.sh reformat \
--input source.md --title "My Report" --type report --out output.pdf
支持的输入格式: .md .txt .pdf .json
bash scripts/make.sh check # 验证所有依赖项
bash scripts/make.sh fix # 自动安装缺失的依赖项
bash scripts/make.sh demo # 构建示例 PDF
| 工具 | 使用者 | 安装 |
|---|---|---|
| Python 3.9+ | 所有 .py 脚本 | 系统 |
reportlab | render_body.py | pip install reportlab |
pypdf | fill, merge, reformat | pip install pypdf |
| Node.js 18+ | render_cover.js | 系统 |
playwright + Chromium | render_cover.js | npm install -g playwright && npx playwright install chromium |
每周安装量
128
仓库
GitHub 星标数
3.5K
首次出现
3 天前
安全审计
安装于
codex124
cursor124
opencode123
cline122
gemini-cli122
kimi-cli122
Three tasks. One skill.
design/design.md before any CREATE or REFORMAT work.| User intent | Route | Scripts used |
|---|---|---|
| Generate a new PDF from scratch | CREATE | palette.py → cover.py → render_cover.js → render_body.py → merge.py |
| Fill / complete form fields in an existing PDF | FILL | fill_inspect.py → fill_write.py |
| Reformat / re-style an existing document | REFORMAT | reformat_parse.py → then full CREATE pipeline |
Rule: when in doubt between CREATE and REFORMAT, ask whether the user has an existing document to start from. If yes → REFORMAT. If no → CREATE.
Full pipeline — content → design tokens → cover → body → merged PDF.
bash scripts/make.sh run \
--title "Q3 Strategy Review" --type proposal \
--author "Strategy Team" --date "October 2025" \
--accent "#2D5F8A" \
--content content.json --out report.pdf
Doc types: report · proposal · resume · portfolio · academic · general · minimal · stripe · diagonal · frame · editorial · magazine · · ·
| Type | Cover pattern | Visual identity |
|---|---|---|
report | fullbleed | Dark bg, dot grid, Playfair Display |
proposal | split | Left panel + right geometric, Syne |
resume | typographic | Oversized first-word, DM Serif Display |
portfolio |
Cover extras (inject into tokens via --abstract, --cover-image):
--abstract "text" — abstract text block on the cover (magazine/darkroom)--cover-image "url" — hero image URL/path (magazine, darkroom, poster)Color overrides — always choose these based on document content:
--accent "#HEX" — override the accent color; accent_lt is auto-derived by lightening toward white--cover-bg "#HEX" — override the cover background colorAccent color selection guidance:
You have creative authority over the accent color. Pick it from the document's semantic context — title, industry, purpose, audience — not from generic "safe" choices. The accent appears on section rules, callout bars, table headers, and the cover: it carries the document's visual identity.
| Context | Suggested accent range |
|---|---|
| Legal / compliance / finance | Deep navy #1C3A5E, charcoal #2E3440, slate #3D4C5E |
| Healthcare / medical | Teal-green #2A6B5A, cool green #3A7D6A |
| Technology / engineering | Steel blue #2D5F8A, indigo #3D4F8A |
| Environmental / sustainability | Forest #2E5E3A, olive |
Rule: choose a color that a thoughtful designer would select for this specific document — not the type's default. Muted, desaturated tones work best; avoid vivid primaries. When in doubt, go darker and more neutral.
content.json block types:
| Block | Usage | Key fields |
|---|---|---|
h1 | Section heading + accent rule | text |
h2 | Subsection heading | text |
h3 | Sub-subsection (bold) | text |
body |
chart / flowchart schemas:
{"type":"chart","chart_type":"bar","labels":["Q1","Q2","Q3","Q4"],
"datasets":[{"label":"Revenue","values":[120,145,132,178]}],"caption":"Q results"}
{"type":"flowchart",
"nodes":[{"id":"s","label":"Start","shape":"oval"},
{"id":"p","label":"Process","shape":"rect"},
{"id":"d","label":"Valid?","shape":"diamond"},
{"id":"e","label":"End","shape":"oval"}],
"edges":[{"from":"s","to":"p"},{"from":"p","to":"d"},
{"from":"d","to":"e","label":"Yes"},{"from":"d","to":"p","label":"No"}]}
{"type":"bibliography","items":[
{"id":"1","text":"Author (Year). Title. Publisher."}]}
Fill form fields in an existing PDF without altering layout or design.
# Step 1: inspect
python3 scripts/fill_inspect.py --input form.pdf
# Step 2: fill
python3 scripts/fill_write.py --input form.pdf --out filled.pdf \
--values '{"FirstName": "Jane", "Agree": "true", "Country": "US"}'
| Field type | Value format |
|---|---|
text | Any string |
checkbox | "true" or "false" |
dropdown | Must match a choice value from inspect output |
radio | Must match a radio value (often starts with /) |
Always run fill_inspect.py first to get exact field names.
Parse an existing document → content.json → CREATE pipeline.
bash scripts/make.sh reformat \
--input source.md --title "My Report" --type report --out output.pdf
Supported input formats: .md .txt .pdf .json
bash scripts/make.sh check # verify all deps
bash scripts/make.sh fix # auto-install missing deps
bash scripts/make.sh demo # build a sample PDF
| Tool | Used by | Install |
|---|---|---|
| Python 3.9+ | all .py scripts | system |
reportlab | render_body.py | pip install reportlab |
pypdf | fill, merge, reformat | pip install pypdf |
| Node.js 18+ | render_cover.js |
Weekly Installs
128
Repository
GitHub Stars
3.5K
First Seen
3 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex124
cursor124
opencode123
cline122
gemini-cli122
kimi-cli122
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
40,000 周安装
darkroomterminalposteratmospheric |
| Near-black, radial glow, Fraunces |
academic | typographic | Light bg, classical serif, EB Garamond |
general | fullbleed | Dark slate, Outfit |
minimal | minimal | White + single 8px accent bar, Cormorant Garamond |
stripe | stripe | 3 bold horizontal color bands, Barlow Condensed |
diagonal | diagonal | SVG angled cut, dark/light halves, Montserrat |
frame | frame | Inset border, corner ornaments, Cormorant |
editorial | editorial | Ghost letter, all-caps title, Bebas Neue |
magazine | magazine | Warm cream bg, centered stack, hero image, Playfair Display |
darkroom | darkroom | Navy bg, centered stack, grayscale image, Playfair Display |
terminal | terminal | Near-black, grid lines, monospace, neon green |
poster | poster | White bg, thick sidebar, oversized title, Barlow Condensed |
#4A5E2A| Creative / arts / culture | Burgundy #6B2A35, plum #5A2A6B, terracotta #8A3A2A |
| Academic / research | Deep teal #2A5A6B, library blue #2A4A6B |
| Corporate / neutral | Slate #3D4A5A, graphite #444C56 |
| Luxury / premium | Warm black #1A1208, deep bronze #4A3820 |
Justified paragraph; supports <b> <i> markup |
text |
bullet | Unordered list item (• prefix) | text |
numbered | Ordered list item — counter auto-resets on non-numbered blocks | text |
callout | Highlighted insight box with accent left bar | text |
table | Data table — accent header, alternating row tints | headers, rows, col_widths?, caption? |
image | Embedded image scaled to column width | path/src, caption? |
figure | Image with auto-numbered "Figure N:" caption | path/src, caption? |
code | Monospace code block with accent left border | text, language? |
math | Display math — LaTeX syntax via matplotlib mathtext | text, label?, caption? |
chart | Bar / line / pie chart rendered with matplotlib | chart_type, labels, datasets, title?, x_label?, y_label?, caption?, figure? |
flowchart | Process diagram with nodes + edges via matplotlib | nodes, edges, caption?, figure? |
bibliography | Numbered reference list with hanging indent | items [{id, text}], title? |
divider | Accent-colored full-width rule | — |
caption | Small muted label | text |
pagebreak | Force a new page | — |
spacer | Vertical whitespace | pt (default 12) |
| system |
playwright + Chromium | render_cover.js | npm install -g playwright && npx playwright install chromium |