design-blog-hero
Generate a blog post hero artifact — TWO pixel-exact HTML canvases in a single file: an Open Graph card (1200×630) for social meta tags AND an in-page hero…
Exports design-* HTML artifacts to single-page PDFs using headless Chromium. Targets the same .canvas / [class*="canvas-"] conventions as screenshot-html, but outputs vector PDFs sized to each canvas's exact pixel dimensions rather than PNG rasters. Use when the desired output
$ npx -y skills add slogsdon/skills-design --skill pdf-html --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pdf-htmlContext preview
The summary Claude sees to decide when to auto-load this skill.
Exports design-* HTML artifacts to single-page PDFs using headless Chromium. Targets the same .canvas / [class*="canvas-"] conventions as screenshot-html, but outputs vector PDFs sized to each canvas's exact pixel dimensions rather than PNG rasters. Use when the desired output
name: pdf-html description: > Exports design-* HTML artifacts to single-page PDFs using headless Chromium. Targets the same .canvas / [class*="canvas-"] conventions as screenshot-html, but outputs vector PDFs sized to each canvas's exact pixel dimensions rather than PNG rasters. Use when the desired output is a shareable PDF — audit reports, client deliverables, long-form documents. Do NOT use for social-media graphics (LinkedIn, Instagram, YouTube) or interactive overlay assets; screenshot-html produces better results for those. Trigger on: "export as PDF", "save as PDF", "generate a PDF", "capture as PDF", "PDF version of this", or whenever the user wants a PDF from an HTML artifact previously produced by a design-* skill.
Targeted per-canvas PDF export via headless Chromium. Strips preview-backdrop styles (dark page background, padding, gap) before rendering so the PDF contains only the canvas itself.
deliverables, spec sheets, long-form cards — and a PDF is the desired leave-behind format.
Skip if:
card). Use `screenshot-html` for those — PDFs don't add value and print media mode may alter the styling.
Same canvas conventions as `screenshot-html`:
`canvas-og` / `canvas-hero`, etc.
Nested matches are deduped — only top-level containers generate PDFs.
If a file has no matches, falls back to a full-page PDF. `--full-page` forces this for every file.
node skills/pdf-html/scripts/pdf-html.mjs <dir> [--output <dir>] [--width <px>] [--full-page]
Flags:
`screenshots/` and `pdfs/` subdirectories and hidden dirs are skipped.
per canvas target.
canvas; PDF height is measured from the rendered DOM, not the viewport.
Height is always auto-measured from the canvas's rendered bounding box — no `--height` flag needed.
**None — the script self-bootstraps on first run**, installing Playwright and the Chromium binary into its own `node_modules` alongside the script. First run takes ~10–60s; subsequent runs are fast (~1s overhead).
$ node pdf-html.mjs ./design/<brand>/artifacts Playwright not found. Installing into <skill-dir>/scripts/node_modules (one-time)… …
Same `@import` sanity check as `screenshot-html`: if a relative `@import url('../tokens.css')` can't resolve from the artifact's directory, the guard warns you before writing the PDF:
artifact.html ⚠ design tokens may not have loaded — PDF may show fallback styles.
failed CSS: file:///wrong/path/tokens.css (net::ERR_FILE_NOT_FOUND)
Fix: run the script against the artifact's native folder so relative imports resolve.Playwright's `page.pdf()` renders in `@media print` mode. For `design-*` artifacts the canvas CSS contains no `@media print` overrides, so the rendered PDF matches the browser preview. The preview-backdrop styles (`body { background: #2a2a2a; padding: 32px; }` and `.canvas-label`) are stripped via injected CSS before each PDF is generated, so the output contains only the canvas.
PDF dimensions are set to the canvas's exact rendered pixel size (e.g. `1200 × 5077 px` for a tall audit report). This produces a single-page vector PDF — shareable, searchable, and printable — at the canvas's native resolution.
Same convention as `screenshot-html` but with `.pdf` extension:
| Source file | Targets | Output filenames | |---|---|---| | `audit-report-2026-05-14-mercer-advisors.html` | one `.canvas-audit` | `audit-report-2026-05-14-mercer-advisors.pdf` | | `business-card.html` | `.canvas-front`, `.canvas-back` | `business-card--canvas-front.pdf`, `business-card--canvas-back.pdf` | | `blog-hero.html` | `.canvas-og`, `.canvas-hero` | `blog-hero--canvas-og.pdf`, `blog-hero--canvas-hero.pdf` |
Brand-agnostic design system and artifact generators for Claude Code, plus a figure-worth audit and PDF and HTML-to-PNG export utilities. 19 skills total. Install via the slogsdon-claude-code-config marketplace.
Repo: slogsdon/skills-design
Generate a blog post hero artifact — TWO pixel-exact HTML canvases in a single file: an Open Graph card (1200×630) for social meta tags AND an in-page hero…
Generate a printable business card — pixel-exact 1050×600 front canvas + 1050×600 back canvas in a single HTML file. Standard 3.5×2 inch card at 300dpi. Front…
Generate a LinkedIn / Instagram multi-slide carousel — single HTML file with N square 1080×1080 .canvas divs, each representing one slide. Default N=5 (cover +…
Generate an Instagram post artifact — pixel-exact HTML canvas at 1080×1350 (portrait, default — Instagram's max-real-estate format) with opt-in 1080×1080…
Generate a deliverable landing-page HTML file (NOT a screenshot artifact). 1440px design width, mobile-responsive (CSS-only, no JS). Sections: hero…
Generate a minimal single-column standalone HTML page — mobile-first at 375px width — for use as a link-in-bio destination. Contains: name/wordmark, short…