resume-modern
Modern minimalist resume, single-page A4, suitable for printing or exporting to PDF.
1How It Works & Mechanism
This template is purely data within a 'folder-as-template' architecture: SKILL.md uses YAML frontmatter for the selector, and its body serves as layout directives for the agent. The repository writes no code for individual templates; adding a new template simply means adding a folder.
SKILL.md — frontmatter (id, scenario, tags, …) + prompt body
At runtime, the host sandwiches this template's body between shared design directives and user content to compose a single prompt—the template's 'intelligence' resides entirely within this natural language text, with zero executable code.
return `${SHARED_DESIGN_DIRECTIVES} ${opts.body.trim()}
After loading the template, the host's /api/convert passes the text to a locally authenticated coding-agent CLI, streaming back only stdout as HTML; the template itself performs no network calls, reads no credentials, and writes no files.
prompt = assemblePrompt({ body: skill.body, content, format });
The accompanying example.html is a 'pre-rendered example' served as-is by the preview endpoint into the selector and gallery iframe—it determines whether the template card has a visual preview and does not participate in content generation.
Returns the skill's `example.html` verbatim so it can be loaded into an
Fields in the frontmatter are mapped one-by-one to selector metadata (featured determines overall ranking, recommended promotes it to the top '★ Recommended' section, example_* generates example card copy) and dictate where it appears in category/scenario filters.
if (typeof fm.featured === "number") meta.featured = fm.featured;
All generation capabilities of this template are fulfilled entirely by its own body: resume-modern/SKILL.md solely describes layout, color palette, typography, and content guidelines, without a single instruction prompting the agent to run tools, fetch APIs, or read external data.
【模板: 现代极简简历】
The body translates 'single-page A4' into actionable constraints: the container simulates A4 using Tailwind arbitrary values (w-[210mm] min-h-[297mm] mx-auto) and mandates @media print styles—this is how its 'printable / PDF-exportable' nature is achieved.
- 容器宽度模拟 A4: `w-[210mm] min-h-[297mm] mx-auto`, 内边距 16-20mm。
The information architecture is strictly defined as a 60/40 primary/secondary two-column split, where the secondary column accommodates supporting details such as skills, languages, and honors.
- 主体两栏可选: 左 60% 主线(经历/项目/教育), 右 40% 副线(技能/语言/获奖)。
The writing format for experience entries is also mandated: Company + Role + right-aligned Date Range + 1–3 verb-led bullet points, effectively encoding resume writing best practices into the template.
- 经历每条: 公司 + 职位 + 时间区间 (右对齐), 下方 1-3 条 bullet 用动词开头。
The color scheme is restricted to monochrome/gray + 1 accent (navy blue/dark green), explicitly rejecting flashy colors—reducing recruiter cognitive load while curbing arbitrary model deviations.
- 不使用花哨颜色, 黑白灰 + 1 个 accent (深蓝 / 墨绿)。
The accompanying example faithfully implements this: .page is pinned to A4 dimensions, and @media print strips backgrounds and box shadows.
.page { width:210mm; min-height:297mm; margin:0 auto; background:#fff; padding:18mm 16mm; box-shadow:0 30px 60px -20px rgba(0,0,0,0.18); }
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| network | Tailwind CDN(仅出现在产物示例 example.html,运行时不要求) |
| network | Google Fonts(仅出现在产物示例 example.html) |
| cli | 本地 coding-agent CLI(宿主提供,模板自身不调用) |
4Recommended Governance & Evidence
- 网络端点: Declared external network access: cdn.tailwindcss.com (<script src> in example.html, fetched by the browser during selector preview or local viewing)
5Second-Pass Verification
- [ok] skill 目录的脚本 / 网络 / 凭证 / 写盘面 — 目录仅 SKILL.md / example.html / example.md 3 个文件,无 scripts/references/数据目录;token 扫描(curl / wget / fetch / exec / spawn / process.env / API_KEY / token / secret / write / save / delete)在该目录的 SKILL.md 中零命中;无自带可执行脚本。
- [ok] 运行时链路复核 — 重读 loader.ts / shared.ts / app/api/convert/route.ts / app/api/templates/[id]/preview/route.ts:模板正文只作为 prompt body 被 assemblePrompt 拼装,宿主 spawn 本地 CLI 并捕获 stdout;模板不参与任何执行。
- [ok] commit 与元数据 — 工作副本 git HEAD = 553ed98c283f9c0f489902d035416a972d6a9699(=任务表 pin 的 full 40 位);GitHub API nexu-io/html-anything:stars 8827、license spdx Apache-2.0、pushed_at 2026-09-15T03:36:24Z(与本地 HEAD 提交时间 2026-09-15 11:36:24 +0800 一致)。
- [discrepancy] README 与源码的 frontmatter schema 漂移(仓库级) — README 第 213 / 217 / 468 行称模板 frontmatter 必须含 mode · scenario · surface · preview · design_system;但在 next/src/lib/templates/skills/ 下 '^mode:'、'^surface:'、'^design_system:' 全部零命中,实际字段是 category / scenario / aspect_hint / featured / recommended + example_*(loader.ts 的 SkillFrontmatter)。文档滞后于代码,不影响本模板运行,但照 README 新写模板会踩空。
- [ok] frontmatter 元数据映射 — loader.ts fmToMeta 逐字段映射 zhName / enName / emoji / description / category / scenario / aspectHint / tags + featured / recommended + example 卡;本模板取自 SKILL.md 的实际取值与之相符。
- [ok] example.html 与 SKILL.md 的一致性 — 正文三条硬约束都能在示例找到实现:A4 容器(.page width:210mm / min-height:297mm)、@media print 关阴影与背景、双栏 + 动词开头 bullet 的经历条目。
- [ok] 端点扫描(目录内) — resume-modern 目录 3 个文件中仅 example.html 含 2 个外部端点(cdn.tailwindcss.com、fonts.googleapis.com);SKILL.md / example.md 零 URL、零工具调用指令。
- [ok] 「可打印 / 导出 PDF」能力核对 — 不是营销词:example.html 真的带 @media print { body { background:#fff; padding:0; } .page { box-shadow:none; } },浏览器打印即可出 A4。
6Verdict & Scenarios
4f09497e18a7ccfc…