OptionalCreativeVersion 1.57.0

Baoyu Article Illustrator: Type × Style × Palette Consistent Illustrations

Article illustrations: type × style × palette consistency.

Written by Neura Market from the official Hermes Agent documentation for Baoyu Article Illustrator. Commands, paths, and version numbers are reproduced from the source unchanged.

Read the official documentation

Neura Market Article Illustration Reference

Purpose

This tool analyzes articles, identifies positions where illustrations add value, and generates images with consistent Type, Style, and Palette dimensions. It produces a structured output directory containing analysis, outline, prompt files, and final images, then inserts image markdown references into the article after corresponding paragraphs.

When to Use

Use this tool when a user asks to illustrate an article, add images, or generate illustrations for content. Trigger phrases include "为文章配图", "illustrate article", or "add images". The user must provide an article (file path or pasted content) and may optionally specify type, style, palette, or density.

Capabilities

  • Analyze article content to determine type: infographic, scene, flowchart, comparison, framework, or timeline.
  • Generate images with consistent Type, Style, and Palette dimensions.
  • Use presets (e.g., edu-visual) that combine type, style, and palette.
  • Detect and process reference images via vision_analyze to extract style, palette, composition, and subject.
  • Write analysis, outline, prompt files, and final images to a structured output directory.
  • Insert image markdown references into the article after corresponding paragraphs.
  • Support modification: edit, add, or delete illustrations.
  • Strip secrets (API keys, tokens, credentials) from source content before writing any output.

Prerequisites

  • User provides article (file path or pasted content).
  • Optional: user provides type, style, palette, density, reference images, or preset.
  • Access to read_file, write_file, terminal, clarify, vision_analyze, and image_generate tools.
  • References: workflow.md, usage.md, styles.md, style-presets.md, prompt-construction.md (external URLs).

Parameters

Type

  • Meaning: Information structure of illustration (infographic, scene, flowchart, comparison, framework, timeline, mixed).
  • Required: Yes (or via preset).

Style

  • Meaning: Rendering approach (notion, warm, minimal, blueprint, watercolor, elegant, etc.).
  • Required: Yes (or via preset).

Palette

  • Meaning: Color scheme (macaron, warm, neon) that overrides style's default colors.
  • Required: No.

Density

  • Meaning: Number of illustrations (minimal 1-2, balanced 3-5, per-section, rich 6+).
  • Required: Yes.

Preset

  • Meaning: Shortcut combining type, style, and palette (e.g., edu-visual).
  • Required: No (alternative to specifying type/style/palette individually).

Language

  • Meaning: Language for alt text and prompts if article language is ambiguous.
  • Required: Only if article language ambiguous.

Output Directory

  • Meaning: Where to save files. Default depends on input: for a file path, it uses {article-dir}/imgs/; for pasted content, it uses illustrations/{topic-slug}/ in the current working directory.
  • Required: No (user can request different layout).

Constraints and Caveats

  • Do not illustrate metaphors literally; visualize the underlying concept.
  • Labels must use article-specific data (actual numbers, terms, metrics, quotes), not generic placeholders.
  • Prompt files are mandatory before any image generation; they serve as reproducibility records.
  • Strip secrets (API keys, tokens, credentials) from source content before writing any output.
  • image_generate does not accept image inputs; use vision description in prompts.
  • image_generate returns a URL, not a local file; always download via terminal using curl.
  • image_generate supports only landscape, portrait, and square aspect ratios; custom ratios map to the nearest named aspect.
  • Agent cannot select image-generation backend; image_generate uses the user-configured model. Do not write model names into prompts expecting routing.
  • Do not copy binary files via write_file/read_file (text-only); use terminal for binary copies.
  • Data integrity: never summarize, paraphrase, or alter source statistics. For example, a "73% increase" must stay "73% increase".
  • Output directory default: article file path uses {article-dir}/imgs/; pasted content uses illustrations/{topic-slug}/ in cwd.
  • Slug: 2-4 words, kebab-case. If conflict, append -YYYYMMDD-HHMMSS.
  • Do not ask more than 2-3 clarify questions in a row.
  • On generation failure, auto-retry once.

Failure Modes

  • Image generation fails: auto-retry once.
  • User provides ambiguous language: ask a clarify question.
  • User provides reference images but image_generate cannot use them directly: rely on vision description.
  • Secrets present in source content: must strip before writing any output.
  • Custom aspect ratio not supported: map to nearest named aspect (landscape, portrait, square).

Procedures

Step 1: Detect Reference Images

