Infographic Generator
Produce one focused HTML infographic that communicates a single message with
verified data, strong visual hierarchy, and a restrained palette. Output is a
self-contained .html file (all CSS inline, fonts from Google Fonts, charts as
hand-computed inline SVG) so it renders anywhere, exports to PNG/PDF via the
bundled script, and can be published as an Artifact.
Default content language is Japanese unless the source material or the user
is in another language. Design the layout and typography for Japanese text
(line-break behavior, no reliance on italic, generous line-height).
Why code, not image generation
Image models mangle Japanese glyphs, invent numbers, and draw charts whose bars
don't match the quoted percentages. Rendering real text and SVG keeps every
statistic exact and every element editable. Only reach for an image-gen path if
the user explicitly wants an illustrative "poster" look with no real data.
Workflow
Work through these steps in order. Steps 1–4 are quick; don't skip them — an
infographic fails at the planning stage, not the CSS stage.
1. Frame the piece
Establish, from the request or by asking one compact round of questions:
- The one message. An infographic carries exactly one idea. If the content
has two, say so and either split into two infographics or pick the primary.
- Audience & tone — business, consumer, education, healthcare, tech. This
drives palette and font choice.
- Aspect ratio / medium:
16:9 landscape (1600×900) — slides, embedding in docs. Default.
9:16 portrait (1080×1920) — stories, mobile, long timelines.
1:1 square (1200×1200) — X / Instagram / LinkedIn posts.
A4 portrait (1240×1754 @150dpi) — printed handout.
- Language of the finished piece.
2. Organize the source content
Extract the real substance into a short working list before touching layout:
- Copy every statistic, date, name, and quote verbatim. "73%増" stays
"73%増" — never round, re-derive, or infer a number that isn't stated. If a
figure is missing or ambiguous, ask rather than guess.
- Curate hard. An infographic is a headline, not a spreadsheet. Cut
anything that doesn't serve the one message. Soft caps by type, so each unit
keeps room to breathe:
- Statistical: 1 hero stat + ≤6 supporting stats, ≤1 chart.
- Process / flow: ≤7 steps.
- Concept / explainer: ≤6 satellites / layers / stages.
- Comparison: ≤6 criteria rows.
- Timeline: ≤7 entries for a single-screen (16:9 / 1:1) piece; up to
~10 only for a tall 9:16 scroll where the spine still gives each entry
real spacing. If you have more, group them ("2018–2020: …") or drop the
minor ones — and say in your summary what you cut and why.
- Strip secrets — API keys, tokens, internal URLs, personal data that
wandered in from pasted logs or docs.
- Note the source and date for the footer. Every infographic gets an
attribution line; unsourced numbers read as fabricated.
3. Classify the type and choose a layout
Match the content to one type, then pick its layout blueprint. Read
references/infographic-types.md for the full taxonomy and blueprints.
| Content shape |
Type |
Layout starting point |
| Headline numbers, proportions, comparisons of magnitude |
Statistical |
KPI-card grid + hero number; charts only if ≥5 points |
| Ordered steps, how-to, a pipeline, problem→solution |
Process / flow |
Numbered step cards with connectors |
| Events over time, history, a roadmap |
Timeline |
Vertical spine, alternating entries |
| A vs B, before/after, pros/cons, plan tiers |
Comparison |
Two/three colour-coded columns, check/✕ marks |
| How something works, a concept, parts of a whole |
Concept / explainer |
Hub-and-spoke, layered, or annotated diagram |
Offer the user 2–3 layout options in a sentence each when the choice isn't
obvious, then proceed with their pick (or the best default if they defer).
Each type has a ready skeleton in assets/templates/. Copy the closest one and
adapt — don't build from a blank file.
4. Lock the visual system
- Palette: one primary, one accent, one neutral. 3 colours max. Fewer
colours make the emphasis land. Pick a ready, contrast-checked set from
references/color-palettes.md matched to the audience.
- Type: 2 typefaces maximum — one for headings, one for body. Vetted
Japanese-capable pairings and a size scale are in
references/typography.md.
- Spacing rhythm: ≥20px between elements, ≥40px between sections. Whitespace
is the tool that guides the eye — protect it.
5. Build the HTML
Start from the chosen template. Assemble:
- Header — the title in one line, optional one-line context beneath.
- Hero callout — the single most important number or statement, visually
dominant (largest, highest, in the accent colour).
- 3–6 body sections — each with a short heading, one concept, one visual
element (icon, mini-chart, number), and terse labels.
- Footer — source + date in small (~11px) muted text; optional credit.
For a concept / explainer, the diagram is the infographic — it must be
the visually dominant element, not a row of small icons. Build it either as one
inline <svg> (hub-and-spoke, cycle, annotated illustration) or as styled HTML
boxes joined by real connectors (arrows/lines drawn with CSS or a thin SVG
overlay). Either is fine; what matters is that the relationships are drawn,
the connectors don't cross, and the diagram occupies the majority of the
canvas. The concept-explainer.html template shows the SVG route; the RAG-style
left-to-right connected-card flow is the HTML route.
Rules that keep it from looking amateur:
- Charts are inline SVG computed from the real numbers. A bar for 42% is
0.42 of the axis length — verify proportions against the quoted figures. Use a
chart only when a trend or 5+ values need it; 1–4 figures hit harder as big
numbers. See
references/chart-selection.md.
- Icons: one consistent set (inline SVG, or Font Awesome free via CDN).
Never use the same icon for two different concepts.
- Text is real text, never baked into an image. That's the whole point.
- One visual weight system: title > hero > section head > body > caption,
consistently applied.
- Self-contained: inline all CSS, load fonts from
fonts.googleapis.com, embed any raster as a data URI. The file must render
offline-ish from a double-click.
6. Self-review before showing the user
Do one focused pass, not an open-ended polish loop — render once, check the
list below, fix what's actually broken, render again if you changed layout, and
stop. Two render cycles is normal; five means you're fiddling.
Run through references/quality-checklist.md. The high-frequency failures:
- A number in the graphic doesn't match the source, or a chart bar doesn't
match its percentage.
- No source/date footer.
- More than 3 colours or 2 fonts crept in.
- A section is doing two jobs, or the whole piece has two messages.
- Cramped sections with no breathing room, or one column far heavier than the
other.
- Contrast below WCAG AA on any text.
Fix issues before presenting. State briefly what type/layout/palette you chose
and why.
7. Deliver and iterate
- Save the
.html to the working directory (or where the user wants it). The
HTML is the primary deliverable — it is complete on its own.
- Export (optional):
python scripts/render.py <file.html> --format png --width <W> --height <H>
produces a PNG or PDF via Playwright. If the script reports Playwright is
missing, don't fight it — don't hand-roll a headless-browser command or
try alternative renderers. Just tell the user the HTML is ready and that a
browser's Ctrl/Cmd-P → Save as PDF (or publishing as an Artifact) gives
them an image. One render attempt, then move on.
- Offer to publish it as an Artifact for a shareable link.
- Iteration requests ("bigger hero number", "calmer palette", "add a step")
are cheap edits to the HTML — that's why this is code.
Reference files
Read these as the step calls for them — don't front-load all of them.
references/infographic-types.md — the 8-type taxonomy, each with a layout
blueprint and a when-to-use note.
references/design-principles.md — hierarchy, single-message rule, whitespace
numbers, data-ink, reading-flow (Z / F pattern), Japanese-text specifics.
references/color-palettes.md — ~10 ready 3-colour palettes by audience, each
with hex values and contrast ratios.
references/typography.md — Japanese-capable heading/body font pairs, the
type scale, sizing minimums.
references/chart-selection.md — data shape → chart type, and the
number-as-text vs chart decision.
references/quality-checklist.md — the veto list for step 6.
Templates
assets/templates/ holds a self-contained starting file per type:
statistical-dashboard.html, process-flow.html, vertical-timeline.html,
comparison.html, concept-explainer.html. Each has the design tokens as CSS
variables at the top, a working example with placeholder content, and the
footer already wired.
1---2name: infographic-generator3description: Turn raw content — stats, a process, a timeline, a concept, research notes, an article, a report — into a single self-contained HTML infographic that is clean, accurate, and presentation-ready (viewable in a browser and exportable to PNG/PDF or a Claude Artifact). Use this skill whenever the user asks for an "インフォグラフィック" / "infographic", a "図解" / visual explainer, a one-pager or "1枚もの", a visual summary of data or a document, a "まとめ画像" for slides or social media, or wants to "見える化 / ビジュアル化 / 図解して" some information — even if they don't say the word "infographic". Prefer this over ad-hoc HTML or image generation because code output keeps every number exact, stays editable ("make the font bigger", "swap the accent color"), and exports losslessly. Not for multi-slide decks (use a slides skill), editable diagrams / flowcharts as source-of-truth (use a drawio skill), or dashboards wired to live data.4---56# Infographic Generator78Produce **one focused HTML infographic** that communicates a single message with9verified data, strong visual hierarchy, and a restrained palette. Output is a10self-contained `.html` file (all CSS inline, fonts from Google Fonts, charts as11hand-computed inline SVG) so it renders anywhere, exports to PNG/PDF via the12bundled script, and can be published as an Artifact.1314Default content language is **Japanese** unless the source material or the user15is in another language. Design the layout and typography for Japanese text16(line-break behavior, no reliance on italic, generous line-height).1718## Why code, not image generation1920Image models mangle Japanese glyphs, invent numbers, and draw charts whose bars21don't match the quoted percentages. Rendering real text and SVG keeps every22statistic exact and every element editable. Only reach for an image-gen path if23the user explicitly wants an illustrative "poster" look with no real data.2425## Workflow2627Work through these steps in order. Steps 1–4 are quick; don't skip them — an28infographic fails at the planning stage, not the CSS stage.2930### 1. Frame the piece3132Establish, from the request or by asking one compact round of questions:3334- **The one message.** An infographic carries exactly one idea. If the content35 has two, say so and either split into two infographics or pick the primary.36- **Audience & tone** — business, consumer, education, healthcare, tech. This37 drives palette and font choice.38- **Aspect ratio / medium:**39 - `16:9` landscape (1600×900) — slides, embedding in docs. *Default.*40 - `9:16` portrait (1080×1920) — stories, mobile, long timelines.41 - `1:1` square (1200×1200) — X / Instagram / LinkedIn posts.42 - `A4 portrait` (1240×1754 @150dpi) — printed handout.43- **Language** of the finished piece.4445### 2. Organize the source content4647Extract the real substance into a short working list before touching layout:4849- Copy **every statistic, date, name, and quote verbatim**. "73%増" stays50 "73%増" — never round, re-derive, or infer a number that isn't stated. If a51 figure is missing or ambiguous, ask rather than guess.52- **Curate hard.** An infographic is a headline, not a spreadsheet. Cut53 anything that doesn't serve the one message. Soft caps by type, so each unit54 keeps room to breathe:55 - Statistical: 1 hero stat + **≤6** supporting stats, **≤1** chart.56 - Process / flow: **≤7** steps.57 - Concept / explainer: **≤6** satellites / layers / stages.58 - Comparison: **≤6** criteria rows.59 - Timeline: **≤7** entries for a single-screen (16:9 / 1:1) piece; up to60 **~10** only for a tall 9:16 scroll where the spine still gives each entry61 real spacing. If you have more, group them ("2018–2020: …") or drop the62 minor ones — and say in your summary what you cut and why.63- **Strip secrets** — API keys, tokens, internal URLs, personal data that64 wandered in from pasted logs or docs.65- Note the **source and date** for the footer. Every infographic gets an66 attribution line; unsourced numbers read as fabricated.6768### 3. Classify the type and choose a layout6970Match the content to one type, then pick its layout blueprint. Read71`references/infographic-types.md` for the full taxonomy and blueprints.7273| Content shape | Type | Layout starting point |74|---|---|---|75| Headline numbers, proportions, comparisons of magnitude | **Statistical** | KPI-card grid + hero number; charts only if ≥5 points |76| Ordered steps, how-to, a pipeline, problem→solution | **Process / flow** | Numbered step cards with connectors |77| Events over time, history, a roadmap | **Timeline** | Vertical spine, alternating entries |78| A vs B, before/after, pros/cons, plan tiers | **Comparison** | Two/three colour-coded columns, check/✕ marks |79| How something works, a concept, parts of a whole | **Concept / explainer** | Hub-and-spoke, layered, or annotated diagram |8081Offer the user 2–3 layout options in a sentence each when the choice isn't82obvious, then proceed with their pick (or the best default if they defer).8384Each type has a ready skeleton in `assets/templates/`. Copy the closest one and85adapt — don't build from a blank file.8687### 4. Lock the visual system8889- **Palette: one primary, one accent, one neutral. 3 colours max.** Fewer90 colours make the emphasis land. Pick a ready, contrast-checked set from91 `references/color-palettes.md` matched to the audience.92- **Type: 2 typefaces maximum** — one for headings, one for body. Vetted93 Japanese-capable pairings and a size scale are in `references/typography.md`.94- **Spacing rhythm:** ≥20px between elements, ≥40px between sections. Whitespace95 is the tool that guides the eye — protect it.9697### 5. Build the HTML9899Start from the chosen template. Assemble:1001011. **Header** — the title in one line, optional one-line context beneath.1022. **Hero callout** — the single most important number or statement, visually103 dominant (largest, highest, in the accent colour).1043. **3–6 body sections** — each with a short heading, *one* concept, one visual105 element (icon, mini-chart, number), and terse labels.1064. **Footer** — source + date in small (~11px) muted text; optional credit.107108For a **concept / explainer**, the diagram *is* the infographic — it must be109the visually dominant element, not a row of small icons. Build it either as one110inline `<svg>` (hub-and-spoke, cycle, annotated illustration) or as styled HTML111boxes joined by real connectors (arrows/lines drawn with CSS or a thin SVG112overlay). Either is fine; what matters is that the relationships are *drawn*,113the connectors don't cross, and the diagram occupies the majority of the114canvas. The `concept-explainer.html` template shows the SVG route; the RAG-style115left-to-right connected-card flow is the HTML route.116117Rules that keep it from looking amateur:118119- **Charts are inline SVG computed from the real numbers.** A bar for 42% is120 0.42 of the axis length — verify proportions against the quoted figures. Use a121 chart only when a trend or 5+ values need it; 1–4 figures hit harder as big122 numbers. See `references/chart-selection.md`.123- **Icons:** one consistent set (inline SVG, or Font Awesome free via CDN).124 Never use the same icon for two different concepts.125- **Text is real text**, never baked into an image. That's the whole point.126- One visual weight system: title > hero > section head > body > caption,127 consistently applied.128- Self-contained: inline all CSS, load fonts from129 `fonts.googleapis.com`, embed any raster as a data URI. The file must render130 offline-ish from a double-click.131132### 6. Self-review before showing the user133134Do one focused pass, not an open-ended polish loop — render once, check the135list below, fix what's actually broken, render again if you changed layout, and136stop. Two render cycles is normal; five means you're fiddling.137138Run through `references/quality-checklist.md`. The high-frequency failures:139140- A number in the graphic doesn't match the source, or a chart bar doesn't141 match its percentage.142- No source/date footer.143- More than 3 colours or 2 fonts crept in.144- A section is doing two jobs, or the whole piece has two messages.145- Cramped sections with no breathing room, or one column far heavier than the146 other.147- Contrast below WCAG AA on any text.148149Fix issues before presenting. State briefly what type/layout/palette you chose150and why.151152### 7. Deliver and iterate153154- Save the `.html` to the working directory (or where the user wants it). The155 HTML is the primary deliverable — it is complete on its own.156- **Export (optional):** `python scripts/render.py <file.html> --format png --width <W> --height <H>`157 produces a PNG or PDF via Playwright. If the script reports Playwright is158 missing, **don't fight it** — don't hand-roll a headless-browser command or159 try alternative renderers. Just tell the user the HTML is ready and that a160 browser's `Ctrl/Cmd-P → Save as PDF` (or publishing as an Artifact) gives161 them an image. One render attempt, then move on.162- Offer to publish it as an **Artifact** for a shareable link.163- Iteration requests ("bigger hero number", "calmer palette", "add a step")164 are cheap edits to the HTML — that's why this is code.165166## Reference files167168Read these as the step calls for them — don't front-load all of them.169170- `references/infographic-types.md` — the 8-type taxonomy, each with a layout171 blueprint and a when-to-use note.172- `references/design-principles.md` — hierarchy, single-message rule, whitespace173 numbers, data-ink, reading-flow (Z / F pattern), Japanese-text specifics.174- `references/color-palettes.md` — ~10 ready 3-colour palettes by audience, each175 with hex values and contrast ratios.176- `references/typography.md` — Japanese-capable heading/body font pairs, the177 type scale, sizing minimums.178- `references/chart-selection.md` — data shape → chart type, and the179 number-as-text vs chart decision.180- `references/quality-checklist.md` — the veto list for step 6.181182## Templates183184`assets/templates/` holds a self-contained starting file per type:185`statistical-dashboard.html`, `process-flow.html`, `vertical-timeline.html`,186`comparison.html`, `concept-explainer.html`. Each has the design tokens as CSS187variables at the top, a working example with placeholder content, and the188footer already wired.