Home / All Skills / Design & Motion / baoyu-article-illustrator
Design & Motion · JimLiu/baoyu-skills

baoyu-article-illustrator

Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style × Palette three-dimension approach. Use when user asks to "illustrate article", "add images", "generate images for article", or "为文章配图".

L4 High-Privilege · Graded auth & full auditV1 Commit-PinnedExecute CommandWrite FileDual-pass Audit
Author JimLiuGitHub JimLiu/baoyu-skills ↗Stars 25926License MIT(仓库根 LICENSE,Copyright (c) 2026 Jim Liu;GitHub API license.spdx_id=MIT)Commit 1567581c26
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

Implemented purely through prompt orchestration: SKILL.md deconstructs illustration into three orthogonal dimensions: Type (information structure) × Style (rendering technique) × Palette (color scheme, optional override), then synthesizes the image prompt by combining these dimensions—the skill itself contains zero executable code.

skills/baoyu-article-illustrator/SKILL.md
Analyze articles, identify illustration positions, generate images with Type × Style × Palette consistency.
The three dimensions can be freely combined (`--type infographic --style vector-illustration --palette macaron`) or specified all at once via a preset; Type determines the information structure, Style dictates the rendering method, and Palette overrides the Style's default colors.

The first step is article structure analysis: determining content type, illustration intent, 2–5 core arguments, and "which positions deserve illustrations," with a strict prohibition against rendering metaphors literally.

skills/baoyu-article-illustrator/references/workflow.md
| Visual opportunities | Positions where illustrations add value |
The same document marks "metaphor → illustrate underlying concepts instead of literal imagery" as CRITICAL: when an article uses "cutting a watermelon with a chainsaw" as an example, do not draw a chainsaw and a watermelon; visualize the underlying concept instead.

A non-skippable disk-persisting gate exists before generation: the complete prompt for each image must first be written into an independent file as a reproducible record and a reference for switching backends.

skills/baoyu-article-illustrator/SKILL.md
⛔ **BLOCKING: Prompt files MUST be saved before ANY image generation.**
Files are named NN-{type}-{slug}.md and include YAML frontmatter (illustration_id/type/style/palette/references); the body requires a type template with structured sections for ZONES/LABELS/COLORS/STYLE/ASPECT, and LABELS must reference actual numbers and terminology from the article.

Backend resolution follows explicit priority rules: explicit specification in current request > EXTEND.md's preferred_image_backend > automatic selection (Codex imagegen > codex CLI's codex-imagegen > Cursor GenerateImage > other host-native tools > sole installed backend > ask the user).

skills/baoyu-article-illustrator/SKILL.md
1. **Current-request override** — if the user names a specific backend in the current message, use it.
This provides key evidence that the skill targets specific generation backends: Codex `imagegen`, `baoyu-image-gen --provider codex-cli`, Cursor `GenerateImage`, and Hermes `image_generate` are explicitly hardcoded as candidates in the text, and these backends are genuinely invoked at runtime.

Two hard prohibitions rule out "faking images with code": using SVG/HTML/canvas instead of raster generation is forbidden, as is programmatically overlaying text onto generated bitmaps using ImageMagick/Pillow/OCR, etc.

skills/baoyu-article-illustrator/SKILL.md
**⛔ Never substitute SVG, HTML, canvas, or other code-based rendering for raster image generation.**
If text is incorrect, the prompt must be revised to regenerate the image, or the user must pick from multiple imperfect candidates; post-processing is strictly limited to operations that do not alter text or subject composition, such as cropping, resizing, compression, and format conversion.

The generation phase defaults to batch processing: backend-native batch interfaces are prioritized, followed by host parallel tool calls (defaulting to 4 images per batch), with sequential processing used only as a last resort; failed items are retried only once, and already successful items are not regenerated.

skills/baoyu-article-illustrator/SKILL.md
dispatch up to `generation_batch_size` images at a time. Default: `4`.
The same section also prohibits "spawning subagents to render solely for the sake of parallelism"; subagents are reserved only for prompt iteration or creative exploration.

Confirmation gates are enabled by default: explicit invocation of the skill, providing file paths, matching presets, and EXTEND.md default values are all treated as merely "recommended inputs"; the workflow cannot proceed to generation until user confirmation is completed.

skills/baoyu-article-illustrator/SKILL.md
Default behavior: **confirm before generation**.
This can only be bypassed if the current request explicitly states "generate directly / skip confirmation / no confirmation needed / generate with defaults"; when bypassed, assumed values for type/density/style/palette/language/backend must be declared in the next user-facing update.

Preferences in EXTEND.md undergo a 3-tier lookup (project > XDG > user home); if not found, execution blocks and runs first-time setup; the output directory is determined by default_output_dir, and images are finally reinjected into the article using relative paths.

skills/baoyu-article-illustrator/SKILL.md
Insert `![description]({relative-path}/NN-{type}-{slug}.png)` after paragraphs.
Auxiliary files (outline.md, prompts/) are placed in the output directory alongside images; when article content is pasted, it is consistently saved to illustrations/{topic-slug}/ with a backup as source-{slug}.

2Core Capabilities

