smouj/aicodestudio/pdf
Claude Code and agent skill by smouj/aicodestudio
- community
Checking that the SKILL.md file is still in the repository.
"Professional PDF toolkit with four production lines: (1) Report - structured documents via ReportLab (reports, proposals, contracts, white papers) (2) Creative - visual design via JSON Blueprint → design_engine.py → Playwright snapshot (posters, infographics, invitations, dashboards). The LLM acts as Art Director outputting ONLY JSON spatial blueprints; convert.blueprint compiles to pixel-perfect PDF. (3) Academic - scholarly work via LaTeX/Tectonic (papers, theses, math-heavy documents) (4) Process - manipulate existing PDFs (extract, merge, split, fill forms, convert) Auto-routes based on document type. Includes ATS/creative/academic resume sub-paths.
Install
npx vskill@latest install smouj/aicodestudio/pdfSKILL.md
PDF - Document Production Workbench
Quick Setup
Triage
Determine task weight to control how much context to load:
| Weight | Triggers | What to Load | |
|---|---|---|---|
| Light | Format conversion, form fill, text extract, merge/split, simple certificate | SKILL.md + briefs/process.md only | |
| Standard | Multi-page report, poster, academic paper, resume, reformat - any document with design decisions | SKILL.md + matched brief + typesetting assets on demand |
Light tasks skip typesetting files entirely. Standard tasks load them on demand per the brief's instructions.
⚠️ Pre-Routing Checks (run BEFORE matching brief)
- Emoji Check - Scan user content for intentional emoji (decorative 📊🎯🔥, not OS-level emoji input). If found → force Creative brief regardless of document type. ReportLab renders emoji as □ squares; LaTeX drops them entirely.
- CJK Check - Chinese/Japanese/Korean content needs font coverage. Report brief must use
UniSong/UniHeiregistered fonts; Creative brief must load Google Fonts Noto Sans SC withfont-display: swap; Academic brief must use\usepackage{ctex}. - Size Check - Non-standard page sizes (not A4/Letter/A3) → prefer Creative brief (Playwright handles any dimension). ReportLab can do custom sizes but pagination is manual.
- Character Safety Check - Before writing any content string, scan for Japanese kana (の、が、は etc.), unusual Unicode symbols, or non-CJK characters that may corrupt during encoding transit ( Especially when code is written via heredoc/base64/LLM output). Replace with plain Chinese equivalents:
の→之/的/缔,々→omit or write full character. If content must preserve Japanese, use only standard CJK Unified Ideographs (U+4E00-U+9FFF) and common kana; avoid rare/private-use codepoints.
Briefing
Match the user's intent to a production brief. Each brief contains the full workflow, tech stack specifics, and references to shared typesetting assets.
Detection Keywords
| Brief | Keywords | |
|---|---|---|
| Report | 报告, report, 分析, analysis, 白皮书, white paper, 提案, proposal, 合同, contract, 方案, 规划, 发票, invoice, 收据, receipt, 试卷, exam, quiz, test paper, 练习, exercise, worksheet, 考试, 测验 | |
| Creative | 海报, poster, 邀请函, invitation, 信息图, infographic, 仪表盘, dashboard, 传单, flyer, 证书, certificate, 菜单, menu, 名片, business card, 奖状, award, 标签, label, 信封, envelope, 贺卡, greeting card | |
| Creative (Poster) | 海报, poster, 传单, flyer, 宣传页, 宣传单 → additionally load briefs/poster.md scene layer rules | |
| Academic | 论文, paper, 学术, academic, LaTeX, 数学, math, IEEE, ACM, 毕业, thesis, 研究, research, Beamer, slides, 开题报告, 学位, dissertation, proposal | |
| Process | 提取, extract, 合并, merge, 拆分, split, 填写, fill, 转换, convert, OCR, 重排, reformat, 重新排版, redesign, 模板, template, 参照, 照着这个做, match this style, 压缩, compress, 水印, watermark, 加密, encrypt, 签名, sign |
Complete Scenario Routing Matrix
Below is an exhaustive map of every known PDF request type to its handling strategy. If a scenario is not listed, route to the closest match or ask the user.
📄 Creation (Generate PDF from scratch)
| Scenario | Route | Notes | |
|---|---|---|---|
| Report / white paper / analysis | report.md | ReportLab structured document | |
| Report with emoji | creative.md | 🚨 Emoji rule override | |
| Business proposal | report.md | Structured + data tables | |
| Contract / legal document | report.md | Add signature placeholders (dotted line + label) | |
| Invoice / receipt | report.md | Table-heavy, precision alignment | |
| Exam / quiz / test paper / worksheet | report.md | Indented options, answer space reservation, structured numbering (see Exam Paper Rules in report.md) | |
| Math exam / math worksheet (with formulas/equations) | academic.md | LaTeX for proper math typesetting. See §Exam Paper Rules in academic.md | |
| Poster / flyer | creative.md + poster.md | Visual design + poster density/sizing rules | |
| Invitation / greeting card | creative.md | Non-standard size, decorative | |
| Certificate / award | creative.md | Single page, centered layout, decorative border | |
| Business card | creative.md | Tiny size (90×54mm), Playwright native support | |
| Envelope / label | creative.md | Non-standard size, simple layout | |
| Menu / price list | creative.md | Visual layout + may contain emoji | |
| Resume (ATS) | report.md | Plain text structure | |
| Resume (creative) | creative.md | Visual design | |
| Resume (academic CV) | academic.md | Publication list + BibTeX | |
| Academic paper | academic.md | LaTeX/Tectonic | |
| Math-heavy document | academic.md | LaTeX typesetting | |
| Presentation / PPT-style | creative.md | Landscape (1280×720), one topic per page | |
| Book / long document | report.md | Add TOC + chapter numbering, validate with toc_validate.py | |
| CJK vertical text | creative.md | HTML writing-mode: vertical-rl + text-orientation: upright + white-space: nowrap + Playwright | |
| RTL document (Arabic/Hebrew) | creative.md | HTML dir="rtl" + Playwright | |
| Batch generation (mail merge) | report.md | Python loop + template variable substitution | |
| Infographic | creative.md | Data visualization + design | |
| Calendar / schedule | creative.md | Grid layout + custom dimensions |
🔧 Processing (Manipulate existing PDF)
| Scenario | Route | Command / Method | |
|---|---|---|---|
| Merge multiple PDFs | process.md | pages.merge a.pdf b.pdf -o out.pdf | |
| Split PDF | process.md | pages.split input.pdf -o ./output/ | |
| Extract text | process.md | extract.text input.pdf | |
| Extract tables | process.md | extract.table input.pdf | |
| Extract images | process.md | extract.image input.pdf | |
| Fill forms | process.md | form.fill input.pdf | |
| Office → PDF | process.md | convert.office input.docx | |
| HTML → PDF (documents) | process.md | convert.html input.html or node html2pdf-next.js | |
| HTML → PDF (posters) | poster.md | node html2poster.js poster.html | |
| Image → PDF | process.md | pikepdf: one image per page, embed as XObject | |
| PDF → image | process-advanced.md | pypdfium2 render each page to PNG | |
| Encrypt / decrypt | process-advanced.md | pikepdf encryption | |
| Add watermark | process.md | pikepdf overlay: create watermark page → merge onto each page | |
| Compress PDF | process.md | Ghostscript: gs -sDEVICE=pdfwrite -dPDFSETTINGS=/screen | |
| OCR scanned PDF | process-advanced.md | ocrmypdf or Tesseract | |
| Rotate pages | process.md | pages.rotate input.pdf 90 -o out.pdf | |
| Crop pages | process.md | pages.crop input.pdf l,b,r,t -o out.pdf | |
| Remove blank pages | process.md | pages.clean input.pdf | |
| Reformat by template | process.md → delegate | Extract content → regenerate via report/creative | |
| PDF diff / compare | process.md | diff-pdf CLI or Python per-page text comparison | |
| Digital signature | process.md | pyhanko library (requires extra install) | |
| Edit metadata | process.md | meta.set input.pdf -o out.pdf -d '{...}' |
Special Routing Rules
🚨 Emoji rule (CRITICAL - check FIRST): Content with intentional emoji (📊🎯🔥💡 etc.) → force briefs/creative.md regardless of document type. ReportLab renders emoji as □ squares; LaTeX silently drops them. This rule overrides all other routing. Even if the user says "report" - if the content has emoji, use Creative pipeline.
Non-standard page size rule: Dimensions other than A4/Letter/A3 → strongly prefer briefs/creative.md. Playwright handles any arbitrary page size natively. ReportLab requires manual pagination math.
Academic auto-detect: Papers, theses, or heavy math → briefs/academic.md even without explicit "LaTeX" mention.
Template-guided rule: When the user uploads a PDF and says "match this template" / "follow this style" / "reformat like this" → briefs/process.md Template-Guided Reformat section. This is a Standard triage (not Light), because it involves design decisions.
Resume routing: Default to Report brief (ATS-safe). Creative industry → Creative brief. Academic CV with publications → Academic brief.
Shared Assets
These are referenced by multiple briefs. Do not load upfront - each brief tells you when and what to load.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pdf/SKILL.md
Popularity
- Repository stars
- 4
- Repository forks
- 1
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/smouj/aicodestudio/pdf)