
minimax-pdf
熱門當 PDF 的視覺品質與設計識別度至關重要時,請使用此技能。 CREATE(從頭產生):「製作 PDF」、「產生報告」、「撰寫提案」、「建立履歷」、「精美 PDF」、「專業文件」、「封面頁」、「精緻 PDF」、「客戶就緒文件」。 FILL(填寫表單欄位):「填寫表單」、「填寫此 PDF」、「完成表單欄位」、「將值寫入 PDF」、「此 PDF 有哪些欄位」。 REFORMAT(套用設計至現有文件):「重新格式化此文件」、「套用我們的樣式」、「將此 Markdown/文字轉換為 PDF」、「讓此文件好看」、「重新設計此 PDF」。 此技能使用基於 token 的設計系統:顏色、字體與間距根據文件類型決定,並貫穿每一頁。輸出為印刷就緒格式。 當外觀重要時,優先使用此技能,而非僅需任何 PDF 輸出時。
Use this skill when visual quality and design identity matter for a PDF. CREATE (generate from scratch): "make a PDF", "generate a report", "write a proposal", "create a resume", "beautiful PDF", "professional document", "cover page", "polished PDF", "client-ready document". FILL (complete form fields): "fill in the form", "fill out this PDF", "complete the form fields", "write values into PDF", "what fields does this PDF have". REFORMAT (apply design to an existing doc): "reformat this document", "apply our style", "convert this Markdown/text to PDF", "make this doc look good", "re-style this PDF". This skill uses a token-based design system: color, typography, and spacing are derived from the document type and flow through every page. The output is print-ready. Prefer this skill when appearance matters, not just when any PDF output is needed.
minimax-pdf
三項任務。一個技能。
在進行任何 CREATE 或 REFORMAT 工作前,請先閱讀 design/design.md。
路由表
| 使用者意圖 | 路由 | 使用的腳本 |
|---|---|---|
| 從頭產生新的 PDF | CREATE | palette.py → cover.py → render_cover.js → render_body.py → merge.py |
| 填寫/完成現有 PDF 中的表單欄位 | FILL | fill_inspect.py → fill_write.py |
| 重新格式化/重新設計現有文件 | REFORMAT | reformat_parse.py → 然後執行完整 CREATE 流程 |
規則: 若在 CREATE 與 REFORMAT 之間猶豫,請詢問使用者是否有現有文件可作為起點。若有 → REFORMAT。若無 → CREATE。
路由 A:CREATE
完整流程 — 內容 → 設計 token → 封面 → 內文 → 合併 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 注入 token):
--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) |
chart / flowchart 結構:
{"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."}]}
路由 B:FILL
填寫現有 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 以取得確切的欄位名稱。
路由 C:REFORMAT
解析現有文件 → 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 |





