smouj/aicodestudio/pdf

Claude Code and agent skill by smouj/aicodestudio

Trust tier 3
  • community
Source check pending

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/pdf

SKILL.md

PDF - Document Production Workbench

Quick Setup

bash
bash "$PDF_SKILL_DIR/scripts/setup.sh" # Interactive environment check + install
python3 "$PDF_SKILL_DIR/scripts/pdf.py" env.check # Detailed dependency status (JSON: add -j)
python3 "$PDF_SKILL_DIR/scripts/pdf.py" env.fix # Auto-install missing Python packages

Triage

Determine task weight to control how much context to load:

WeightTriggersWhat to Load
LightFormat conversion, form fill, text extract, merge/split, simple certificateSKILL.md + briefs/process.md only
StandardMulti-page report, poster, academic paper, resume, reformat - any document with design decisionsSKILL.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)
  1. 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.
  2. CJK Check - Chinese/Japanese/Korean content needs font coverage. Report brief must use UniSong/UniHei registered fonts; Creative brief must load Google Fonts Noto Sans SC with font-display: swap; Academic brief must use \usepackage{ctex}.
  3. 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.
  4. 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.

User Request
│
├─ Work with existing PDF? ─────────────┬─ Extract/merge/split/fill/convert → briefs/process.md
│ ├─ Reformat/redesign → briefs/process.md (extract) → delegate to report or creative brief
│ └─ User provides a PDF template/reference to match style
│ → briefs/process.md "Template-Guided Reformat" → delegate to matched brief
│
├─ Report / proposal / white paper / contract / analysis?
│ └─ ────────────────────────────────── → briefs/report.md (ReportLab)
│
├─ Poster / invitation / infographic / dashboard / creative layout?
│ └─ ────────────────────────────────── → briefs/creative.md (Playwright)
│
├─ Academic paper / thesis / math / IEEE / ACM / LaTeX?
│ └─ ────────────────────────────────── → briefs/academic.md (Tectonic)
│
├─ Math-heavy doc / TikZ diagram / algorithm pseudocode / Beamer slides?
│ └─ ────────────────────────────────── → briefs/academic.md (Tectonic, Scenarios A-D)
│
├─ Document needs complex embedded diagrams (flowcharts, architecture, neural nets)?
│ └─ Route by target brief:
│ ├─ Report → Playwright+CSS → PNG → ReportLab Image() flowable
│ ├─ Creative → directly in HTML (CSS flexbox/grid + connectors)
│ └─ Academic → complexity-based:
│ ├─ Simple (≤6 nodes, linear/tree) → TikZ native (vector)
│ └─ Complex (>6 nodes, branches, annotations) → Playwright+CSS → PNG → \includegraphics
│
└─ Resume / CV?
├─ ATS-safe / corporate ─────────── → briefs/report.md (resume sub-section)
├─ Creative / design industry ────── → briefs/creative.md (resume sub-section)
└─ Academic CV / publications ────── → briefs/academic.md (resume sub-section)
Detection Keywords
BriefKeywords
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)
ScenarioRouteNotes
Report / white paper / analysisreport.mdReportLab structured document
Report with emojicreative.md🚨 Emoji rule override
Business proposalreport.mdStructured + data tables
Contract / legal documentreport.mdAdd signature placeholders (dotted line + label)
Invoice / receiptreport.mdTable-heavy, precision alignment
Exam / quiz / test paper / worksheetreport.mdIndented options, answer space reservation, structured numbering (see Exam Paper Rules in report.md)
Math exam / math worksheet (with formulas/equations)academic.mdLaTeX for proper math typesetting. See §Exam Paper Rules in academic.md
Poster / flyercreative.md + poster.mdVisual design + poster density/sizing rules
Invitation / greeting cardcreative.mdNon-standard size, decorative
Certificate / awardcreative.mdSingle page, centered layout, decorative border
Business cardcreative.mdTiny size (90×54mm), Playwright native support
Envelope / labelcreative.mdNon-standard size, simple layout
Menu / price listcreative.mdVisual layout + may contain emoji
Resume (ATS)report.mdPlain text structure
Resume (creative)creative.mdVisual design
Resume (academic CV)academic.mdPublication list + BibTeX
Academic paperacademic.mdLaTeX/Tectonic
Math-heavy documentacademic.mdLaTeX typesetting
Presentation / PPT-stylecreative.mdLandscape (1280×720), one topic per page
Book / long documentreport.mdAdd TOC + chapter numbering, validate with toc_validate.py
CJK vertical textcreative.mdHTML writing-mode: vertical-rl + text-orientation: upright + white-space: nowrap + Playwright
RTL document (Arabic/Hebrew)creative.mdHTML dir="rtl" + Playwright
Batch generation (mail merge)report.mdPython loop + template variable substitution
Infographiccreative.mdData visualization + design
Calendar / schedulecreative.mdGrid layout + custom dimensions
🔧 Processing (Manipulate existing PDF)
ScenarioRouteCommand / Method
Merge multiple PDFsprocess.mdpages.merge a.pdf b.pdf -o out.pdf
Split PDFprocess.mdpages.split input.pdf -o ./output/
Extract textprocess.mdextract.text input.pdf
Extract tablesprocess.mdextract.table input.pdf
Extract imagesprocess.mdextract.image input.pdf
Fill formsprocess.mdform.fill input.pdf
Office → PDFprocess.mdconvert.office input.docx
HTML → PDF (documents)process.mdconvert.html input.html or node html2pdf-next.js
HTML → PDF (posters)poster.mdnode html2poster.js poster.html
Image → PDFprocess.mdpikepdf: one image per page, embed as XObject
PDF → imageprocess-advanced.mdpypdfium2 render each page to PNG
Encrypt / decryptprocess-advanced.mdpikepdf encryption
Add watermarkprocess.mdpikepdf overlay: create watermark page → merge onto each page
Compress PDFprocess.mdGhostscript: gs -sDEVICE=pdfwrite -dPDFSETTINGS=/screen
OCR scanned PDFprocess-advanced.mdocrmypdf or Tesseract
Rotate pagesprocess.mdpages.rotate input.pdf 90 -o out.pdf
Crop pagesprocess.mdpages.crop input.pdf l,b,r,t -o out.pdf
Remove blank pagesprocess.mdpages.clean input.pdf
Reformat by templateprocess.md → delegateExtract content → regenerate via report/creative
PDF diff / compareprocess.mddiff-pdf CLI or Python per-page text comparison
Digital signatureprocess.mdpyhanko library (requires extra install)
Edit metadataprocess.mdmeta.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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/smouj/aicodestudio/pdf/badge)](https://verified-skill.com/skills/smouj/aicodestudio/pdf)

Something wrong with this skill or its page? Tell us.