Install
openclaw skills install @j3ffyang/custom-infographicGenerate a professional infographic from an article, document, URL, or topic, using the baoyu layout x style system (21 layouts x 21 styles). Original author 宝玉 (JimLiu); ported & customized by j3ffyang. Use when the user asks to create an infographic, 信息图, visual summary, 可视化, or a high-density information image, or wants an article turned into a visual poster.
openclaw skills install @j3ffyang/custom-infographicAdapted from baoyu-infographic v1.56.1 (ported via Hermes Agent) for opencode. Customized by j3ffyang to comply with the opencode standard and this repo's imgs/ convention. Image generation uses OpenRouter image models through scripts/generate_image.py. Pitfall 6 gives the key requirement and the fallback.
Two dimensions: layout (information structure) × style (visual aesthetics). Freely combine any layout with any style. Never mix two styles in one image (Pitfall 4).
Trigger this skill when the user asks for an infographic, a visual summary, or an information graphic. Trigger it also on "信息图", "可视化", or "高密度信息大图". The user gives content: text, a file path, a URL, or a topic. The user can also give layout, style, aspect ratio, or language.
Note: Image generation needs OPENROUTER_API_KEY and an image-capable model. Step 6 names the default model. If the key is missing or the call fails, still produce analysis.md, structured-content.md, and prompts/infographic.md for external use. See Pitfall 6 and references/workflow-example.md.
| Option | Values |
|---|---|
| Layout | 21 options (see Layout Gallery), default: bento-grid |
| Style | 21 options (see Style Gallery), default: craft-handmade |
| Aspect | landscape (16:9), portrait (9:16), square (1:1), or a custom W:H — the resolution rule is in Step 5 |
| Language | en, zh, ja, etc. |
One name per object, used the same way everywhere below.
| Term | Means | Not |
|---|---|---|
| image | the generated picture file | sheet, render, chart, diagram |
| prompt | the assembled file under prompts/ | template (references/base-prompt.md), structured content |
| checker | scripts/check_prompt_text.py | gate, linter, pre-flight |
| Layout | Best For |
|---|---|
linear-progression | Timelines, processes, tutorials |
binary-comparison | A vs B, before-after, pros-cons |
comparison-matrix | Multi-factor comparisons |
hierarchical-layers | Pyramids, priority levels |
tree-branching | Categories, taxonomies |
hub-spoke | Central concept with related items |
structural-breakdown | Exploded views, cross-sections |
bento-grid | Multiple topics, overview (default) |
iceberg | Surface vs hidden aspects |
bridge | Problem-solution |
funnel | Conversion, filtering |
isometric-map | Spatial relationships |
dashboard | Metrics, KPIs |
periodic-table | Categorized collections |
comic-strip | Narratives, sequences |
story-mountain | Plot structure, tension arcs |
jigsaw | Interconnected parts |
venn-diagram | Overlapping concepts |
winding-roadmap | Journey, milestones |
circular-flow | Cycles, recurring processes |
dense-modules | High-density modules, data-rich guides |
Full definitions: references/layouts/<layout>.md
| Style | Description |
|---|---|
craft-handmade | Hand-drawn, paper craft (default) |
claymation | 3D clay figures, stop-motion |
kawaii | Japanese cute, pastels |
storybook-watercolor | Soft painted, whimsical |
chalkboard | Chalk on black board |
cyberpunk-neon | Neon glow, futuristic |
bold-graphic | Comic style, halftone |
aged-academia | Vintage science, sepia |
corporate-memphis | Flat vector, vibrant |
technical-schematic | Blueprint, engineering |
origami | Folded paper, geometric |
pixel-art | Retro 8-bit |
ui-wireframe | Grayscale interface mockup |
subway-map | Transit diagram |
ikea-manual | Minimal line art |
knolling | Organized flat-lay |
lego-brick | Toy brick construction |
pop-laboratory | Blueprint grid, coordinate markers, lab precision |
morandi-journal | Hand-drawn doodle, warm Morandi tones |
retro-pop-grid | 1970s retro pop art, Swiss grid, thick outlines |
hand-drawn-edu | Macaron pastels, hand-drawn wobble, stick figures |
Full definitions: references/styles/<style>.md
| Content Type | Layout + Style |
|---|---|
| Timeline/History | linear-progression + craft-handmade |
| Step-by-step | linear-progression + ikea-manual |
| A vs B | binary-comparison + corporate-memphis |
| Hierarchy | hierarchical-layers + craft-handmade |
| Overlap | venn-diagram + craft-handmade |
| Conversion | funnel + corporate-memphis |
| Cycles | circular-flow + craft-handmade |
| Technical | structural-breakdown + technical-schematic |
| Metrics | dashboard + corporate-memphis |
| Educational | bento-grid + chalkboard |
| Journey | winding-roadmap + storybook-watercolor |
| Categories | periodic-table + bold-graphic |
| Product Guide | dense-modules + morandi-journal |
| Technical Guide | dense-modules + pop-laboratory |
| Trendy Guide | dense-modules + retro-pop-grid |
| Educational Diagram | hub-spoke + hand-drawn-edu |
| Process Tutorial | linear-progression + hand-drawn-edu |
Default: bento-grid + craft-handmade
If the user input contains one of these keywords, select the associated layout. Offer the associated styles first in Step 3. Skip content-based layout inference.
If a shortcut has Prompt Notes, append them to the generated prompt (Step 5) as additional style instructions.
| User Keyword | Layout | Recommended Styles | Default Aspect | Prompt Notes |
|---|---|---|---|---|
| 高密度信息大图 / high-density-info | dense-modules | morandi-journal, pop-laboratory, retro-pop-grid | portrait | — |
| 信息图 / infographic | bento-grid | craft-handmade | landscape | Minimalist: clean canvas, ample whitespace, no complex background textures. Simple cartoon elements and icons only. |
infographic/{topic-slug}/
├── source.md
├── analysis.md
├── structured-content.md
└── prompts/infographic.md
final image → imgs/<YYMMDD>-<slug>.png
Working files live in infographic/{topic-slug}/. The final image always lands in imgs/, following this repo's YYMMDD-slug filename convention (see ai-thoughts/AGENTS.md).
{topic-slug}: 2-4 words kebab-case from the topic. If that folder already exists, append -YYYYMMDD-HHMMSS.imgs/<YYMMDD>-<slug>.png. <slug> is a 2-4 word kebab-case name. <YYMMDD> is the current date. When the source is an ai-thoughts article, use that article's YYMMDD prefix instead, so the image shares it.Load references: Read references/analysis-framework.md from this skill.
source.md using write)
source.md exists, rename to source-backup-YYYYMMDD-HHMMSS.mdanalysis.md
analysis.md exists, rename to analysis-backup-YYYYMMDD-HHMMSS.mdSee references/analysis-framework.md for detailed format.
structured-content.mdTransform content into infographic structure:
Rules: Markdown only. Do not add new information. Core Principles and Pitfalls 1–2 govern data fidelity and secret stripping.
See references/structured-content-template.md for detailed format.
3.1 Check Keyword Shortcuts first. If the user input matches a keyword in the Keyword Shortcuts table, select that layout. Offer the associated styles first. Skip content-based layout inference.
3.2 Otherwise, recommend 3-5 layout×style combinations based on:
Use the question tool to confirm options with the user. Ask all three in one call when they apply — skip Q3 when the source language already matches the user's:
Q1 — Combination: Present the 3–5 layout×style combos from Step 3 with their rationale. Ask the user to pick one.
Q2 — Aspect: Ask for aspect ratio preference (landscape/portrait/square or custom W:H).
Q3 — Language: Ask which language the text content should use.
If the user already specified all options, skip Step 4.
prompts/infographic.mdBackup rule: If prompts/infographic.md exists, rename to prompts/infographic-backup-YYYYMMDD-HHMMSS.md
Load references: Read the selected layout from references/layouts/<layout>.md and style from references/styles/<style>.md.
Combine:
references/layouts/<layout>.mdreferences/styles/<style>.mdreferences/base-prompt.mdText labels: tail. Do not add one.Markdown once vanished from a stack cell.Resolve {{ASPECT_RATIO}} here. This is the only place.
landscape → 16:9, portrait → 9:16, square → 1:1.16:9, 9:16, 1:1, 3:4, 4:3, 21:9, 1:4, 4:1, 1:8, 8:1. For any other ratio, use the nearest accepted ratio and tell the user.Save the assembled prompt to prompts/infographic.md using write.
The checker (hard stop). Before generating, run the checker on the assembled prompt:
python .opencode/skills/custom-infographic/scripts/check_prompt_text.py \
infographic/{topic-slug}/prompts/infographic.md
It fails with exit 1 in three cases. A backticked string appears more than once. A second label enumeration is present. With --strings <file>, an expected string is missing. Do not generate after a failure. Fix the prompt and run the checker again.
Run the bundled generator with the prompt from Step 5. Write the final image to imgs/ with the repo-convention filename:
python .opencode/skills/custom-infographic/scripts/generate_image.py \
--prompt infographic/{topic-slug}/prompts/infographic.md \
--output imgs/{YYMMDD}-{slug}.png \
--aspect 16:9
imgs/<YYMMDD>-<slug>.png (repo convention, see Output Structure) — never to infographic/{topic-slug}/.--aspect takes the value resolved in Step 5 — do not re-derive it here.google/gemini-3.1-flash-image. Pass --model to use another one. Pitfall 6 gives the key requirement and the fallback.--model → deliver the prompt-only outputs (Pitfall 6). A second refusal from the same model points at the model, not the prompt. On 2026-11-12 google/gemini-3.1-flash-image returned content: null twice for a prompt that google/gemini-nano-banana-2.1 produced first try. A refusal leaves the previous image in place. Check the size or mtime before you claim success.imgs/<YYMMDD>-<slug>.png already exists, rename it to imgs/<YYMMDD>-<slug>-backup-YYYYMMDD-HHMMSS.png before writing. Never overwrite silently.Report the topic, layout, style, aspect, language, output path (imgs/<YYMMDD>-<slug>.png), and the files you created.
references/analysis-framework.md — Analysis methodologyreferences/structured-content-template.md — Content formatreferences/base-prompt.md — Prompt templatereferences/layouts/<layout>.md — 21 layout definitionsreferences/styles/<style>.md — 21 style definitionsreferences/workflow-example.md — Example workflow when image generation is unavailablescripts/generate_image.py — OpenRouter image generator (Step 6)scripts/check_prompt_text.py — the checker: fails a prompt that would duplicate a string (Step 6)OPENROUTER_API_KEY, or when the model cannot output images. Verify the key first. Step 6 gives the recovery order: retry, change model, and only then deliver the prompt-only outputs. Tell the user.opencode run --model openrouter/z-ai/glm-4.6v --file). Garbled, misspelled, dropped or doubled text means the image is not deliverable — fix the prompt and re-render. For a number or a short identifier, crop that region to 300% and read it again. A full-frame look misses a single wrong digit.261022-agent-not-model image. Two renders duplicated the comparison and the loop card, until the layout prose was reduced to pure geometry.HERMES passes even when the subtitle already reads HERMES AGENT ON A DISCORD SERVER. Read the finished image for shared words, not only shared strings. Rename one side: subtitle or label, never both. Observed 2026-11-08 on the 261107-hermes-discord-private image. The first render repeated the product name. A neutral subtitle fixed it.261105-hermes-skill-costs: the amber edge vanished in the banner but was intact in the full-size file.imgs/<name>-banner-twitter.png), ask before you replace it. resize-for-banner requires that confirmation. Regenerate the derivative from the new image in the same step, and say so in the report. Otherwise the article and the social card show different pictures, and only one of them is the one you approved.generate_image.py exits 1 with no images in response. It leaves any previous file untouched, so a rerun whose stderr nobody reads looks like a successful render. Check the output's size or mtime. After two identical refusals, change --model instead of retrying a third time. On 2026-11-12 google/gemini-3.1-flash-image returned content: null twice. google/gemini-nano-banana-2.1 rendered that prompt on the first attempt.TABLES BECOME SCREENSHOTS twice, once mid-frame and once in the caption strip. Two defences, both in the layout section. First, name the zone each string lives in: "the caption exists only in the caption strip, the channel label only in the channel". Second, do not offer a decorative text slot. A title block described as "a heading, a rule, and one smaller line under the rule" will take whichever label has nowhere else to go. On 2026-11-12 the subtitle line swallowed LINKEDIN, which then vanished from its platform.imgs/ output convention.