Install
openclaw skills install article-to-infographicTransform articles, blog posts, reports, or any text content into visually stunning, self-contained HTML infographics. Use when the user wants to convert tex...
openclaw skills install article-to-infographicTransform any article or text content into a visually compelling, self-contained HTML infographic. Output is a single HTML file with inline CSS/JS -- zero dependencies, opens in any browser, print-ready for PDF export.
Strict 3-Step Confirmation Process:
Step 1: Outline Confirmation (BLOCKING)
↓ User must confirm
Step 2a: Layout Selection (BLOCKING)
↓ User must confirm
Step 2b: Style Selection (BLOCKING)
↓ User must confirm
Step 2c: Illustrations (BLOCKING)
↓ User must confirm
Step 3: Output Format (BLOCKING)
↓ User must confirm
Generation Phase (automatic)
CRITICAL RULE: Each step requires explicit user confirmation before proceeding. Do NOT batch confirmations. Do NOT proceed to next step until current step is confirmed.
When executing this skill, follow this EXACT sequence:
| Phase | Step | Action | User Confirmation Required |
|---|---|---|---|
| 1 | Content Acquisition | Get article URL/file/text | ❌ No |
| 2 | Content Analysis | Extract info, classify type | ❌ No |
| 2.5 | Step 1 | Present outline table | ✅ MUST CONFIRM |
| 3a | Step 2a | Present layout options | ✅ MUST CONFIRM |
| 3b | Step 2b | Present style options | ✅ MUST CONFIRM |
| 3c | Step 2c | Present illustration options | ✅ MUST CONFIRM |
| 4 | Step 3 | Present output format options | ✅ MUST CONFIRM |
| 5 | Generation | Create HTML | ❌ Automatic |
| 6 | Delivery | Present results | ❌ Automatic |
| 7 | PNG Export | If selected in Step 3 | ❌ Automatic |
FORBIDDEN ACTIONS:
Determine the content source:
If content is ambiguous or too short, ask for clarification.
Extract from the article:
Classify the best infographic type:
| Content Signal | Infographic Type |
|---|---|
| Dates, milestones, chronological events | Timeline |
| Numbers, percentages, survey data | Statistics Dashboard |
| A vs B, pros/cons, before/after | Comparison |
| Step-by-step, how-to, tutorial | Process Flow |
| Multiple independent tips/facts | Listicle / Card Grid |
| Mixed content types | Magazine / Editorial |
⚠️ CRITICAL: Must get explicit user confirmation before proceeding to Phase 3.
After content analysis, present the user with a structured outline in table form:
| Block | Content | Notes |
|---|---|---|
| Header | Title + subtitle | Top section |
| Hero Stats (3) | [stat1] / [stat2] / [stat3] | Key data highlights |
| ... | ... | ... |
DO NOT proceed until user explicitly confirms.
Using AskUserQuestion:
Hard rule: If user chooses adjustments, update the outline and return to this same confirmation step. Do NOT proceed to Phase 3 until "✅ Outline confirmed" is selected.
⚠️ CRITICAL: Must get explicit user confirmation for BOTH layout AND style before proceeding to Phase 4.
This phase requires TWO separate confirmations:
Using AskUserQuestion:
STOP HERE. Wait for user selection. Do NOT show style options yet.
ONLY after layout is confirmed, present style options:
Using AskUserQuestion:
Header: "Step 2b/3: Visual Style Selection"
Question: "What visual style for the [confirmed layout] infographic?"
Options (show 4-5 most relevant):
Standard Styles:
Premium Styles:
STOP HERE. Wait for user selection.
Using AskUserQuestion:
ONLY after all 2a→2b→2c are confirmed, proceed to Phase 4.
For detailed color palettes and font pairings per style, see references/style-presets.md.
⚠️ CRITICAL: Must get explicit user confirmation for output format BEFORE generating anything.
Using AskUserQuestion:
ONLY after output format is confirmed, proceed to Phase 5 (Generation).
Single self-contained HTML file:
<!DOCTYPE html>
<html lang="[content language]">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>[Infographic Title]</title>
<link rel="stylesheet" href="[Google Fonts / Fontshare URL]">
<style>
:root {
--bg-primary: ...; --bg-secondary: ...;
--text-primary: ...; --text-secondary: ...;
--accent-1: ...; --accent-2: ...;
--font-display: ...; --font-body: ...;
}
/* Layout, components, animations */
@media print { /* linearize, remove animations */ }
@media (prefers-reduced-motion: reduce) { /* disable animations */ }
</style>
</head>
<body>
<article class="infographic">
<header class="infographic-header">...</header>
<main class="infographic-body">...</main>
<footer class="infographic-footer">...</footer>
</article>
<script>/* Intersection Observer animations, counter effects */</script>
</body>
</html>
Typography:
clamp()Color:
Layout:
2-3rem between sections, NOT 5rem+. Infographics should feel dense and information-rich, not stretched out. Header padding: 2-2.5rem. Section padding: 2-3rem. Grid gaps: 2-2.5rem.Data Visualization:
Animations:
.visible classprefers-reduced-motion media query requiredPrint:
@media print rules: linearize layout, remove animations, ensure readabilityTimeline:
Statistics Dashboard:
Comparison:
Process Flow:
Listicle / Card Grid:
Magazine / Editorial:
All 3 confirmation steps completed. Generating final output...
Write the HTML file and present a summary:
✅ Infographic generated!
📄 File: [filename].html
📐 Layout: [confirmed layout]
🎨 Style: [confirmed style]
🖼️ Illustrations: [confirmed option]
📦 Output: [confirmed format]
📊 Sections: [count]
Open in browser to view. Ctrl+P / Cmd+P to save as PDF.
Generation is complete. No further confirmations needed.
Short articles (< 200 words): Compact single-section, 3-5 key points as cards.
Long articles (> 3000 words): Summarize to 6-10 key sections max. Prioritize data and takeaways.
No statistics: Focus on quotes, process flows, or listicle. Use icons instead of charts.
Technical/code-heavy: Code snippet sections, architecture diagrams with CSS shapes, conceptual flow.
Non-English content: Set lang attribute correctly on <html>. Use appropriate fonts for CJK, RTL, etc.
After generating the HTML, if PNG was selected in Step 3, proceed with export:
If a browser CLI tool is available:
.reveal elements to visible state (skip scroll animations)// JS to inject before screenshot:
document.querySelectorAll('.reveal').forEach(el => {
el.classList.add('visible');
el.style.opacity = '1';
el.style.transform = 'none';
});
document.querySelectorAll('.ba-fill, .bar-fill').forEach(bar => {
const w = bar.dataset.width;
if (w) bar.style.width = w + '%';
});
document.querySelectorAll('[data-counter]').forEach(el => {
const target = el.dataset.counter;
const suffix = el.dataset.suffix || '';
el.textContent = parseInt(target).toLocaleString() + suffix;
});
Run the bundled script:
python3 scripts/html_to_png.py infographic.html output.png --width 1200 --scale 2
The script uses headless Chromium via Playwright. It auto-installs dependencies if needed.
Arguments:
--width : viewport width in px (default 1200)--scale : HiDPI scale factor (default 2, produces 2400px wide image)Ask the user after HTML delivery:
When deploying to environments without interactive question-answer support (e.g., OpenClaw, API-only setups), the skill operates in parameterized mode where ALL options must be specified upfront.
⚠️ CRITICAL: In parameterized mode, you MUST provide ALL confirmations in a single prompt because the system cannot ask follow-up questions.
Users must specify ALL 3 confirmation steps in one prompt:
Generate an infographic from [article source].
STEP 1 - OUTLINE:
[Provide your preferred outline structure, or "use auto-generated outline"]
STEP 2 - STYLE:
Layout: [timeline|statistics|comparison|process|listicle|magazine]
Style: [bold-vibrant|clean-minimal|dark-techy|warm-editorial|scifi-hud|premium-magazine|glassmorphism]
Illustrations: [none|icons|characters]
STEP 3 - OUTPUT:
Format: [html|png|both]
Example complete prompt:
Generate an infographic from https://example.com/article.
STEP 1: Use auto-generated outline
STEP 2:
Layout: timeline
Style: dark-techy
Illustrations: icons
STEP 3:
Format: both
Style options:
bold-vibrant -- High contrast, saturated colorsclean-minimal -- Whitespace, subtle colors, serif typographydark-techy -- Dark background, neon accentswarm-editorial -- Magazine-style, warm tonesscifi-hud -- Cyberpunk terminal, particle network, neon glow (premium)premium-magazine -- Luxury editorial, massive serif, cream/charcoal/vermillion (premium)glassmorphism -- Frosted glass, aurora blobs, Apple-inspired depth (premium)Layout options:
timeline -- Chronological eventsstatistics -- Data dashboardcomparison -- Side-by-sideprocess -- Step-by-step flowlisticle -- Card gridmagazine -- Mixed editorial (default for complex articles)auto -- Let the skill decide based on content analysisOutline adjustments (natural language):
Export options:
html -- HTML only (default)png -- HTML + PNG exportboth -- Explicitly output bothIf no style/layout is specified and AskUserQuestion is not available, use these defaults:
auto (detect from content)dark-techy for technical content, warm-editorial for narrative content, bold-vibrant for data-heavy contenthtml onlyWhen deployed behind the GFW, replace Google Fonts CDN:
<!-- Instead of: -->
<link href="https://fonts.googleapis.com/css2?family=..." rel="stylesheet">
<!-- Use mirror: -->
<link href="https://fonts.loli.net/css2?family=..." rel="stylesheet">
<!-- Or use: -->
<link href="https://fonts.font.im/css2?family=..." rel="stylesheet">
Alternatively, for CJK-heavy content, use system fonts as fallback:
--font-heading: 'Noto Serif SC', 'STSong', 'SimSun', serif;
--font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;