Editorial Resume
A single-page A4 resume PDF generator with editorial bilingual layout. Outputs resume.pdf from the user's context with zero or minimal questions.
When to use
- User asks "帮我做简历 / write my resume / update my CV / export my resume to PDF"
- User wants a printable PDF version of their portfolio/profile
- User uploads an old resume / LinkedIn export / GitHub README and wants it polished into a standard tier-1-tech resume
What you do
You are responsible for end-to-end PDF generation. Do NOT make the user fill a form. The whole point is "one shot from context".
Step 1 — Gather information from context
Mine the conversation history, any attached files, and the user's repo for:
| Field |
Where to look |
| Name (Zh + En) |
first message, signature, GitHub profile, prior resume |
| Role / title |
inferred from job target the user mentions, or current role |
| Tagline / one-liner |
what kind of work they ship; pull from their bio |
| Contacts |
GitHub, email, WeChat, phone, personal site, LinkedIn |
| 个人简介 (summary) |
2-4 sentences synthesizing what they've shipped |
| 实习经历 (internships) |
dated work entries with org, role, 3-4 bullets each |
| 项目经历 (projects) |
independent projects with link, role, 3 bullets |
| 教育背景 |
school + major + GPA + honors |
| 奖项荣誉 (awards) |
competition wins, scholarships, recognitions |
| 技能 (skills) |
grouped: tools / stack / methods / domain |
| 黑客松项目 (hackathons) |
one-line each, optional |
If a section is genuinely missing from context, omit it — don't fabricate. Better a 1-page resume with 5 sections than a stretched one with empty padding.
If critical fields are missing (name, at least one work/project), ask once in a single bundled message (not a sequence of small questions).
Step 2 — Read the reference
Open examples/example-resume.html to internalize:
- The CSS variables, fonts, font sizes, line heights — copy these verbatim, do not redesign
- The bilingual mixing: Chinese for sections/labels, English for tech terms wrapped in
<span class="en-lg"> for typographic harmony
- The bullet density: each bullet is 1-2 lines, leads with a verb or quantified outcome
- The 1-page A4 constraint — total content height must fit ~1090px
Step 3 — Write the resume HTML
Create a new HTML file at the user's project root (e.g. resume.html) that:
- Reuses
examples/example-resume.html's CSS block byte-for-byte (including the :root variables and all class definitions)
- Replaces the content within
.page with the user's data, following the same DOM structure
- Embeds the avatar as
<img class="avatar" src="..."> — accept any local path or web URL the user provides; if no avatar, omit the <img> tag and let .header-left flex naturally
- Keeps all
<span class="en-lg">…</span> wrapping for English terms in titles (improves typographic balance with mixed CJK)
Step 4 — Render PDF + auto-fit to one page
Run scripts/render.py with the HTML path:
python3 scripts/render.py /path/to/resume.html
This:
- Renders via Playwright's bundled Chromium (the only reliable headless renderer for CJK on macOS — system Chrome's headless mode renders CJK as blank)
- Outputs
resume.pdf next to the HTML
- Reports the page count
- If >1 page: progressively tightens
.section margin-top, .entry margin-bottom, and .page padding until it fits, or reports back so you can suggest content cuts
If rendering still spills to page 2 after auto-fit, suggest the user cut content (drop the weakest bullet, merge two short entries, etc.) — never let a resume be 1.05 pages.
Step 5 — Show result
Print the absolute path of the generated PDF. If the environment supports it, also show a screenshot/preview of the first page so the user can sanity-check before sharing.
Style rules (non-negotiable)
- Single page A4 — never 2 pages. Density beats whitespace for fresh-grad/IC resumes.
- No emojis in the resume body.
- No filler adjectives ("热爱", "擅长沟通", "团队合作精神") — replace with quantified outcomes.
- Bullets lead with verb + outcome: "主导 X 0-1 定义与交付,达成 Y 指标" beats "参与了 X 的工作".
- English tech terms keep their casing:
LangChain, LangGraph, Agent, Marketplace, to-Reader — wrap in <span class="en-lg"> if it improves rhythm.
- Numbers > prose: "599 名学生扫描,识别 76 篇有论文记录" beats "扫描了大量论文".
First-time setup (only if Playwright is missing)
pip3 install playwright
python3 -m playwright install chromium
The render script checks for these and prints clear errors if missing.
Files
examples/example-resume.html — reference resume (彭智炜's actual one). Read this to learn the style. Don't copy his content.
examples/example-avatar.jpg — reference avatar (use only as visual reference for portrait crop ratio: 76×102, slight 3px radius).
scripts/render.py — Playwright PDF renderer with auto-fit-to-one-page logic.
1---2name: editorial-resume3description: Generate a single-page A4 PDF resume in editorial bilingual (中/英) style — the kind that lands top-tier tech jobs. Trigger when the user asks to build, write, update, polish, or export their resume; or wants a "looks-like-Peng-Zhiwei's-resume" PDF. Reads the user's context (chat history, attached docs, GitHub repos, LinkedIn dump, prior drafts) and produces a printable PDF without asking 20 questions.4---56# Editorial Resume78A single-page A4 resume PDF generator with editorial bilingual layout. Outputs `resume.pdf` from the user's context with **zero or minimal questions**.910## When to use1112- User asks "帮我做简历 / write my resume / update my CV / export my resume to PDF"13- User wants a printable PDF version of their portfolio/profile14- User uploads an old resume / LinkedIn export / GitHub README and wants it polished into a standard tier-1-tech resume1516## What you do1718You are responsible for end-to-end PDF generation. Do **NOT** make the user fill a form. The whole point is "one shot from context".1920### Step 1 — Gather information from context2122Mine the conversation history, any attached files, and the user's repo for:2324| Field | Where to look |25|---|---|26| Name (Zh + En) | first message, signature, GitHub profile, prior resume |27| Role / title | inferred from job target the user mentions, or current role |28| Tagline / one-liner | what kind of work they ship; pull from their bio |29| Contacts | GitHub, email, WeChat, phone, personal site, LinkedIn |30| 个人简介 (summary) | 2-4 sentences synthesizing what they've shipped |31| 实习经历 (internships) | dated work entries with org, role, 3-4 bullets each |32| 项目经历 (projects) | independent projects with link, role, 3 bullets |33| 教育背景 | school + major + GPA + honors |34| 奖项荣誉 (awards) | competition wins, scholarships, recognitions |35| 技能 (skills) | grouped: tools / stack / methods / domain |36| 黑客松项目 (hackathons) | one-line each, optional |3738**If a section is genuinely missing from context, omit it** — don't fabricate. Better a 1-page resume with 5 sections than a stretched one with empty padding.3940**If critical fields are missing** (name, at least one work/project), ask **once** in a single bundled message (not a sequence of small questions).4142### Step 2 — Read the reference4344Open `examples/example-resume.html` to internalize:45- The CSS variables, fonts, font sizes, line heights — **copy these verbatim**, do not redesign46- The bilingual mixing: Chinese for sections/labels, English for tech terms wrapped in `<span class="en-lg">` for typographic harmony47- The bullet density: each bullet is 1-2 lines, leads with a verb or quantified outcome48- The 1-page A4 constraint — total content height must fit ~1090px4950### Step 3 — Write the resume HTML5152Create a new HTML file at the user's project root (e.g. `resume.html`) that:531. Reuses `examples/example-resume.html`'s CSS block **byte-for-byte** (including the `:root` variables and all class definitions)542. Replaces the content within `.page` with the user's data, following the same DOM structure553. Embeds the avatar as `<img class="avatar" src="...">` — accept any local path or web URL the user provides; if no avatar, omit the `<img>` tag and let `.header-left` flex naturally564. Keeps all `<span class="en-lg">…</span>` wrapping for English terms in titles (improves typographic balance with mixed CJK)5758### Step 4 — Render PDF + auto-fit to one page5960Run `scripts/render.py` with the HTML path:6162```bash63python3 scripts/render.py /path/to/resume.html64```6566This:67- Renders via Playwright's bundled Chromium (the only reliable headless renderer for CJK on macOS — system Chrome's headless mode renders CJK as blank)68- Outputs `resume.pdf` next to the HTML69- Reports the page count70- If >1 page: progressively tightens `.section` margin-top, `.entry` margin-bottom, and `.page` padding until it fits, or reports back so you can suggest content cuts7172If rendering still spills to page 2 after auto-fit, **suggest the user cut content** (drop the weakest bullet, merge two short entries, etc.) — never let a resume be 1.05 pages.7374### Step 5 — Show result7576Print the absolute path of the generated PDF. If the environment supports it, also show a screenshot/preview of the first page so the user can sanity-check before sharing.7778## Style rules (non-negotiable)7980- **Single page A4** — never 2 pages. Density beats whitespace for fresh-grad/IC resumes.81- **No emojis** in the resume body.82- **No filler adjectives** ("热爱", "擅长沟通", "团队合作精神") — replace with quantified outcomes.83- **Bullets lead with verb + outcome**: "主导 X 0-1 定义与交付,达成 Y 指标" beats "参与了 X 的工作".84- **English tech terms keep their casing**: `LangChain`, `LangGraph`, `Agent`, `Marketplace`, `to-Reader` — wrap in `<span class="en-lg">` if it improves rhythm.85- **Numbers > prose**: "599 名学生扫描,识别 76 篇有论文记录" beats "扫描了大量论文".8687## First-time setup (only if Playwright is missing)8889```bash90pip3 install playwright91python3 -m playwright install chromium92```9394The render script checks for these and prints clear errors if missing.9596## Files9798- `examples/example-resume.html` — reference resume (彭智炜's actual one). Read this to learn the style. Don't copy his content.99- `examples/example-avatar.jpg` — reference avatar (use only as visual reference for portrait crop ratio: 76×102, slight 3px radius).100- `scripts/render.py` — Playwright PDF renderer with auto-fit-to-one-page logic.