Infographic Generator
End-to-end workflow: research → layout → HTML → PNG. Bring your own brand book and inspiration images, or use the built-in default design system.
Inputs
Collect before starting:
| Input |
Required |
Notes |
| Topic / title |
Yes |
What the infographic is about |
| Content points |
No |
Key points per section. If not provided, run Step 0 first. |
| Brand book |
No |
Brand context — paste it inline, drop a file, or describe it. Claude extracts colors, fonts, logo, tone from whatever is provided. |
| Inspiration image |
No |
A reference infographic to match the layout structure |
| Dimensions |
No |
portrait (default) or square |
| Output path |
No |
Defaults to ./output/infographic-[topic].png |
Canvas Dimensions
| Format |
Dimensions |
Ratio |
Best for |
| Portrait (default) |
1080 × 1350px |
4:5 |
Mobile-first, 4-section layouts |
| Square |
1200 × 1200px |
1:1 |
Feed visibility, simpler 2–3 section layouts |
Step 0 — Research (when content isn't provided)
If given a topic but not the specific points, research before building.
tavily_extract — if a URL is provided
tavily_search "[topic] 2024" — for general topics
tavily_research — for technical deep dives
Synthesize into 4 section angles before writing any HTML.
Step 1 — Style Resolution
Determine the design approach before writing any code:
Priority order:
- Brand book provided → Extract from whatever context was given (pasted text, dropped file, or description): primary/accent colors, font family, logo/monogram, tone. Apply these instead of the built-in defaults. Keep the layout structure from Step 2.
- Inspiration image provided → Analyze the image first: identify layout structure, column arrangement, visual hierarchy, section count, card patterns, header/footer treatment. Build HTML to match that structure. Keep brand colors from the brand book (or defaults if none provided).
- Both provided → Brand book sets colors + fonts. Inspiration image sets layout.
- Neither provided → Use the built-in default design system (described in Step 2).
When analyzing an inspiration image, extract:
- Number of sections and how they're divided
- Column layout per section (1-col, 2-col, 3-col, grid)
- Header and footer treatment
- Card/box shapes (rounded, sharp, with icons, with tags)
- Typography hierarchy (large title, section headers, body text)
- Visual accents (circles, arrows, flow diagrams, comparison tables)
Step 2 — Build HTML (Built-in Default Design System)
This is the default style. Skip or override based on Step 1 output.
Canvas CSS
/* Portrait */
width: 1080px; height: 1350px; background: #EFF4F0;
/* Square */
width: 1200px; height: 1200px; background: #EFF4F0;
display: flex; flex-direction: column; overflow: hidden;
Structure (top to bottom)
| Element |
CSS |
Notes |
| Header |
flex-shrink: 0; border-bottom: 2px solid rgba(26,39,68,0.1) |
Title + subtitle |
| Mechanism strip |
background: #1A2744; flex-shrink: 0 |
Optional one-liner. Use when there's a core mechanism to name. |
| Sections 1–4 |
flex: 1; display: flex; flex-direction: column |
Equal height. Sections 1–3 get border-bottom: 1.5px solid rgba(26,39,68,0.08). Section 4: border-bottom: none. |
| Footer |
flex-shrink: 0; height: 58px; background: #1A2744 |
Always present |
Brand Colors
| Role |
Hex |
| Canvas bg |
#EFF4F0 |
| Dark navy |
#1A2744 |
| Light blue |
#6BA3D6 |
| Mid blue |
#4A7FB5 |
| Body text |
#4A4A5A |
| Secondary text |
#7C7C8A |
| Card — blue |
#D6E8F5 |
| Card — navy |
#D0D8E8 |
| Card — mint |
#D6EDE0 |
| Card — peach |
#F0E6D6 |
| Card — cream |
#F5F0EB |
| Card — lilac |
#E4DCF0 |
Typography
Load from Google Fonts: Inter (400/500/600/700/800) + Playfair Display (700 italic)
| Element |
Spec |
| Header title |
Inter 800, 38–40px, #1A2744, letter-spacing -0.02em |
| Header subtitle |
Inter 400, 14px, #7C7C8A |
| Section title |
Inter 800, 16px, #1A2744 |
| Card title |
Inter 700, 12.5px, #1A2744 |
| Card body |
Inter 400, 11.5–12px, #4A4A5A, line-height 1.58 |
| Example box text |
Inter 400 italic, 11px, #7C7C8A |
| Footer mark |
Playfair Display italic 700, 15px, white |
Section Numbered Circles
.s1 { background: #6BA3D6; } /* blue */
.s2 { background: #1A2744; } /* navy */
.s3 { background: #4A7FB5; } /* mid blue */
.s4 { background: #6BA3D6; } /* blue */
Size: 28×28px, border-radius 50%, Inter 800 12px white.
Section Content Patterns
| Section |
Layout |
Best for |
| 1 |
2-col card grid |
Two core concepts, two input types |
| 2 |
2-col or 3-col card grid |
Feature breakdown, use cases |
| 3 |
1 card + flow diagram, OR 3-col |
Process steps, loops |
| 4 |
Before/After comparison table |
Contrast, results, with/without |
Card anatomy:
card-icon — 20×20px white square with box-shadow, emoji or symbol
card-title — Inter 700 12.5px, with optional .card-tag pill (right-aligned)
card-body — descriptive text
card-example (optional) — dashed border box, label "PROMPT" or "EXAMPLE" in 9px uppercase blue, italic gray text
Flow steps: white boxes, centered, flow-step-num (22px blue circle), flow-step-title, flow-step-body. Connect with → arrows.
Comparison table: 2-col grid. bad header (rgba(200,100,80,0.12)) vs good header (rgba(107,163,214,0.2)). Row items: colored dots dot-bad rgba(200,100,80,0.5) · dot-good #6BA3D6.
Footer
Customize the footer with your own name/logo. Default placeholder:
<div class="footer">
<div class="logo-mark"><span>A</span></div>
<div class="footer-name">Your Name</div>
</div>
Logo mark CSS: background #6BA3D6, 5px border-radius, Playfair Display italic white letter.
To customize: replace "A" with your initial and "Your Name" with your name. If the user has provided a brand book with a name/logo, use that.
Step 3 — Copy Rules
- No filler words: avoid "leveraging," "seamlessly," "powerful," "game-changing," "robust," "revolutionizing"
- Titles: sharp and specific — "4 Habits That Actually Move the Needle" not "Your Complete Guide to High Performance"
- Prompt/example boxes: write real, usable content — not
[your task here] placeholders
- Tags (DAILY / WEEKLY / ALWAYS etc.): only use when accurate and specific
- Section count: default is 4. Use 3 if content is sparse; never go above 4 in portrait.
Step 4 — Export to PNG
Save HTML to: ./output/infographic-[topic].html (relative to project root)
Screenshot with Playwright — use shell variables so the script works from any project:
# Install Playwright if not already present (one-time)
cd /tmp && npm install playwright
# Set paths (run from your project root)
HTML_FILE="$(pwd)/output/infographic-[topic].html"
PNG_FILE="$(pwd)/output/infographic-[topic].png"
# Create output dir if needed
mkdir -p "$(pwd)/output"
# Export the canvas element to PNG
# Paths are passed as arguments (not interpolated into the script string) to avoid shell injection
cd /tmp && node -e "
const { chromium } = require('playwright');
const htmlFile = process.argv[1];
const pngFile = process.argv[2];
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.setViewportSize({ width: 1200, height: 1500 });
await page.goto('file://' + htmlFile);
await page.waitForTimeout(1000);
const canvas = await page.\$('.canvas');
await canvas.screenshot({ path: pngFile, type: 'png' });
await browser.close();
console.log('Done: ' + pngFile);
})();
" -- "$HTML_FILE" "$PNG_FILE"
Verify: ls -lh ./output/infographic-[topic].png — expect 150K–300K.
Image pipeline: HTML → Playwright → PNG only. Do not use image generation APIs for infographics.
Customization Reference
| Thing to change |
Where |
| Brand colors |
Replace hex values in Step 2 color table |
| Fonts |
Swap Google Fonts import + update font-family references |
| Footer name/initial |
Edit the logo-mark span and footer-name div |
| Output directory |
Change ./output/ to any path you prefer |
| Canvas size |
Update canvas CSS width/height + Playwright viewport |
| Number of sections |
Remove or add section blocks in HTML; adjust flex: 1 distribution |
1---2name: infographic-generator3description: End-to-end workflow for creating infographic image assets. Research a topic, design a multi-section HTML layout, and export to PNG via Playwright. Bring your own brand book and/or reference images to match your style — or use the built-in default design system. Use this skill whenever the user asks to: create an infographic, turn a topic into a visual asset, build a carousel slide, design an explainer image, or export a layout as PNG. Also trigger on phrases like "make an infographic about X", "turn this into a visual", "build a 4-section layout", or "export this as a PNG". Works for any platform: LinkedIn, blog, newsletter, slides, or print.4---56# Infographic Generator78End-to-end workflow: research → layout → HTML → PNG. Bring your own brand book and inspiration images, or use the built-in default design system.910---1112## Inputs1314Collect before starting:1516| Input | Required | Notes |17|-------|----------|-------|18| **Topic / title** | Yes | What the infographic is about |19| **Content points** | No | Key points per section. If not provided, run Step 0 first. |20| **Brand book** | No | Brand context — paste it inline, drop a file, or describe it. Claude extracts colors, fonts, logo, tone from whatever is provided. |21| **Inspiration image** | No | A reference infographic to match the layout structure |22| **Dimensions** | No | `portrait` (default) or `square` |23| **Output path** | No | Defaults to `./output/infographic-[topic].png` |2425---2627## Canvas Dimensions2829| Format | Dimensions | Ratio | Best for |30|--------|-----------|-------|---------|31| **Portrait** (default) | 1080 × 1350px | 4:5 | Mobile-first, 4-section layouts |32| **Square** | 1200 × 1200px | 1:1 | Feed visibility, simpler 2–3 section layouts |3334---3536## Step 0 — Research (when content isn't provided)3738If given a topic but not the specific points, research before building.3940- `tavily_extract` — if a URL is provided41- `tavily_search "[topic] 2024"` — for general topics42- `tavily_research` — for technical deep dives4344Synthesize into **4 section angles** before writing any HTML.4546---4748## Step 1 — Style Resolution4950Determine the design approach before writing any code:5152**Priority order:**531. **Brand book provided** → Extract from whatever context was given (pasted text, dropped file, or description): primary/accent colors, font family, logo/monogram, tone. Apply these instead of the built-in defaults. Keep the layout structure from Step 2.542. **Inspiration image provided** → Analyze the image first: identify layout structure, column arrangement, visual hierarchy, section count, card patterns, header/footer treatment. Build HTML to match that structure. Keep brand colors from the brand book (or defaults if none provided).553. **Both provided** → Brand book sets colors + fonts. Inspiration image sets layout.564. **Neither provided** → Use the built-in default design system (described in Step 2).5758**When analyzing an inspiration image, extract:**59- Number of sections and how they're divided60- Column layout per section (1-col, 2-col, 3-col, grid)61- Header and footer treatment62- Card/box shapes (rounded, sharp, with icons, with tags)63- Typography hierarchy (large title, section headers, body text)64- Visual accents (circles, arrows, flow diagrams, comparison tables)6566---6768## Step 2 — Build HTML (Built-in Default Design System)6970This is the default style. Skip or override based on Step 1 output.7172### Canvas CSS7374```css75/* Portrait */76width: 1080px; height: 1350px; background: #EFF4F0;7778/* Square */79width: 1200px; height: 1200px; background: #EFF4F0;8081display: flex; flex-direction: column; overflow: hidden;82```8384### Structure (top to bottom)8586| Element | CSS | Notes |87|---------|-----|-------|88| Header | `flex-shrink: 0; border-bottom: 2px solid rgba(26,39,68,0.1)` | Title + subtitle |89| Mechanism strip | `background: #1A2744; flex-shrink: 0` | Optional one-liner. Use when there's a core mechanism to name. |90| Sections 1–4 | `flex: 1; display: flex; flex-direction: column` | Equal height. Sections 1–3 get `border-bottom: 1.5px solid rgba(26,39,68,0.08)`. Section 4: `border-bottom: none`. |91| Footer | `flex-shrink: 0; height: 58px; background: #1A2744` | Always present |9293### Brand Colors9495| Role | Hex |96|------|-----|97| Canvas bg | `#EFF4F0` |98| Dark navy | `#1A2744` |99| Light blue | `#6BA3D6` |100| Mid blue | `#4A7FB5` |101| Body text | `#4A4A5A` |102| Secondary text | `#7C7C8A` |103| Card — blue | `#D6E8F5` |104| Card — navy | `#D0D8E8` |105| Card — mint | `#D6EDE0` |106| Card — peach | `#F0E6D6` |107| Card — cream | `#F5F0EB` |108| Card — lilac | `#E4DCF0` |109110### Typography111112Load from Google Fonts: `Inter` (400/500/600/700/800) + `Playfair Display` (700 italic)113114| Element | Spec |115|---------|------|116| Header title | Inter 800, 38–40px, `#1A2744`, letter-spacing -0.02em |117| Header subtitle | Inter 400, 14px, `#7C7C8A` |118| Section title | Inter 800, 16px, `#1A2744` |119| Card title | Inter 700, 12.5px, `#1A2744` |120| Card body | Inter 400, 11.5–12px, `#4A4A5A`, line-height 1.58 |121| Example box text | Inter 400 italic, 11px, `#7C7C8A` |122| Footer mark | Playfair Display italic 700, 15px, white |123124### Section Numbered Circles125126```css127.s1 { background: #6BA3D6; } /* blue */128.s2 { background: #1A2744; } /* navy */129.s3 { background: #4A7FB5; } /* mid blue */130.s4 { background: #6BA3D6; } /* blue */131```132133Size: 28×28px, border-radius 50%, Inter 800 12px white.134135### Section Content Patterns136137| Section | Layout | Best for |138|---------|--------|----------|139| 1 | 2-col card grid | Two core concepts, two input types |140| 2 | 2-col or 3-col card grid | Feature breakdown, use cases |141| 3 | 1 card + flow diagram, OR 3-col | Process steps, loops |142| 4 | Before/After comparison table | Contrast, results, with/without |143144**Card anatomy:**145- `card-icon` — 20×20px white square with box-shadow, emoji or symbol146- `card-title` — Inter 700 12.5px, with optional `.card-tag` pill (right-aligned)147- `card-body` — descriptive text148- `card-example` (optional) — dashed border box, label "PROMPT" or "EXAMPLE" in 9px uppercase blue, italic gray text149150**Flow steps:** white boxes, centered, `flow-step-num` (22px blue circle), `flow-step-title`, `flow-step-body`. Connect with `→` arrows.151152**Comparison table:** 2-col grid. `bad` header (`rgba(200,100,80,0.12)`) vs `good` header (`rgba(107,163,214,0.2)`). Row items: colored dots `dot-bad` `rgba(200,100,80,0.5)` · `dot-good` `#6BA3D6`.153154### Footer155156Customize the footer with your own name/logo. Default placeholder:157158```html159<div class="footer">160 <div class="logo-mark"><span>A</span></div>161 <div class="footer-name">Your Name</div>162</div>163```164165Logo mark CSS: background `#6BA3D6`, 5px border-radius, Playfair Display italic white letter.166167To customize: replace `"A"` with your initial and `"Your Name"` with your name. If the user has provided a brand book with a name/logo, use that.168169---170171## Step 3 — Copy Rules172173- **No filler words**: avoid "leveraging," "seamlessly," "powerful," "game-changing," "robust," "revolutionizing"174- **Titles**: sharp and specific — "4 Habits That Actually Move the Needle" not "Your Complete Guide to High Performance"175- **Prompt/example boxes**: write real, usable content — not `[your task here]` placeholders176- **Tags** (DAILY / WEEKLY / ALWAYS etc.): only use when accurate and specific177- **Section count**: default is 4. Use 3 if content is sparse; never go above 4 in portrait.178179---180181## Step 4 — Export to PNG182183**Save HTML to:** `./output/infographic-[topic].html` (relative to project root)184185**Screenshot with Playwright** — use shell variables so the script works from any project:186187```bash188# Install Playwright if not already present (one-time)189cd /tmp && npm install playwright190191# Set paths (run from your project root)192HTML_FILE="$(pwd)/output/infographic-[topic].html"193PNG_FILE="$(pwd)/output/infographic-[topic].png"194195# Create output dir if needed196mkdir -p "$(pwd)/output"197198# Export the canvas element to PNG199# Paths are passed as arguments (not interpolated into the script string) to avoid shell injection200cd /tmp && node -e "201const { chromium } = require('playwright');202const htmlFile = process.argv[1];203const pngFile = process.argv[2];204(async () => {205 const browser = await chromium.launch();206 const page = await browser.newPage();207 await page.setViewportSize({ width: 1200, height: 1500 });208 await page.goto('file://' + htmlFile);209 await page.waitForTimeout(1000);210 const canvas = await page.\$('.canvas');211 await canvas.screenshot({ path: pngFile, type: 'png' });212 await browser.close();213 console.log('Done: ' + pngFile);214})();215" -- "$HTML_FILE" "$PNG_FILE"216```217218**Verify:** `ls -lh ./output/infographic-[topic].png` — expect 150K–300K.219220> **Image pipeline: HTML → Playwright → PNG only. Do not use image generation APIs for infographics.**221222---223224## Customization Reference225226| Thing to change | Where |227|---|---|228| Brand colors | Replace hex values in Step 2 color table |229| Fonts | Swap Google Fonts import + update font-family references |230| Footer name/initial | Edit the `logo-mark` span and `footer-name` div |231| Output directory | Change `./output/` to any path you prefer |232| Canvas size | Update canvas CSS width/height + Playwright viewport |233| Number of sections | Remove or add section blocks in HTML; adjust `flex: 1` distribution |