PDF Skill
One skill for every PDF task. Read only the sub-reference that matches what the user wants.
Task → Reference Router
| The user wants to… |
Read |
| Create a PDF — resume, one-pager, long doc, letter, portfolio, equity report, changelog, or anything custom |
references/create.md |
| Understand the visual design system (tokens, typography, colors, layouts) |
references/design.md |
| Understand how WeasyPrint builds PDFs + troubleshoot render issues |
references/production.md |
| Write good copy inside a document (tone, rhythm, bilingual conventions) |
references/writing.md |
| Embed a diagram (architecture, flowchart, quadrant, timeline, chart…) inside a document |
references/diagrams.md |
| Memorize the non-negotiable rules at a glance |
references/cheatsheet.md |
| Read or extract text, tables, metadata, or coordinates from a PDF |
references/extract.md |
| Merge, split, rotate, crop, watermark, or encrypt existing PDFs |
references/manipulate.md |
| OCR a scanned PDF or extract embedded images |
references/ocr.md |
| Fill a PDF form (fillable fields or non-fillable flat forms) |
references/forms.md |
| Do any of the above in JavaScript (pdf-lib, pdfjs-dist) |
references/javascript.md |
Default for Creation
When the user asks for any new PDF document, default to references/create.md. It walks through:
- Template path — match the user's ask to one of the pre-built templates in
assets/templates/ (resume, one-pager, long-doc, letter, portfolio, equity-report, changelog) and fill it with their data
- Custom path — if no template fits, write a custom HTML in the Kami design system using
references/design.md tokens and references/cheatsheet.md rules, then render via the same pipeline
Both paths render through scripts/build.py → WeasyPrint. The visual language is consistent across templated and custom documents.
Directory Layout
pdf/
├── SKILL.md # this index
├── KAMI_LICENSE.txt # MIT attribution for the Kami design system
├── references/
│ ├── create.md # ⭐ entry point for all PDF creation
│ ├── design.md # design tokens + layout rules
│ ├── production.md # WeasyPrint build + troubleshooting
│ ├── writing.md # tone + bilingual conventions
│ ├── diagrams.md # diagram primitives
│ ├── cheatsheet.md # one-page rules summary
│ ├── tokens.json # machine-readable design tokens
│ ├── stabilizer_profiles.json # per-document-type QA profiles
│ ├── extract.md # read PDFs
│ ├── manipulate.md # merge/split/rotate/watermark/encrypt
│ ├── ocr.md # scanned PDFs + image extraction
│ ├── forms.md # fill PDF forms
│ └── javascript.md # pdf-lib + pdfjs-dist
├── assets/
│ ├── styles.css # shared stylesheet for all templates + custom docs
│ ├── templates/ # pre-built document HTMLs (CN + EN variants)
│ ├── fonts/ # TsangerJinKai02 (CN), JetBrainsMono (code)
│ ├── diagrams/ # 14 standalone diagram HTMLs
│ └── images/logo.svg
└── scripts/
├── build.py # orchestrator: template + data → PDF
├── stabilize.py # page-count + visual QA
└── (form scripts: check_fillable_fields, extract_form_field_info, fill_*, etc.)
Core Dependencies
# Creating PDFs (required)
pip install weasyprint pypdf --break-system-packages
# Linux first-time:
apt install -y libpango-1.0-0 libpangoft2-1.0-0 fonts-noto-cjk
# Reading/manipulating PDFs
pip install pdfplumber pypdfium2 --break-system-packages
# OCR
pip install pytesseract pdf2image --break-system-packages
# Also: apt-get install tesseract-ocr poppler-utils
Routing Tips
- User says "generate report / export PDF / resume / white paper / one-pager / proposal / make me a PDF / professional report" →
create.md
- User says "extract / read / pull out text / read table" →
extract.md
- User says "merge / split / rotate / watermark / combine" →
manipulate.md
- User says "scan / OCR / make searchable" →
ocr.md
- User says "fill form / form field" →
forms.md
When unsure, skim this file's router; don't load all references at once.
1---2name: pdf3description: Use this skill for anything PDF — creating professional PDFs (resumes, one-pagers, white papers, letters, portfolios, equity reports, changelogs, custom documents) with the Kami design system; reading or extracting text/tables; merging, splitting, rotating, watermarking, encrypting; filling PDF forms; extracting embedded images; OCR on scanned PDFs. Trigger on any `.pdf` request or phrases like "make me a PDF", "generate a report", "build me a resume", "one-pager", "white paper", "export to PDF", "professional document".4license: Skill code proprietary. Bundled design system adapted from tw93/5---67# PDF Skill89One skill for every PDF task. Read only the sub-reference that matches what the user wants.1011## Task → Reference Router1213| The user wants to… | Read |14|---|---|15| Create a PDF — resume, one-pager, long doc, letter, portfolio, equity report, changelog, or anything custom | `references/create.md` |16| Understand the visual design system (tokens, typography, colors, layouts) | `references/design.md` |17| Understand how WeasyPrint builds PDFs + troubleshoot render issues | `references/production.md` |18| Write good copy inside a document (tone, rhythm, bilingual conventions) | `references/writing.md` |19| Embed a diagram (architecture, flowchart, quadrant, timeline, chart…) inside a document | `references/diagrams.md` |20| Memorize the non-negotiable rules at a glance | `references/cheatsheet.md` |21| Read or extract text, tables, metadata, or coordinates from a PDF | `references/extract.md` |22| Merge, split, rotate, crop, watermark, or encrypt existing PDFs | `references/manipulate.md` |23| OCR a scanned PDF or extract embedded images | `references/ocr.md` |24| Fill a PDF form (fillable fields or non-fillable flat forms) | `references/forms.md` |25| Do any of the above in JavaScript (pdf-lib, pdfjs-dist) | `references/javascript.md` |2627## Default for Creation2829When the user asks for any new PDF document, default to **`references/create.md`**. It walks through:301. **Template path** — match the user's ask to one of the pre-built templates in `assets/templates/` (resume, one-pager, long-doc, letter, portfolio, equity-report, changelog) and fill it with their data312. **Custom path** — if no template fits, write a custom HTML in the Kami design system using `references/design.md` tokens and `references/cheatsheet.md` rules, then render via the same pipeline3233Both paths render through `scripts/build.py` → WeasyPrint. The visual language is consistent across templated and custom documents.3435## Directory Layout3637```38pdf/39├── SKILL.md # this index40├── KAMI_LICENSE.txt # MIT attribution for the Kami design system41├── references/42│ ├── create.md # ⭐ entry point for all PDF creation43│ ├── design.md # design tokens + layout rules44│ ├── production.md # WeasyPrint build + troubleshooting45│ ├── writing.md # tone + bilingual conventions46│ ├── diagrams.md # diagram primitives47│ ├── cheatsheet.md # one-page rules summary48│ ├── tokens.json # machine-readable design tokens49│ ├── stabilizer_profiles.json # per-document-type QA profiles50│ ├── extract.md # read PDFs51│ ├── manipulate.md # merge/split/rotate/watermark/encrypt52│ ├── ocr.md # scanned PDFs + image extraction53│ ├── forms.md # fill PDF forms54│ └── javascript.md # pdf-lib + pdfjs-dist55├── assets/56│ ├── styles.css # shared stylesheet for all templates + custom docs57│ ├── templates/ # pre-built document HTMLs (CN + EN variants)58│ ├── fonts/ # TsangerJinKai02 (CN), JetBrainsMono (code)59│ ├── diagrams/ # 14 standalone diagram HTMLs60│ └── images/logo.svg61└── scripts/62 ├── build.py # orchestrator: template + data → PDF63 ├── stabilize.py # page-count + visual QA64 └── (form scripts: check_fillable_fields, extract_form_field_info, fill_*, etc.)65```6667## Core Dependencies6869```bash70# Creating PDFs (required)71pip install weasyprint pypdf --break-system-packages72# Linux first-time:73apt install -y libpango-1.0-0 libpangoft2-1.0-0 fonts-noto-cjk7475# Reading/manipulating PDFs76pip install pdfplumber pypdfium2 --break-system-packages7778# OCR79pip install pytesseract pdf2image --break-system-packages80# Also: apt-get install tesseract-ocr poppler-utils81```8283## Routing Tips8485- User says "generate report / export PDF / resume / white paper / one-pager / proposal / make me a PDF / professional report" → `create.md`86- User says "extract / read / pull out text / read table" → `extract.md`87- User says "merge / split / rotate / watermark / combine" → `manipulate.md`88- User says "scan / OCR / make searchable" → `ocr.md`89- User says "fill form / form field" → `forms.md`9091When unsure, skim this file's router; don't load all references at once.