SuperAPI AI Directory

book-illustrator

Design & creation

View repository

Updated 10-15 23:32

About this skill

Intelligent Illustration Skill for This Book

Analyze the chapters/appendices manuscript of "图解 Skill —— AI 提效实战指南" (Illustrated Skill: A Practical Guide to AI Efficiency) in one pass, generate all illustration prompts in batches (subagents in parallel), produce images in batches, and write them back automatically. Do not stop between images to ask questions.

How to Use

# 方式 1:指定本书章节/附录 Markdown 路径
/book-illustrator path/to/chapter/final.md

# 方式 2:指定本书书稿 URL(自动下载到本地)
/book-illustrator https://example.com/book/chapter-03.md

Must-Read Before Starting

First read references/design-system.md(in the directory where this SKILL.md is located), which contains:

  • Publishing tri-color palette (#D87757 + black + white)
  • Contrast rule(to prevent dark background + dark text, the most common failure point)
  • Anti-AI-cliché prohibited list
  • Readability self-check list (mandatory after image generation)
  • Prompt Injection Block (must be inlined in the subagent brief)

Workflow

Step 1: Obtain This Book's Content

  1. Local path: read the file directly
  2. URL: download this book's chapter/appendix Markdown content to a temporary location

Step 2: Analyze This Book's Illustration Requirements

In one pass, analyze the entire chapter/appendix manuscript paragraph by paragraph, and identify all locations that need illustrations.

The Three Functions of Illustrations:

  1. Information supplement: help understand abstract concepts (e.g., "small-step iteration" using a skateboard → bicycle → car evolution diagram)
  2. Concept concretization: transform abstract viewpoints into concrete images so readers understand at a glance
  3. Guide imagination: create atmosphere, stimulate associations, and enhance the reading experience

Content in This Book Suitable for Illustration:

  • Abstract concepts that need visualization
  • Processes/steps that need diagrams
  • Contrast relationships that need visualization
  • Core viewpoints that need reinforcement
  • Scene descriptions that need to guide imagination

Content in This Book That Does Not Need Illustration:

  • Descriptions that are already very intuitive (such as code examples, specific numbers)
  • Simple list enumerations
  • Quoted original words

Number of Illustrations(by chapter/appendix length):

  • Consider at least 1 for each major subsection, prioritizing core viewpoints and abstract concepts
  • Optionally add 1 at the beginning/end (if atmospheric reinforcement is needed)
  • Principle: better more than fewer; visual content can significantly improve the reading experience

Layout Selection: match the layout according to the content's information pattern; see the 10 layout definitions under the references/layouts/ directory:

Layout Chinese Name Applicable Scenario
binary-comparison Comparison diagram A vs B, old vs new
linear-progression Flowchart Stage evolution, operation process
hierarchical-layers Hierarchy diagram Progressive disclosure, priority
hub-spoke Radial diagram Core concept + components
structural-breakdown Structural breakdown diagram File structure, component annotation
funnel Funnel diagram Safety gates, filtering
tree-branching Tree diagram File directory, decision branches
winding-roadmap Roadmap Global overview, learning journey
iceberg Iceberg diagram Surface vs deep
cheat-sheet-card Quick reference card Chapter summary, knowledge review

The three most easily confused pairs:

  • Decision vs radial (tree vs hub-spoke): There is a decision problem of "which one to choose" or "A or B" → tree-branching; pure structural decomposition "X consists of A, B, C" → hub-spoke
  • Decision vs journey (tree vs winding-roadmap): There are branching points → tree; a single path winding forward with no forks → roadmap
  • Radial vs journey (hub-spoke vs winding-roadmap): Parallel structure → hub; sequential progression → roadmap

Step 3: Generate the batch plan table (wait for user confirmation)

Organize the analysis results into a plan table and show it to the user:

Number Insertion position Layout Illustration role One-sentence takeaway
01 Chapter name / paragraph description binary-comparison Concept concretization Use one sentence to make clear what this diagram is meant to convey
02 … … … …

Stop and wait for user confirmation: "Are these positions and layouts correct? If there are adjustments, please tell me; after confirmation I will start generating the prompts."

The user can adjust positions, layouts, and add or remove illustrations; only after confirmation does it proceed to the next step.

Step 4: Generate all prompts in parallel (subagent fan-out)

After the user confirms the batch plan,send all Agent calls simultaneously in the same message, so that the prompts for each diagram are generated in parallel.

Why use subagent fan-out

  • Parallel saves time: The total time for 10 diagrams is approximately equal to the slowest one, not a linear accumulation
  • Resists quality dilution: When the main agent writes the 5th or 6th one, the context is piled up and attention is diluted; each subagent has a fresh context and only contains the content needed for the current diagram
  • Forces information packaging: Before dispatching a subagent, the brief must be organized; this step itself is the filtering of information extraction

Subagent configuration

  • subagent_type: general-purpose
  • model: opus(Prompt writing requires strong instruction-following ability; sonnet/haiku easily invents section names or provides insufficient information)

Before dispatching, the main agent, for each diagram,

  1. extracts from the manuscript the complete original text of the 1-3 paragraphs before and after that positionthe complete original text of the 1-3 paragraphs before and after(do not summarize; the source of information extraction cannot be compressed)
  2. Determine the parameters for this diagram: position, takeaway, layout, color_hotspots (which elements use #D87757), file path
  3. Read the contents of the following files,inline the entire passageinto the brief (after the subagent receives it, it no longer reads external files):
    • references/illustration-template.md(prompt template)
    • references/layouts/{layout}.md(visual grammar for this diagram's layout)
    • references/design-system.md Section 9 Prompt Injection Block
  4. Assemble the prompt according to the "Subagent Brief template"
  5. Initiate the Agent call

After the main agent receives reports from all subagents

  1. Verify whether each file is written to disk:[章节配图目录]/prompts/NN-slug.md
  2. Spot-check 2 prompt files(pick randomly, verify with Read), check item by item:
    • Are the first two lines of the file <!-- position: --> and <!-- layout: --> HTML comments?
    • Is the section title plain text (no ##), and do the section names match the template ("1. Illustration Input" "2. Image Aspect Ratio"...)?
    • Are the main elements numbered with (1)(2)(3) , with ≥ 4 items, and does each item nest the product name/sidenote/alternatives?
    • Do all product names, decision question text, and sidenotes in the manuscript paragraphs all have corresponding entries in the prompt?
    • Is section five, the layout visual grammar, narrative specific to this image (including the concrete element names of this image), rather than a generic rule list?
    • Do the three-color restriction and the prohibited list of the Prompt Injection Block appear verbatim?
  3. If any item fails, add supplementary notes and re-dispatch a subagent at the same position to redo the work
  4. After all pass, display the file list and ask: "Can we start generating images?"Wait for user confirmation

Step Five: Batch Image Generation

After user confirmation,one by onecall the /baoyu-imagine skill to generate images,do not stop midway to ask one by one:

  1. Read prompts/system.md(style guide) and the corresponding prompts/NN-slug.md(specific prompt), merge them into a complete prompt
  2. Call /baoyu-imagine to generate the image:
    • Prompt: merged content of system.md + NN-slug.md
    • Aspect ratio: 16:9
    • Output path:[章节配图目录]/imgs/NN-slug.webp
  3. Output progress: "Generated X/N images"
  4. If it fails, automatically retry once; if the retry still fails, record the failure reason and continue to the next image
  5. If an image clearly goes wrong (obviously off at a glance), mark it and continue running through the rest; at the end, report uniformly which ones need to be redrawn

After image generation, run the readability self-check list for each image(see references/design-system.md Section 8). If any item fails, regenerate.

Step Six: Update the Manuscript

Insert the generated images into the corresponding positions in this book's manuscript:

![配图描述](imgs/01-evolution.webp)

Insertion Rules:

  • Insert the image after the corresponding paragraph
  • Leave one blank line before and after the image
  • Use concise Chinese descriptions for alt text

Step Seven: Output Summary

配图完成!

书稿:[书稿路径]
生成数量:X/N 张成功

配图位置:
- 01-failure-trap.webp → [章节名] 后
- 02-iteration.webp → [章节名] 后
...

[如有失败]
失败项:
- 03-workflow.webp:[失败原因](建议重画原因)

Subagent Brief Template

For full-batch parallelism, the main agent assembles a brief for each image according to this template. All paragraphs marked with <<<...>>> require the main agent to inline the corresponding filein full within the paragraph—after the subagent receives the brief, it should not read external files again.

你的任务:为《图解 Skill —— AI 提效实战指南》配图写一份完整的图片生成提示词文件。写完用 Write 工具落盘。

产出路径(直接写,不讨论是否建目录):
{主 agent 填入绝对路径,例如 /path/to/chapter/prompts/01-slug.md}

=== 本图参数 ===

- 位置:{章节名称} / {段落描述}
- takeaway(读者3秒应获得的顿悟,一句话):{...}
- 推荐布局:{layout}
- 配图作用:{信息补充 / 概念具象化 / 引导想象}
- color_hotspots(哪些元素用 #D87757,其余用黑白):{...}

=== 书稿相关原文(信息榨取的源头,不要压缩)===

{主 agent:把该配图前后 1-3 段完整原文原封不动贴过来}

=== 信息榨取清单(写主要元素前先做这一步)===

在填主要元素之前,先从原文段落里把以下所有内容列出来——这是本图元素的唯一来源:

1. 产品名/工具名:(所有出现的,包括推荐的和备选的,一个不漏)
2. 决策问题/引导文字:(如"你想怎么上手?""想不想装软件?"等,原文照搬)
3. 分类标签:(区域名、类别名,如"云端智能体""本地智能体""推荐路径")
4. 旁注/说明文字:(产品旁边的特点说明,如"零安装·中文·首选""技能最强·迭代最快")
5. 结论性/高潮文字:(如"出发!""效果一样!"等画面高潮元素)

以上每一类都必须在主要元素或次要元素里有对应。漏掉的 = 信息榨取不到位。

=== 配图提示词模板(照此结构填写,把占位符替换为本图内容)===

{主 agent:把 references/illustration-template.md 整段贴过来}

=== 本图布局的视觉语法参考(仅供参考,不要原封不动复制)===

{主 agent:把 references/layouts/{layout}.md 整段贴过来}

注意:第五节(五、布局视觉语法)不是复制上面的通用规则列表,而是用本图的具体元素名来描述这张图的视觉叙事——从哪里开始,中间怎么流动,高潮在哪,整体读图体验是什么。例如:"从顶部'你想怎么上手?'出发,左右分叉为云端和本地两路,最终汇聚到底部'出发!'爆炸框,整体从上到下阅读,像一张手绘的选择指南海报。"

=== 设计系统 Prompt Injection Block(必须字面出现在提示词文件里)===

{主 agent:把 references/design-system.md 第 9 节 Prompt Injection Block 代码块整段贴过来}

=== 格式要求(塌陷检查点)===

1. 文件前两行必须是 HTML 注释:
   <!-- position: 第N章 / X.Y小节名 / 段落位置 -->
   <!-- layout: 布局名 -->
2. 节标题用纯文本("一、插图输入""二、图片比例"…),不加 ## 或 **
3. 主要元素用(1)(2)(3)编号,≥ 4 条,每条嵌套产品名+旁注+备选项,不能只写笼统概括
4. 只能画本书原文里有出处的元素,不要脑补新角色、新符号、新品牌

=== 自检(写完必做)===

(a) 文件前两行是 <!-- position: --> 和 <!-- layout: --> HTML 注释吗?
(b) 节标题是纯文本(没有 ##)吗?
(c) 主要元素用(1)(2)(3)编号了吗?有 ≥ 4 条吗?每条有嵌套的产品名+旁注+备选项吗?
(d) 信息榨取清单里的所有产品名、决策文字、旁注,在提示词的元素里都有对应吗?漏一个就补上
(e) 五、布局视觉语法是针对本图的叙事描述(含本图具体元素名),不是通用规则列表?
(f) 对比规则:有文字叠在 #D87757 色块上时,底色是浅色调变体而非饱和色?
(g) Prompt Injection Block 的三色限定和禁用清单字面出现了?

返回给主 agent:文件路径 + 一句话说明提示词内容 + 自检是否全过(如有不过,列具体问题)。不要粘全文。

File Organization

[章节目录]/
├── final.md(或 draft.md)
├── prompts/
│   ├── 01-evolution.md
│   ├── 02-comparison.md
│   └── ...
└── imgs/
    ├── 01-evolution.webp
    ├── 02-comparison.webp
    └── ...

Naming Rules:

  • NN-english-slug, two-digit numbering follows the order in which the illustrations appear, and the slug uses 3-5 short English words (hyphen-separated)
  • The prompt and image have the same name, differing only in extension (.md vs .webp)
  • Iteration: to revise a prompt, edit the same file in place; do not create -v2.md

Common Failure Modes

  • Text pressed on a saturated color block → contrast rules were not injected into the color design → add the full contents of the Prompt Injection Block to the subagent brief
  • Colors outside the three-color palette appear → the section four color scheme was not injected verbatim → redo and complete it
  • The prompt missed product names/decision text from the manuscript → Information extraction was incomplete → Go back to the original passage and add every visible word one by one to the element list
  • Wrong layout chosen (used hub-spoke for a decision diagram) → Drew "choose one from many" as "parallel expansion" → Change it to tree-branching
  • The subagent proceeded to image generation without spot-checking → The collapsed prompt got mixed into image generation, wasting image generation resources → The spot check in step four is a hard process; do not skip it

Reference files

File Purpose
references/design-system.md Required reading: three-color palette, contrast rules, anti-AI clichés, readability self-check, Prompt Injection Block
prompts/system.md Image generation system prompt (automatically appended during image generation)
references/illustration-template.md Illustration prompt template (the skeleton filled in by the subagent)
references/layouts/*.md Visual grammar for 10 layouts (inlined for the subagent as needed)