Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Generate professional infographics with 21 layout types and 20 visual styles from content or markdown.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: baoyu-infographic3description: Generate professional infographics with 21 layout types and 22 visual styles. Analyzes content, recommends layout×style combinations, and generates publication-ready infographics. Use when user asks to create "infographic", "信息图", "visual summary", "可视化", or "高密度信息大图".4version: 1.58.05metadata:6openclaw:7homepage: https://github.com/JimLiu/baoyu-skills#baoyu-infographic8---910# Infographic Generator1112Two dimensions: **layout** (information structure) × **style** (visual aesthetics). Freely combine any layout with any style.1314## User Input Tools1516When this skill prompts the user, follow this tool-selection rule (priority order):17181. **Prefer built-in user-input tools** exposed by the current agent runtime — e.g., `AskUserQuestion`, `request_user_input`, `clarify`, `ask_user`, or any equivalent.192. **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.203. **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.2122Concrete `AskUserQuestion` references below are examples — substitute the local equivalent in other runtimes.2324## Image Generation Tools2526When this skill needs to render an image, resolve the backend in this order:27281. **Current-request override** — if the user names a specific backend in the current message, use it.292. **Saved preference** — if `EXTEND.md` sets `preferred_image_backend` to a backend available right now, use it.303. **Auto-select** (when the preference is `auto`, unset, or the pinned backend isn't available):31- If the current runtime exposes a native image tool (e.g., Codex `imagegen`, Hermes `image_generate`), use it. Runtime-native tools are preferred by default — agents that know their own tool inventory should surface the native one here.32- Otherwise, if exactly one non-native backend is installed (e.g., `baoyu-imagine`), use it.33- Otherwise (multiple non-native backends with no runtime-native tool), ask the user once — batch with any other initial questions.344. **If none are available**, tell the user and ask how to proceed.3536Setting `preferred_image_backend: ask` forces the step-3 prompt every run regardless of available backends. Users change the pinned backend via the `## Changing Preferences` section below.3738**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.3940Concrete tool names (`imagegen`, `image_generate`, `baoyu-imagine`) above are examples — substitute the local equivalents under the same rule.4142## Reference Images4344Users may supply reference images to guide style, palette, composition, or subject.4546**Intake**: Accept via `--ref <files...>` or when the user provides file paths / pastes images in conversation.47- File path(s) → copy to `refs/NN-ref-{slug}.{ext}` alongside the output48- 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 fallback49- No reference → skip this section5051**Usage modes** (per reference):5253| Usage | Effect |54|-------|--------|55| `direct` | Pass the file to the backend as a reference image |56| `style` | Extract style traits (line treatment, texture, mood) and append to the prompt body |57| `palette` | Extract hex colors from the image and append to the prompt body |5859**Record in `prompts/infographic.md` frontmatter** when refs exist:6061```yaml62references:63- ref_id: 0164filename: 01-ref-brand.png65usage: direct66```6768**At generation time**:69- Verify each referenced file exists on disk70- If `usage: direct` AND the chosen backend accepts reference images (e.g., `baoyu-imagine` via `--ref`) → pass the file via the backend's ref parameter71- Otherwise → embed extracted `style`/`palette` traits in the prompt text7273## Confirmation Policy7475Default behavior: **confirm before generation**.7677- Treat explicit skill invocation, a file path, a matched keyword shortcut, `EXTEND.md` defaults, and the documented default combination as **recommendation inputs only**. None of them authorizes skipping confirmation.78- Do **not** start Step 5 or Step 6 until the user confirms the combination/aspect/language/backend choices.79- Skip confirmation only when the current request explicitly says to do so, for example: `--no-confirm`, "直接生成", "不用确认", "跳过确认", "按默认出图", or equivalent wording.80- If confirmation is skipped explicitly, state the assumed combination/aspect/language/backend in the next user-facing update before generating.8182## Options8384| Option | Values |85|--------|--------|86| `--layout` | 21 options (see Layout Gallery), default: bento-grid |87| `--style` | 22 options (see Style Gallery), default: craft-handmade |88| `--aspect` | Named: landscape (16:9), portrait (9:16), square (1:1). Custom: any W:H ratio (e.g., 3:4, 4:3, 2.35:1) |89| `--lang` | en, zh, ja, etc. |90| `--no-confirm` | Skip Step 4 only when the user explicitly requests direct generation without confirmation |91| `--ref <files...>` | Reference images (file paths) for style / palette / composition / subject guidance |9293## Layout Gallery (21)9495| Layout | Best For |96|--------|----------|97| `linear-progression` | Timelines, processes, tutorials |98| `binary-comparison` | A vs B, before-after, pros-cons |99| `comparison-matrix` | Multi-factor comparisons |100| `hierarchical-layers` | Pyramids, priority levels |101| `tree-branching` | Categories, taxonomies |102| `hub-spoke` | Central concept with related items |103| `structural-breakdown` | Exploded views, cross-sections |104| `bento-grid` | Multiple topics, overview (default) |105| `iceberg` | Surface vs hidden aspects |106| `bridge` | Problem-solution |107| `funnel` | Conversion, filtering |108| `isometric-map` | Spatial relationships |109| `dashboard` | Metrics, KPIs |110| `periodic-table` | Categorized collections |111| `comic-strip` | Narratives, sequences |112| `story-mountain` | Plot structure, tension arcs |113| `jigsaw` | Interconnected parts |114| `venn-diagram` | Overlapping concepts |115| `winding-roadmap` | Journey, milestones |116| `circular-flow` | Cycles, recurring processes |117| `dense-modules` | High-density modules, data-rich guides |118119Full definitions live at `references/layouts/<layout>.md`.120121## Style Gallery (22)122123| Style | Description |124|-------|-------------|125| `craft-handmade` | Hand-drawn, paper craft (default) |126| `claymation` | 3D clay figures, stop-motion |127| `kawaii` | Japanese cute, pastels |128| `storybook-watercolor` | Soft painted, whimsical |129| `chalkboard` | Chalk on black board |130| `cyberpunk-neon` | Neon glow, futuristic |131| `bold-graphic` | Comic style, halftone |132| `aged-academia` | Vintage science, sepia |133| `corporate-memphis` | Flat vector, vibrant |134| `technical-schematic` | Blueprint, engineering |135| `origami` | Folded paper, geometric |136| `pixel-art` | Retro 8-bit |137| `ui-wireframe` | Grayscale interface mockup |138| `subway-map` | Transit diagram |139| `ikea-manual` | Minimal line art |140| `knolling` | Organized flat-lay |141| `lego-brick` | Toy brick construction |142| `pop-laboratory` | Blueprint grid, coordinate markers, lab precision |143| `morandi-journal` | Hand-drawn doodle, warm Morandi tones |144| `retro-pop-grid` | 1970s retro pop art, Swiss grid, thick outlines |145| `hand-drawn-edu` | Macaron pastels, hand-drawn wobble, stick figures |146| `retro-popup-pop` | Retro popup collage, vintage UI, thick outlines, flat pop colors |147148Full definitions live at `references/styles/<style>.md`.149150## Recommended Combinations151152| Content Type | Layout + Style |153|--------------|----------------|154| Timeline/History | `linear-progression` + `craft-handmade` |155| Step-by-step | `linear-progression` + `ikea-manual` |156| A vs B | `binary-comparison` + `corporate-memphis` |157| Hierarchy | `hierarchical-layers` + `craft-handmade` |158| Overlap | `venn-diagram` + `craft-handmade` |159| Conversion | `funnel` + `corporate-memphis` |160| Cycles | `circular-flow` + `craft-handmade` |161| Technical | `structural-breakdown` + `technical-schematic` |162| Metrics | `dashboard` + `corporate-memphis` |163| Educational | `bento-grid` + `chalkboard` |164| Journey | `winding-roadmap` + `storybook-watercolor` |165| Categories | `periodic-table` + `bold-graphic` |166| Product Guide | `dense-modules` + `morandi-journal` |167| Technical Guide | `dense-modules` + `pop-laboratory` |168| Trendy Guide | `dense-modules` + `retro-pop-grid` |169| Retro Pop Guide | `dense-modules` + `retro-popup-pop` |170| Educational Diagram | `hub-spoke` + `hand-drawn-edu` |171| Process Tutorial | `linear-progression` + `hand-drawn-edu` |172173Default combination: `bento-grid` + `craft-handmade` (fallback recommendation only — per the [Confirmation Policy](#confirmation-policy), defaults never bypass Step 4).174175## Keyword Shortcuts176177When the user's input contains these keywords, use the mapped layout as the leading Step 3 recommendation and promote the listed styles to the top of the Step 3 list. Skip content-based layout inference for matched keywords. Append any `Prompt Notes` to the Step 5 prompt.178179| User Keyword | Layout | Recommended Styles | Default Aspect | Prompt Notes |180|--------------|--------|--------------------|----------------|--------------|181| 高密度信息大图 / high-density-info | `dense-modules` | `morandi-journal`, `pop-laboratory`, `retro-pop-grid`, `retro-popup-pop` | portrait | — |182| 信息图 / infographic | `bento-grid` | `craft-handmade` | landscape | Minimalist: clean canvas, ample whitespace, no complex background textures. Simple cartoon elements and icons only. |183184## Output Structure185186```187infographic/{topic-slug}/188├── source-{slug}.{ext}189├── analysis.md190├── structured-content.md191├── prompts/infographic.md192└── infographic.png193```194195Slug: 2-4 words kebab-case from topic. Conflict: append `-YYYYMMDD-HHMMSS`.196197## Core Principles198199- Preserve source data faithfully—no summarization or rephrasing (but **strip any credentials, API keys, tokens, or secrets** before including in outputs)200- Define learning objectives before structuring content201- Structure for visual communication (headlines, labels, visual elements)202203## Workflow204205### Step 1: Setup & Analyze206207**1.1 Load Preferences (EXTEND.md)**208209Check EXTEND.md in priority order — the first one found wins:210211| Priority | Path | Scope |212|----------|------|-------|213| 1 | `.baoyu-skills/baoyu-infographic/EXTEND.md` | Project |214| 2 | `${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-infographic/EXTEND.md` | XDG |215| 3 | `$HOME/.baoyu-skills/baoyu-infographic/EXTEND.md` | User home |216217| Result | Action |218|--------|--------|219| Found | Read, parse, display a one-line summary |220| Not found | Ask the user with `AskUserQuestion` (see `references/config/first-time-setup.md`) |221222**EXTEND.md supports**: preferred layout/style, default aspect ratio, language preference, preferred image backend, custom style definitions.223224Schema: `references/config/preferences-schema.md`225226**1.2 Analyze Content → `analysis.md`**2272281. Save source content (file path or paste → `source.md`)229- **Backup rule**: If `source.md` exists, rename to `source-backup-YYYYMMDD-HHMMSS.md`2302. Analyze: topic, data type, complexity, tone, audience2313. Detect source language and user language2324. Extract design instructions from user input2335. Save analysis234- **Backup rule**: If `analysis.md` exists, rename to `analysis-backup-YYYYMMDD-HHMMSS.md`235236See `references/analysis-framework.md` for detailed format.237238### Step 2: Generate Structured Content → `structured-content.md`239240Transform content into infographic structure:2411. Title and learning objectives2422. Sections with: key concept, content (verbatim), visual element, text labels2433. Data points (all statistics/quotes copied exactly)2444. Design instructions from user245246**Rules**: Markdown only. No new information. Preserve data faithfully. Strip any credentials or secrets from output.247248See `references/structured-content-template.md` for detailed format.249250### Step 3: Recommend Combinations251252**3.1 Check Keyword Shortcuts first**: If user input matches a keyword from the **Keyword Shortcuts** table, use the associated layout as the leading recommendation and prioritize associated styles as top recommendations. Skip content-based layout inference.253254**3.2 Otherwise**, recommend 3-5 layout×style combinations based on:255- Data structure → matching layout256- Content tone → matching style257- Audience expectations258- User design instructions259260### Step 4: Confirm Options261262**Hard gate**: this step is mandatory per the [Confirmation Policy](#confirmation-policy) — Steps 5–6 cannot start until the user confirms here (or explicitly opts out with `--no-confirm` / equivalent in the current request).263264Ask the user to confirm the questions below following the [User Input Tools](#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).265266| Priority | Question | When | Options |267|----------|----------|------|---------|268| 1 | **Combination** | Always | 3+ layout×style combos with rationale |269| 2 | **Aspect** | Always | Named presets (landscape/portrait/square) or custom W:H ratio (e.g., 3:4, 4:3, 2.35:1) |270| 3 | **Language** | Only if source ≠ user language | Language for text content |271| 4 | **Image Backend** | Only if step 3 of the `## Image Generation Tools` rule needs to ask (no runtime-native tool AND multiple non-native backends, OR `preferred_image_backend: ask`) | Available backends |272273### Step 5: Generate Prompt → `prompts/infographic.md`274275**Backup rule**: If `prompts/infographic.md` exists, rename to `prompts/infographic-backup-YYYYMMDD-HHMMSS.md`276277Combine:2781. Layout definition from `references/layouts/<layout>.md`2792. Style definition from `references/styles/<style>.md`2803. Base template from `references/base-prompt.md`2814. Structured content from Step 22825. All text in confirmed language283284**Aspect ratio resolution** for `{{ASPECT_RATIO}}`:285- Named presets → ratio string: landscape→`16:9`, portrait→`9:16`, square→`1:1`286- Custom W:H ratios → use as-is (e.g., `3:4`, `4:3`, `2.35:1`)287288### Step 6: Generate Image2892901. Resolve the backend per the `## Image Generation Tools` rule at the top of this file.2912. Ensure the full final prompt is persisted at `prompts/infographic.md` (already written in Step 5) BEFORE invoking the backend — the file is the reproducibility record.2923. **Check for existing file**: Before generating, check if `infographic.png` exists293- If exists: Rename to `infographic-backup-YYYYMMDD-HHMMSS.png`2944. Call the chosen backend with the prompt file and output path2955. On failure, auto-retry once296297### Step 7: Output Summary298299Report: topic, layout, style, aspect, language, image backend, output path, files created.300301## References302303- `references/analysis-framework.md` - Analysis methodology304- `references/structured-content-template.md` - Content format305- `references/base-prompt.md` - Prompt template306- `references/layouts/<layout>.md` - 21 layout definitions307- `references/styles/<style>.md` - 21 style definitions308309## Changing Preferences310311EXTEND.md lives at the first matching path in Step 1.1. Three ways to change it:312313- **Edit directly** — open EXTEND.md and change fields. Full schema: `references/config/preferences-schema.md`.314- **Reconfigure interactively** — delete EXTEND.md (or ask "reconfigure baoyu-infographic preferences" / "重新配置"). The next run re-triggers first-time setup.315- **Common one-line edits**:316- `preferred_image_backend: auto` — default; runtime-native tool wins, falls back to the only installed backend, asks only if multiple non-native are present.317- `preferred_image_backend: codex-imagegen` — pin to Codex's built-in.318- `preferred_image_backend: baoyu-imagine` — pin to the baoyu-imagine skill.319- `preferred_image_backend: ask` — confirm backend every run.320- `preferred_layout: dense-modules`, `preferred_style: morandi-journal`, `preferred_aspect: portrait`, `language: zh` — shift the Step-3 recommendations and Step-4 defaults (per [Confirmation Policy](#confirmation-policy), these never bypass Step 4).321