If the user supplies reference images (paths, attachments, or URLs), for each image call vision_analyze with the path or URL and a question asking for style, palette, composition, and subject. Record the returned description in {output-dir}/references/NN-ref-{slug}.md via write_file. Do not copy binary via write_file/read_file (text-only). Use terminal with cp "$src" "{output-dir}/references/NN-ref-{slug}.{ext}" for a local copy if desired. The skill works off the vision description; image_generate does not accept image inputs.

Step 2: Analyze Content

Read the source using read_file for a file path, or use pasted text directly. Write the analysis to {output-dir}/analysis.md via write_file. The analysis includes: content type (Technical/Tutorial/Methodology/Narrative), purpose (information/visualization/imagination), core arguments (2-5 main points), and positions where illustrations add value.

Step 3: Confirm Settings

Use the clarify tool, asking one question at a time. Skip questions already answered in the user request.

  • 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; options: 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 ambiguous; options: article language / user language).

Do not ask more than 2-3 clarify questions in a row.

Step 4: Generate Outline

Save {output-dir}/outline.md via write_file with frontmatter (type, density, style, palette, image_count). Include one entry per illustration with Position (section/paragraph), Purpose (why), Visual Content (what to show), and Filename (e.g., 01-infographic-concept-name.png).

The outline entry format is:

## Illustration 1
**Position**: [section/paragraph]
**Purpose**: [why]
**Visual Content**: [what to show]
**Filename**: 01-infographic-concept-name.png

Step 5: Generate Prompts

This step is blocking: every illustration must have a saved prompt file before any image generation. For each illustration, create a prompt file per prompt-construction.md. Save to {output-dir}/prompts/NN-{type}-{slug}.md via write_file with 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. For direct usage, embed a textual description of the reference in the prompt (image_generate does not accept reference-image inputs).

Step 6: Generate Images

For each prompt file, call image_generate(prompt=..., aspect_ratio=...). Map the prompt's ASPECT to the image_generate enum: 16:9 maps to landscape, 9:16 maps to portrait, 1:1 maps to square. Custom ratios map to the nearest named aspect. Download the returned URL to {output-dir}/NN-{type}-{slug}.png via terminal using curl -sSL -o "{output-dir}/NN-{type}-{slug}.png" "{url}". On generation failure, auto-retry once.

Step 7: Finalize

Insert ![description](relative-path/NN-{type}-{slug}.png) after the corresponding paragraph. Alt text should be a concise description in the article's language. Report completion with the following format:

Article Illustration Complete!
Article: [path] | Type: [type] | Density: [level] | Style: [style] | Palette: [palette or default]
Images: X/N generated

Output Directory Structure

The output directory follows this structure:

{output-dir}/
├── source-{slug}.{ext}    # Only for pasted content
├── outline.md
├── prompts/
│   └── NN-{type}-{slug}.md
└── NN-{type}-{slug}.png

For file path inputs, the default output directory is {article-dir}/imgs/, so images appear at imgs/NN-{type}-{slug}.png. For pasted content, the default is illustrations/{topic-slug}/, so images appear at illustrations/{topic-slug}/NN-{type}-{slug}.png. The illustrations/ directory is created under the current working directory.

Workflow Checklist

The overall workflow follows these steps in order:

  • 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

Examples

  • User asks to illustrate article with type=infographic, style=vector-illustration, palette=macaron.
  • User uses preset edu-visual to set type, style, and palette in one shot.
  • User provides article file path and requests images alongside article.
  • User pastes article content and requests illustrations/ subdirectory layout.
  • User provides reference images; system analyzes them via vision_analyze and embeds descriptions in prompts.

Prompt Construction Notes

When constructing prompts, the ASPECT field must be mapped correctly. The image_generate function accepts landscape (for 16:9), portrait (for 9:16), and square (for 1:1). Custom ratios are mapped to the nearest named aspect. The prompt file must include structured sections with ZONES, LABELS, COLORS, STYLE, and ASPECT. LABELS must contain article-specific data such as actual numbers, terms, metrics, and quotes. For reference processing, use direct, style, or palette in the prompt frontmatter. For direct usage, embed the textual description of the reference in the prompt since image_generate does not accept image inputs. The prompt file should not include model names expecting routing.

Data Integrity

Never summarize, paraphrase, or alter source statistics. For example, a "73% increase" must remain "73% increase" in all outputs, including labels in prompts and alt text. This applies to all numbers, terms, metrics, and quotes from the article.

Security

Strip secrets (API keys, tokens, credentials) from source content before writing any output. This includes analysis files, prompt files, outline files, and any other written content. Use write_file for text outputs only; never write binary files through it. For binary copies of reference images, use terminal with cp "$src" "{output-dir}/references/NN-ref-{slug}.{ext}".

More Creative skills