Baoyu-skills baoyu-infographic
Generate professional infographics with 21 layout types and 21 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", "visual summary", "可视化", or "高密度信息大图".
git clone https://github.com/JimLiu/baoyu-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/JimLiu/baoyu-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/baoyu-infographic" ~/.claude/skills/jimliu-baoyu-skills-baoyu-infographic && rm -rf "$T"
skills/baoyu-infographic/SKILL.mdInfographic Generator
Two dimensions: layout (information structure) × style (visual aesthetics). Freely combine any layout with any style.
User Input Tools
When this skill prompts the user, follow this tool-selection rule (priority order):
- Prefer built-in user-input tools exposed by the current agent runtime — e.g.,
,AskUserQuestion
,request_user_input
,clarify
, or any equivalent.ask_user - Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
- Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.
Concrete
AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.
Image Generation Tools
When this skill needs to render an image:
- Use whatever image-generation tool or skill is available in the current runtime — e.g., Codex
, Hermesimagegen
,image_generate
, or any equivalent the user has installed.baoyu-imagine - If multiple are available, ask the user once at the start which to use (batch with any other initial questions).
- If none are available, tell the user and ask how to proceed.
Prompt file requirement (hard): write each image's full, final prompt to a standalone file under
prompts/ (naming: NN-{type}-[slug].md) BEFORE invoking any backend. The backend receives the prompt file (or its content); the file is the reproducibility record and lets you switch backends without regenerating prompts.
Concrete tool names (
imagegen, image_generate, baoyu-imagine) above are examples — substitute the local equivalents under the same rule.
Reference Images
Users may supply reference images to guide style, palette, composition, or subject.
Intake: Accept via
--ref <files...> or when the user provides file paths / pastes images in conversation.
- File path(s) → copy to
alongside the outputrefs/NN-ref-{slug}.{ext} - Pasted image with no path → ask the user for the path (per the User Input Tools rule above), or extract style traits verbally as a text fallback
- No reference → skip this section
Usage modes (per reference):
| Usage | Effect |
|---|---|
| Pass the file to the backend as a reference image |
| Extract style traits (line treatment, texture, mood) and append to the prompt body |
| Extract hex colors from the image and append to the prompt body |
Record in
frontmatter when refs exist:prompts/infographic.md
references: - ref_id: 01 filename: 01-ref-brand.png usage: direct
At generation time:
- Verify each referenced file exists on disk
- If
AND the chosen backend accepts reference images (e.g.,usage: direct
viabaoyu-imagine
) → pass the file via the backend's ref parameter--ref - Otherwise → embed extracted
/style
traits in the prompt textpalette
Options
| Option | Values |
|---|---|
| 21 options (see Layout Gallery), default: bento-grid |
| 21 options (see Style Gallery), default: craft-handmade |
| Named: landscape (16:9), portrait (9:16), square (1:1). Custom: any W:H ratio (e.g., 3:4, 4:3, 2.35:1) |
| en, zh, ja, etc. |
| Reference images (file paths) for style / palette / composition / subject guidance |
Layout Gallery (21)
| Layout | Best For |
|---|---|
| Timelines, processes, tutorials |
| A vs B, before-after, pros-cons |
| Multi-factor comparisons |
| Pyramids, priority levels |
| Categories, taxonomies |
| Central concept with related items |
| Exploded views, cross-sections |
| Multiple topics, overview (default) |
| Surface vs hidden aspects |
| Problem-solution |
| Conversion, filtering |
| Spatial relationships |
| Metrics, KPIs |
| Categorized collections |
| Narratives, sequences |
| Plot structure, tension arcs |
| Interconnected parts |
| Overlapping concepts |
| Journey, milestones |
| Cycles, recurring processes |
| High-density modules, data-rich guides |
Full definitions live at
references/layouts/<layout>.md.
Style Gallery (21)
| Style | Description |
|---|---|
| Hand-drawn, paper craft (default) |
| 3D clay figures, stop-motion |
| Japanese cute, pastels |
| Soft painted, whimsical |
| Chalk on black board |
| Neon glow, futuristic |
| Comic style, halftone |
| Vintage science, sepia |
| Flat vector, vibrant |
| Blueprint, engineering |
| Folded paper, geometric |
| Retro 8-bit |
| Grayscale interface mockup |
| Transit diagram |
| Minimal line art |
| Organized flat-lay |
| Toy brick construction |
| Blueprint grid, coordinate markers, lab precision |
| Hand-drawn doodle, warm Morandi tones |
| 1970s retro pop art, Swiss grid, thick outlines |
| Macaron pastels, hand-drawn wobble, stick figures |
Full definitions live at
references/styles/<style>.md.
Recommended Combinations
| Content Type | Layout + Style |
|---|---|
| Timeline/History | + |
| Step-by-step | + |
| A vs B | + |
| Hierarchy | + |
| Overlap | + |
| Conversion | + |
| Cycles | + |
| Technical | + |
| Metrics | + |
| Educational | + |
| Journey | + |
| Categories | + |
| Product Guide | + |
| Technical Guide | + |
| Trendy Guide | + |
| Educational Diagram | + |
| Process Tutorial | + |
Default combination:
bento-grid + craft-handmade.
Keyword Shortcuts
When the user's input contains these keywords, auto-select the layout and promote the listed styles to the top of Step 3 recommendations. Skip content-based layout inference for matched keywords. Append any
Prompt Notes to the Step 5 prompt.
| User Keyword | Layout | Recommended Styles | Default Aspect | Prompt Notes |
|---|---|---|---|---|
| 高密度信息大图 / high-density-info | | , , | portrait | — |
| 信息图 / infographic | | | landscape | Minimalist: clean canvas, ample whitespace, no complex background textures. Simple cartoon elements and icons only. |
Output Structure
infographic/{topic-slug}/ ├── source-{slug}.{ext} ├── analysis.md ├── structured-content.md ├── prompts/infographic.md └── infographic.png
Slug: 2-4 words kebab-case from topic. Conflict: append
-YYYYMMDD-HHMMSS.
Core Principles
- Preserve source data faithfully—no summarization or rephrasing (but strip any credentials, API keys, tokens, or secrets before including in outputs)
- Define learning objectives before structuring content
- Structure for visual communication (headlines, labels, visual elements)
Workflow
Step 1: Setup & Analyze
1.1 Load Preferences (EXTEND.md)
Check EXTEND.md in priority order — the first one found wins:
| Priority | Path | Scope |
|---|---|---|
| 1 | | Project |
| 2 | | XDG |
| 3 | | User home |
| Result | Action |
|---|---|
| Found | Read, parse, display a one-line summary |
| Not found | Ask the user with (see ) |
EXTEND.md supports: preferred layout/style, default aspect ratio, custom style definitions, language preference.
Schema:
references/config/preferences-schema.md
1.2 Analyze Content → analysis.md
- Save source content (file path or paste →
)source.md- Backup rule: If
exists, rename tosource.mdsource-backup-YYYYMMDD-HHMMSS.md
- Backup rule: If
- Analyze: topic, data type, complexity, tone, audience
- Detect source language and user language
- Extract design instructions from user input
- Save analysis
- Backup rule: If
exists, rename toanalysis.mdanalysis-backup-YYYYMMDD-HHMMSS.md
- Backup rule: If
See
references/analysis-framework.md for detailed format.
Step 2: Generate Structured Content → structured-content.md
structured-content.mdTransform content into infographic structure:
- Title and learning objectives
- Sections with: key concept, content (verbatim), visual element, text labels
- Data points (all statistics/quotes copied exactly)
- Design instructions from user
Rules: Markdown only. No new information. Preserve data faithfully. Strip any credentials or secrets from output.
See
references/structured-content-template.md for detailed format.
Step 3: Recommend Combinations
3.1 Check Keyword Shortcuts first: If user input matches a keyword from the Keyword Shortcuts table, auto-select the associated layout and prioritize associated styles as top recommendations. Skip content-based layout inference.
3.2 Otherwise, recommend 3-5 layout×style combinations based on:
- Data structure → matching layout
- Content tone → matching style
- Audience expectations
- User design instructions
Step 4: Confirm Options
Ask the user to confirm the questions below following the User Input Tools rule at the top of this file (batch into one call if the runtime supports multiple questions; otherwise ask one at a time in priority order).
| Priority | Question | When | Options |
|---|---|---|---|
| 1 | Combination | Always | 3+ layout×style combos with rationale |
| 2 | Aspect | Always | Named presets (landscape/portrait/square) or custom W:H ratio (e.g., 3:4, 4:3, 2.35:1) |
| 3 | Language | Only if source ≠ user language | Language for text content |
Step 5: Generate Prompt → prompts/infographic.md
prompts/infographic.mdBackup rule: If
prompts/infographic.md exists, rename to prompts/infographic-backup-YYYYMMDD-HHMMSS.md
Combine:
- Layout definition from
references/layouts/<layout>.md - Style definition from
references/styles/<style>.md - Base template from
references/base-prompt.md - Structured content from Step 2
- All text in confirmed language
Aspect ratio resolution for
{{ASPECT_RATIO}}:
- Named presets → ratio string: landscape→
, portrait→16:9
, square→9:161:1 - Custom W:H ratios → use as-is (e.g.,
,3:4
,4:3
)2.35:1
Step 6: Generate Image
- Select the backend via the
rule at the top: use whatever is available; if multiple, ask the user once. Do this once per session.## Image Generation Tools - Ensure the full final prompt is persisted at
(already written in Step 5) BEFORE invoking the backend — the file is the reproducibility record.prompts/infographic.md - Check for existing file: Before generating, check if
existsinfographic.png- If exists: Rename to
infographic-backup-YYYYMMDD-HHMMSS.png
- If exists: Rename to
- Call the chosen backend with the prompt file and output path
- On failure, auto-retry once
Step 7: Output Summary
Report: topic, layout, style, aspect, language, output path, files created.
References
- Analysis methodologyreferences/analysis-framework.md
- Content formatreferences/structured-content-template.md
- Prompt templatereferences/base-prompt.md
- 21 layout definitionsreferences/layouts/<layout>.md
- 21 style definitionsreferences/styles/<style>.md
Extension Support
Custom configurations via EXTEND.md. See Step 1.1 for paths and supported options.