baoyu-article-illustrator
Article illustrations: type × style × palette consistency.
- License 许可
- MIT
- 最近更新
- 2026-08-31
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- baoyu-article-illustrator
- author
- 宝玉 (JimLiu)
- license
- MIT
- version
- 1.57.0
- metadata
- { "hermes": { "tags": [ "article-illustration", "creative", "image-generation" ], "category": "creative", "homepage": "https://github.com/JimLiu/baoyu-skills#baoyu-article-illustrator" } }
- platforms
- [ "linux", "macos", "windows" ]
- description
- Article illustrations: type × style × palette consistency.
02 资源文件 34
- 参考文档PORT_NOTES.md3.3 KB
- 参考文档prompts/system.md1.0 KB
- 参考文档references/palettes/macaron.md1.3 KB
- 参考文档references/palettes/mono-ink.md1.7 KB
- 参考文档references/palettes/neon.md1.0 KB
- 参考文档references/palettes/warm.md1.0 KB
- 参考文档references/prompt-construction.md14.6 KB
- 参考文档references/style-presets.md4.7 KB
- 参考文档references/styles.md9.2 KB
- 参考文档references/styles/blueprint.md1.8 KB
- 参考文档references/styles/chalkboard.md2.2 KB
- 参考文档references/styles/editorial.md1.7 KB
- 参考文档references/styles/elegant.md1.7 KB
- 参考文档references/styles/fantasy-animation.md1.9 KB
- 参考文档references/styles/flat-doodle.md1.8 KB
- 参考文档references/styles/flat.md1.6 KB
- 参考文档references/styles/ink-notes.md4.2 KB
- 参考文档references/styles/intuition-machine.md1.8 KB
- 参考文档references/styles/minimal.md1.6 KB
- 参考文档references/styles/nature.md1.7 KB
- 参考文档references/styles/notion.md1.6 KB
- 参考文档references/styles/pixel-art.md1.9 KB
- 参考文档references/styles/playful.md1.7 KB
- 参考文档references/styles/retro.md1.6 KB
- 参考文档references/styles/scientific.md1.7 KB
- 参考文档references/styles/screen-print.md2.6 KB
- 参考文档references/styles/sketch-notes.md1.8 KB
- 参考文档references/styles/sketch.md1.7 KB
- 参考文档references/styles/vector-illustration.md1.9 KB
- 参考文档references/styles/vintage.md1.8 KB
- 参考文档references/styles/warm.md1.7 KB
- 参考文档references/styles/watercolor.md1.8 KB
- 参考文档references/usage.md1.8 KB
- 参考文档references/workflow.md13.5 KB
03 SKILL.md 正文
Article Illustrator
Adapted from baoyu-article-illustrator for Hermes Agent's tool ecosystem.
Analyze articles, identify illustration positions, generate images with Type × Style × Palette consistency.
When to Use
Trigger this skill when the user asks to illustrate an article, add images to an article, generate illustrations for content, or uses phrases like "为文章配图", "illustrate article", or "add images". The user provides an article (file path or pasted content) and optionally specifies type, style, palette, or density.
Three Dimensions
| Dimension | Controls | Examples |
|---|---|---|
| Type | Information structure | infographic, scene, flowchart, comparison, framework, timeline |
| Style | Rendering approach | notion, warm, minimal, blueprint, watercolor, elegant |
| Palette | Color scheme (optional) | macaron, warm, neon — overrides style's default colors |
Combine freely: type=infographic, style=vector-illustration, palette=macaron.
Or use presets: edu-visual → type + style + palette in one shot. See style-presets.md.
Types
| Type | Best For |
|---|---|
infographic |
Data, metrics, technical |
scene |
Narratives, emotional |
flowchart |
Processes, workflows |
comparison |
Side-by-side, options |
framework |
Models, architecture |
timeline |
History, evolution |
Styles
See references/styles.md for Core Styles, the full gallery, and Type × Style compatibility.
Output Structure
{output-dir}/
├── source-{slug}.{ext} # Only for pasted content
├── outline.md
├── prompts/
│ └── NN-{type}-{slug}.md
└── NN-{type}-{slug}.png
Default output directory:
| Input | Output Directory | Markdown Insert Path |
|---|---|---|
| Article file path | {article-dir}/imgs/ |
imgs/NN-{type}-{slug}.png |
| Pasted content | illustrations/{topic-slug}/ (cwd) |
illustrations/{topic-slug}/NN-{type}-{slug}.png |
If the user asks for a different layout (e.g., images alongside the article, or a illustrations/ subdirectory), honor that.
Slug: 2-4 words, kebab-case. Conflict: append -YYYYMMDD-HHMMSS.
Core Principles
- Visualize concepts, not metaphors — if the article uses a metaphor (e.g., "电锯切西瓜"), illustrate the underlying concept, not the literal image.
- Labels use article data — actual numbers, terms, and quotes from the article, not generic placeholders.
- Prompt files are reproducibility records — every illustration must have a saved prompt file under
prompts/before any image is generated. - Strip secrets — scan source content for API keys, tokens, or credentials before writing anything to disk.
Workflow
- [ ] Step 1: Detect reference images (if provided)
- [ ] Step 2: Analyze content
- [ ] Step 3: Confirm settings (clarify tool, one question at a time)
- [ ] Step 4: Generate outline
- [ ] Step 5: Generate prompts
- [ ] Step 6: Generate images (image_generate)
- [ ] Step 7: Finalize
Step 1: Detect Reference Images
If the user supplies reference images (paths pasted inline, attachments, or a URL):
- For each reference, call
vision_analyzewith the path/URL and a question asking for style, palette, composition, and subject. Record the returned description in{output-dir}/references/NN-ref-{slug}.mdviawrite_file. - Do not try to copy the binary via
write_file/read_file— those are text-only. If you want a local copy for the record, useterminal(cp "$src" "{output-dir}/references/NN-ref-{slug}.{ext}"). The skill itself never needs to read the binary; it works off the vision description. - Since
image_generatedoesn't take image inputs, the vision description is what gets embedded in prompts during Step 5.
Full procedures: references/workflow.md.
Step 2: Analyze
| Analysis | Output |
|---|---|
| Content type | Technical / Tutorial / Methodology / Narrative |
| Purpose | information / visualization / imagination |
| Core arguments | 2-5 main points |
| Positions | Where illustrations add value |
Read source (file path → read_file, or pasted text) and write the analysis to {output-dir}/analysis.md using write_file.
Full procedures: references/workflow.md.
Step 3: Confirm Settings
Use the clarify tool. Since clarify handles one question at a time, ask the most important question first. Skip any question whose answer is already present in the user's request.
| Order | Question | Options |
|---|---|---|
| Q1 | Preset or Type | [Recommended preset], [alt preset], or manual: infographic, scene, flowchart, comparison, framework, timeline, mixed |
| Q2 | Density | minimal (1-2), balanced (3-5), per-section (Recommended), rich (6+) |
| Q3 | Style (skip if preset chosen in Q1) | [Recommended], minimal-flat, sci-fi, hand-drawn, editorial, scene, poster |
| Q4 | Palette (optional) | Default (style colors), macaron, warm, neon |
| Q5 | Language (only if article language is ambiguous) | article language / user language |
Don't ask more than 2-3 clarify questions in a row. If the user already specified these in their request, skip entirely.
Full procedures: references/workflow.md.
Step 4: Generate Outline → outline.md
Save {output-dir}/outline.md using write_file with frontmatter (type, density, style, palette, image_count) and one entry per illustration:
## Illustration 1
**Position**: [section/paragraph]
**Purpose**: [why]
**Visual Content**: [what to show]
**Filename**: 01-infographic-concept-name.png
Full template: references/workflow.md.
Step 5: Generate Prompts
BLOCKING: Every illustration must have a saved prompt file before any image is generated — the prompt file is the reproducibility record.
For each illustration:
- Create a prompt file per references/prompt-construction.md.
- Save to
{output-dir}/prompts/NN-{type}-{slug}.mdusingwrite_filewith YAML frontmatter. - Prompts MUST use type-specific templates with structured sections (ZONES / LABELS / COLORS / STYLE / ASPECT).
- LABELS MUST include article-specific data: actual numbers, terms, metrics, quotes.
- Process references (
direct/style/palette) per prompt frontmatter — fordirectusage, embed a textual description of the reference in the prompt (sinceimage_generatedoesn't take reference-image inputs).
Step 6: Generate Images
For each prompt file:
- Call
image_generate(prompt=..., aspect_ratio=...).image_generatereturns a JSON result containing an image URL; it does NOT write to disk and does NOT accept an output path. - Map the prompt's
ASPECTtoimage_generate's enum:16:9→landscape,9:16→portrait,1:1→square. Custom ratios → nearest named aspect. - Download the returned URL to
{output-dir}/NN-{type}-{slug}.pngviaterminal(e.g.curl -sSL -o "{output-dir}/NN-{type}-{slug}.png" "{url}"). - On generation failure, auto-retry once.
Note: the underlying image-generation backend is user-configured (default: FAL FLUX 2 Klein 9B) and is NOT agent-selectable via image_generate. Do not write model names into prompts expecting them to route.
Step 7: Finalize
Insert  after the corresponding paragraph. Alt text: concise description in the article's language.
Report:
Article Illustration Complete!
Article: [path] | Type: [type] | Density: [level] | Style: [style] | Palette: [palette or default]
Images: X/N generated
Modification
| Action | Steps |
|---|---|
| Edit | Update prompt → Regenerate → Update reference |
| Add | Position → Prompt → Generate → Update outline → Insert |
| Delete | Delete files → Remove reference → Update outline |
References
| File | Content |
|---|---|
| references/workflow.md | Detailed procedures |
| references/usage.md | Invocation examples |
| references/styles.md | Style gallery + Palette gallery |
| references/style-presets.md | Preset shortcuts (type + style + palette) |
| references/prompt-construction.md | Prompt templates |
Pitfalls
- Data integrity is paramount — never summarize, paraphrase, or alter source statistics. "73% increase" stays "73% increase".
- Strip secrets — scan source content for API keys, tokens, or credentials before including in any output file.
- Don't illustrate metaphors literally — visualize the underlying concept.
- Prompt files are mandatory — no image generation without a saved prompt file. The file is what lets you regenerate or switch backends later.
image_generateaspect ratios — the tool supportslandscape,portrait, andsquare. Custom ratios map to the nearest option.image_generatereturns a URL, not a local file — always download viaterminal(curl) before inserting local image paths into the article.- No backend selection from the agent —
image_generateuses whatever model the user configured (default: FAL FLUX 2 Klein 9B). Don't write"use <model> to generate this"into prompts expecting it to route.
04 同仓库更多 Skills
skill-installer
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.
openai-docs
Use for Codex models/pricing, scheduled tasks, skills, settings, setup, troubleshooting, customization, automations, and self-knowledge—including 'you,' 'your,' 'this app,' or 'this coding agent' when they refer to Codex—and for OpenAI APIs/products and ChatGPT Work. Also use for model choice/migration, prompting, SDKs, Responses, Realtime, agents, evals, and Chat/Work/Codex comparisons. Do not use for generic app/software tasks that merely mention Codex.
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.
skill-creator-cc
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
prd-writing-guide
Write complete, unambiguous PRDs that development teams can implement without guesswork. Includes requirement discovery framework, structured documentation methodology, completeness checklists, and common pitfall avoidance. Use when: writing new PRDs, reviewing PRD drafts, validating requirement completeness, preparing for engineering handoff. Triggers: 'write PRD', '写PRD', '产品需求文档', '需求文档', '需求规格', '需求评审', '完善需求', 'create requirements doc', 'product requirements', 'feature spec', 'requirements document'. Anti-triggers: 'technical design doc', 'architecture design', 'implementation plan', 'API design', '架构设计', '技术方案', '实现方案', '接口设计'.