01Article structure analysis and illustration positioning (content type / purpose / core arguments / visual opportunities)
02Type-templated prompt construction (dedicated templates for infographic/scene/flowchart/comparison/framework/timeline)
03Palette override of Style default colors (reads palettes/<palette>.md, replaces colors, preserves Style texture descriptions)
04Three-state reference image usage (direct/style/palette): direct uses --ref, while style/palette features are extracted into the prompt body
05Cross-runtime backend resolution (Codex imagegen / codex CLI / Cursor / Hermes / baoyu-image-gen)
06Batch parallel generation + single retry + output backup renaming (-backup-YYYYMMDD-HHMMSS)
07Preference persistence and first-time setup (3-tier lookup for EXTEND.md, blocking if not found)
08Article reinjection and artifact self-check (3-tier structure of outline.md/prompts/images + progress reporting for each image)

3External Dependencies

KindDependency / Endpoint
clicodex CLI(codex-imagegen 分支)
clibaoyu-image-gen skill(--provider codex-cli,首选路径)
apiCodex 原生 imagegen skill(Skill 工具调用)
apiCursor 原生 GenerateImage 工具
networkcodex-imagegen wrapper(自述:认证走用户 Codex 订阅,不读 OPENAI_API_KEY)

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Graded/per-use authorization, sandbox recommended
For Administrators
Approval workflow, rollback support, full audit
Evidence & Triggers (File Paths & Excerpts)
  • 本地工作目录: File I/O and artifact output: Agent writes to disk following SKILL.md instructions: outline.md, prompts/NN-{type}-{slug}.md, generated images, EXTEND
  • SKILL.md: Declared invocation of host CLI interpreter or external execution environment
Audit Notes: 。(a) The runtime agents named in SKILL.md are not local actions, but external generation backends: '**Codex (`imagegen`)** — first, inspect your available-skills / tool inventory.' and 'route through `baoyu-image-gen --provider codex-cli` (preferred)', alongside Cursor `GenerateImage` and Hermes `image_generate` under the same rules—executing SKILL.md inherently sends user article material and constructed prompts over the network to third-party image models, consuming user account quota (Codex subscription or configured provider). (b) Meanwhile, local disk writes occur: prompts/ (hard gate requires persisting first), outline.md, generated images, EXTEND.md. (c) The skill directory itself contains zero scripts, zero embedded network endpoints, and zero credential reading—outbound network access and credential surfaces rest entirely on the invoked backends/hosts, warranting an orange classification rather than red. Precedent reference: ai-image-generation / nano-banana-2 and others that "send materials to generation backends" are uniformly orange.

5Second-Pass Verification

  • [ok] 自身目录无脚本/无网络端点/无凭证读取 — 目录内无任何可执行文件;全目录 URL 扫描只命中 github.com/JimLiu/baoyu-skills(frontmatter homepage),无请求端点、无 key/cookie/token 读取。
  • [ok] SKILL.md 确实点名单一外部生成后端(orange 档依据) — 'Codex (`imagegen`)'、'route through `baoyu-image-gen --provider codex-cli` (preferred)'、Cursor `GenerateImage`、Hermes `image_generate` 四处均在 SKILL.md 正文,且被写成生成前的必经步骤(Do this once per session before any generation)。
  • [ok] prompt 文件必须先落盘(BLOCKING) — SKILL.md Step 5 与 workflow.md 5.1 两处都写死;workflow.md 另有 Prompt Files 清单确认步骤。
  • [ok] 禁用 SVG / 禁用位图涂改两条禁令 — SKILL.md 与 workflow 均含;Modification 段重申后处理仅限 crop/resize/compression/format conversion。
  • [ok] 三维度与 preset 机制 — SKILL.md Three Dimensions 表 + 'Combine freely: `--type infographic --style vector-illustration --palette macaron`' + style-presets.md 均存在,无夸大。
  • [ok] references 数量与按需加载 — 36 个 styles/*.md + 4 个 palettes/*.md + workflow/prompt-construction/styles/style-presets/usage/config/codex-imagegen 均在盘中;codex-imagegen.md 自述只在该分支被选中时加载。
  • [ok] meta 元数据(license/stars/commit) — GitHub API:MIT、stargazers 25926、pushed_at 2026-09-10T15:13:43Z;本地镜像 HEAD 1567581c26ec29f4216c6e6835415bf30343b0e3 与任务 pin 一致;仓库根 LICENSE=MIT (c) 2026 Jim Liu。

6Verdict & Scenarios

  • Dimensional approach + presets: Deconstructs "what to illustrate" into three composable orthogonal parameters, minimizing trial-and-error and unifying styles across batches.
  • Engineered reproducibility: Prompts are persisted to disk first with file names matching outline entries 1:1, preserving history even when switching backends or regenerating.
  • Strict quality discipline: Prohibits faking images with code or editing text on finished bitmaps, enforcing "fix prompt and regenerate" to resolve text issues.
  • Production-ready for large batches: Defaults to 4 parallel images, retries failures only once, and skips completed items, keeping costs manageable for long articles (6+ images).
  • Cross-host portability: Identical backend resolution rules are inlined into SKILL.md, resolving to an available backend across Codex, Cursor, Hermes, or bare CLI.
  • Best for: Ideal for authors of long-form articles, tutorials, or methodologies who need batch illustrations per section, as well as multi-article series requiring a unified visual language (locking styles via preset + palette); can directly use runtime-native image tools in Codex/Cursor without extra configuration.
    Not for: Not suitable for scenarios requiring fully offline image generation or strictly forbidding outbound network calls; not suitable for vector or editable diagrams (use baoyu-diagram or design tools instead); not suitable for casual needs where one just wants to "quickly insert a decorative image"—the skill imposes significant overhead due to confirmation gates and prompt persistence.
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload baoyu-article-illustrator.tar.gz
    sha256: 842c4e88785ed928…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 1567581c26.