Agent skill

Smart Illustrator

by axtonliu in axtonliu/smart-illustrator

Generates article illustrations, batch slide infographics and cover images from your text, using Gemini, Mermaid or Excalidraw engines and a prompt-only mode.

MITAuto-check passedMedia & Creative

SKILL.md written in Chinese; this summary is our English description.

Install Smart Illustrator

skills CLI
$ npx skills add axtonliu/smart-illustrator --skill smart-illustrator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install axtonliu/smart-illustrator smart-illustrator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
smart-illustrator
GitHub stars
564
Token cost
~1.8k tokens
SKILL.md length
387 words
Files
30 (incl. scripts, references, assets)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Generates article illustrations, batch slide infographics and cover images from your text, using Gemini, Mermaid or Excalidraw engines and a prompt-only mode.

  • Works in 4 steps: 分析文章 → 生成图片 → 创建带配图的文章 → …
  • Adding illustrations to an article
  • SKILL.md covers ⛔ 强制规则(违反即失败), 使用方式, 参数说明 and 配置文件, plus 4 more sections
  • Runs TypeScript scripts from its folder; calls npx; needs GEMINI_API_KEY

What it does

A Chinese-language skill with three modes. Article mode reads a Markdown article and generates illustrations, slides mode produces batches of infographics from a script file, and cover mode makes cover images for platforms such as YouTube, WeChat, Twitter and Xiaohongshu with matching aspect ratios. By default it generates images through the Gemini API, while --prompt-only prints the prompt, or a JSON prompt for slides, and copies it to the clipboard so you can paste it into Gemini on the web.

Rules say that any file you pass is the article to illustrate, not a skill config, and that the style file must be read before any image prompt is written, with the system prompt taken from that file instead of invented. Styles are light, dark, minimal and bento, the last for feature showcase graphics. Options cover reference images, up to four candidates, aspect ratio, an engine choice of auto, Mermaid, Gemini or Excalidraw, and saving project config.

When your agent uses it

  • Adding illustrations to an article
  • Making a batch of slide-style infographics from a script
  • Creating a cover or thumbnail for a platform
  • Producing a Bento Grid feature showcase image

Example prompts

  • “Add illustrations to docs/post.md in the dark style.”
  • “Make a YouTube cover for this article, prompt only.”
  • “Generate slide infographics from my outline file.”

Requirements

  • Access to the Gemini API, except in prompt-only mode

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. 分析文章
  2. 生成图片
  3. 创建带配图的文章
  4. 输出确认

What it can do on your machine

Read from SKILL.md and the folder at commit 5140888. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (TypeScript, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GEMINI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Smart Illustrator loads about 1.8k tokens when it runs, and up to ~594k if it reads all its reference files. Until then it costs about 67 tokens; SKILL.md has 387 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~594k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from axtonliu/smart-illustrator at commit 5140888, republished under its MIT licence (© axtonliu). 387 words, ~1,801 tokens.

Download SKILL.mdSave it as .claude/skills/smart-illustrator/SKILL.md (or your agent's skills folder). This skill also uses 29 other files; get the full folder from GitHub.
name
smart-illustrator
description
智能配图与 PPT 信息图生成器。支持三种模式:(1) 文章配图模式 - 分析文章内容,生成插图;(2) PPT/Slides 模式 - 生成批量信息图;(3) Cover 模式 - 生成封面图。所有模式默认生成图片,`--prompt-only` 只输出 prompt。支持 Bento Grid 功能展示图风格(--style bento)。触发词:配图、插图、PPT、slides、封面图、thumbnail、cover、bento grid、功能展示图、feature showcase。

Smart Illustrator - 智能配图与 PPT 生成器

⛔ 强制规则(违反即失败)

规则 1:用户提供的文件 = 要处理的文章
/smart-illustrator SKILL_05.md      → SKILL_05.md 是文章,为它配图
/smart-illustrator README.md        → README.md 是文章,为它配图
/smart-illustrator whatever.md      → whatever.md 是文章,为它配图

无论文件名叫什么,都是要配图的文章,不是 Skill 配置。

规则 2:必须读取 style 文件

生成任何图片 prompt 前,必须读取对应的 style 文件:

模式必须读取的文件
文章配图(默认)styles/style-light.md
Cover 封面图styles/style-cover.md
--style darkstyles/style-dark.md
--style bentostyles/style-bento.md

禁止自己编写 System Prompt。

❌ 错误:"你是一个专业的信息图设计师..."(自己编的) ✅ 正确:从 style 文件的代码块中提取 System Prompt


使用方式

文章配图模式(默认)
bash
/smart-illustrator path/to/article.md
/smart-illustrator path/to/article.md --prompt-only    # 只输出 prompt
/smart-illustrator path/to/article.md --style dark     # 深色风格
/smart-illustrator path/to/article.md --no-cover       # 不生成封面图
PPT/Slides 模式
bash
# 默认:直接生成图片
/smart-illustrator path/to/script.md --mode slides

# 只输出 JSON prompt(不调用 API)
/smart-illustrator path/to/script.md --mode slides --prompt-only

默认行为:调用 Gemini API 生成批量信息图。 --prompt-only:输出 JSON prompt 并自动复制到剪贴板,可直接粘贴到 Gemini Web 手动生成。

PPT JSON 格式(--prompt-only 时输出):

json
{
  "instruction": "请逐条生成以下 N 张独立信息图。",
  "batch_rules": { "total": "N", "one_item_one_image": true, "aspect_ratio": "16:9" },
  "style": "[从 styles/style-light.md 读取完整内容]",
  "pictures": [
    { "id": 1, "topic": "封面", "content": "系列名称\n\n第N节:标题" },
    { "id": 2, "topic": "主题", "content": "原始内容" }
  ]
}
Cover 模式
bash
/smart-illustrator path/to/article.md --mode cover --platform youtube
/smart-illustrator --mode cover --platform youtube --topic "Claude 4 深度评测"

平台尺寸(输出均为 2K 分辨率):

平台代码宽高比
YouTubeyoutube16:9
公众号wechat2.35:1
Twittertwitter1.91:1
小红书xiaohongshu3:4

参数说明

参数默认值说明
--modearticlearticle / slides / cover
--platformyoutube封面图平台(仅 cover 模式)
--topic-封面图主题(仅 cover 模式)
--prompt-onlyfalse输出 prompt 到剪贴板,不调用 API(适用于所有模式)
--stylelight风格:light / dark / minimal / bento
--no-coverfalse不生成封面图
--ref-参考图路径(可多次使用)
-c, --candidates1候选图数量(最多 4)
-a, --aspect-ratio-宽高比:16:9(正文配图/封面图默认)、3:2(备选横版)、3:4(仅竖屏平台)
--engineauto引擎选择:auto(自动)/ mermaid / gemini / excalidraw
--mermaid-embedfalseMermaid 输出为代码块而非 PNG(旧行为)
--save-config-保存到项目配置
--no-configfalse禁用 config.json

--no-config 范围:只禁用 config.json,不影响 styles/style-*.md。


配置文件

优先级:CLI 参数 > 项目级 > 用户级

位置路径
项目级.smart-illustrator/config.json
用户级~/.smart-illustrator/config.json
json
{ "references": ["./refs/style-ref-01.png"] }

三级配图引擎

优先级引擎适用场景输出
1Gemini隐喻图、创意图、封面图、无法用图表表达的概念PNG
2Excalidraw概念图、对比图、简单流程(≤ 8 节点)、关系图、手绘风格示意图PNG
3Mermaid仅限:复杂流程(> 8 节点)、多层架构图、多角色时序图、多分支决策树PNG

选择逻辑:

  • 需要隐喻、情感、创意表达 → Gemini
  • 概念关系、对比、简单流程 → Excalidraw(大多数图表场景的首选)
  • 只有节点 > 8、多层/多角色的复杂结构化图形 → Mermaid
  • Mermaid 视觉表现力有限,能用 Excalidraw 就不用 Mermaid
  • 唯一目标:提高文章吸引力

生成 Excalidraw 前必须读取 references/excalidraw-guide.md。

Mermaid 语义色板

每种颜色有固定含义,必须使用 classDef + class 应用:

语义填充色边框色用于
input#d3f9d8#2f9e44输入、起点、数据源
process#e5dbff#5f3dc4处理、推理、核心逻辑
decision#ffe3e3#c92a2a决策点、分支判断
action#ffe8cc#d9480f执行动作、工具调用
output#c5f6fa#0c8599输出、结果、终点
storage#fff4e6#e67700存储、记忆、数据库
meta#e7f5ff#1971c2标题、分组、元信息

classDef 写法(放在图表末尾):

classDef input fill:#d3f9d8,stroke:#2f9e44,color:#1a1a1a
classDef process fill:#e5dbff,stroke:#5f3dc4,color:#1a1a1a
classDef decision fill:#ffe3e3,stroke:#c92a2a,color:#1a1a1a
classDef action fill:#ffe8cc,stroke:#d9480f,color:#1a1a1a
classDef output fill:#c5f6fa,stroke:#0c8599,color:#1a1a1a
class A input
class B,C process
class D output
Show full SKILL.md (151 more words)Show less
Mermaid 布局规则
  • 布局方向:默认 TB(上到下),横向流程用 LR
  • 箭头分级:--> 主流程 / -.-> 可选/辅助路径 / ==> 重点强调
  • 分组:用 subgraph 对相关节点分组,标题简洁
  • 节点文字:≤ 8 字,无 emoji,禁止 1. 格式(用 ① 或 Step 1:)
  • 节点数量:单图 ≤ 15 个节点,复杂内容拆成多图

--engine 参数:

  • auto(默认):根据内容类型自动选择(优先级 Gemini > Excalidraw > Mermaid)
  • gemini:强制只使用 Gemini(适合创意内容)
  • excalidraw:强制只使用 Excalidraw(适合手绘概念图)
  • mermaid:强制只使用 Mermaid(适合技术文档)

执行流程

Step 1: 分析文章
  1. 读取文章内容
  2. 识别配图位置(通常 3-5 个)
  3. 为每个位置确定引擎(Gemini / Excalidraw / Mermaid)
Step 2: 生成图片
Mermaid(结构化图形)→ PNG
  1. 生成 Mermaid 代码,保存为临时 .mmd 文件
  2. 调用 mermaid-export.ts 导出高分辨率 PNG:
bash
npx -y bun ~/.claude/skills/smart-illustrator/scripts/mermaid-export.ts \
  -i {图表名}.mmd -o {图表名}.png -w 2400
  1. 在文章中插入 PNG 图片引用
  2. 保留 .mmd 源文件用于后续编辑

使用 --mermaid-embed 参数时,改为直接嵌入 Mermaid 代码块(旧行为)。

Excalidraw(手绘/概念图)→ PNG
  1. 读取 references/excalidraw-guide.md 获取 JSON 规范
  2. 生成 Excalidraw JSON,保存为 .excalidraw 文件
  3. 调用 excalidraw-export.ts 导出 PNG:
bash
npx -y bun ~/.claude/skills/smart-illustrator/scripts/excalidraw-export.ts \
  -i {图表名}.excalidraw -o {图表名}.png -s 2
  1. 在文章中插入 PNG 图片引用
  2. 保留 .excalidraw 源文件用于后续编辑

依赖未安装时的降级:提示手动打开 excalidraw.com 导出。

Gemini(创意/视觉图形)

命令模板(必须使用 HEREDOC + prompt-file):

bash
# Step 1: 写入 prompt
cat > /tmp/image-prompt.txt <<'EOF'
{从 style 文件提取的 System Prompt}

**内容**:{配图内容}
EOF

# Step 2: 调用脚本
GEMINI_API_KEY=$GEMINI_API_KEY npx -y bun ~/.claude/skills/smart-illustrator/scripts/generate-image.ts \
  --prompt-file /tmp/image-prompt.txt \
  --output {输出路径}.png \
  --aspect-ratio 16:9

封面图(16:9):

bash
cat > /tmp/cover-prompt.txt <<'EOF'
{从 style-cover.md 提取的 System Prompt}

**内容**:
- 核心概念:{主题}
- 视觉隐喻:{设计}
EOF

GEMINI_API_KEY=$GEMINI_API_KEY npx -y bun ~/.claude/skills/smart-illustrator/scripts/generate-image.ts \
  --prompt-file /tmp/cover-prompt.txt \
  --output {文章名}-cover.png \
  --aspect-ratio 16:9

参数传递:用户指定的 --no-config、--ref、-c 必须传递给脚本。

Step 3: 创建带配图的文章

保存为 {文章名}-image.md,包含:

  • YAML frontmatter 声明封面图
  • 正文配图插入
Step 4: 输出确认

报告:生成了几张图片、输出文件列表。


--prompt-only 模式

当使用 --prompt-only 时,不调用 API,而是:

  1. 生成 JSON prompt
  2. 自动复制到剪贴板(使用 pbcopy)
  3. 同时保存到文件备份
bash
# 执行方式
echo '{生成的 JSON}' | pbcopy
echo "✓ JSON prompt 已复制到剪贴板"

# 同时保存备份
echo '{生成的 JSON}' > /tmp/smart-illustrator-prompt.json
echo "✓ 备份已保存到 /tmp/smart-illustrator-prompt.json"

用户可直接粘贴到 Gemini Web 手动生成图片。


输出文件

article.md              # 原文(不修改)
article-image.md        # 带配图的文章
article-cover.png       # 封面图(16:9)
article-image-01.png    # Gemini 配图

© axtonliu, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 29 other files (scripts, references, assets) in the repository root of axtonliu/smart-illustrator.

  • SKILL.md
  • .gitignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • assets/dual-engine-architecture.png
  • prompts/README.md
  • prompts/learning-analysis.md
  • prompts/varied-styles.md
  • references/cover-best-practices.md
  • references/excalidraw-export-selectors.md
  • references/excalidraw-guide.md
  • references/ref-image1.png
  • references/ref-image2.png
  • references/slides-prompt-example.json
  • scripts/batch-generate.ts
  • scripts/config.ts
  • … and 13 more

Open the folder on GitHubat commit 5140888

Compare with similar skills

Smart Illustrator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Smart Illustrator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smart Illustrator this skillaxtonliu/smart-illustrator564—~1.8kAutomated safety check: PassMIT
SEO Image GeneratorAgriciDaniel/claude-seo18k2 repos~2.1kAutomated safety check: PassMIT
Nano Bananakkoppenhaver/cc-nano-banana3781 repos~1.4kAutomated safety check: PassMIT
SVG Technical Infographic Authormodu-ai/moai-adk1.2k—~5.2kAutomated safety check: NotesApache-2.0
Youtube Thumbnailhassancs91/claude-youtube-editor322—~2.1kAutomated safety check: NotesMIT
Sf Diagram NanobananaproJaganpro/sf-skills424—~1.6kAutomated safety check: PassMIT

Similar skills

  • SEO Image Generator

    AgriciDaniel/claude-seo

    Generates Open Graph previews, blog hero images, product photos and infographics for SEO use through Gemini image tools and the banana extension.

    18k GitHub starsUsed in 2 repos~2.1k tokens
    Media & CreativeAuto-check passed
  • Nano Banana

    kkoppenhaver/cc-nano-banana

    REQUIRED for all image generation requests. An agent skill from kkoppenhaver/cc-nano-banana.

    378 GitHub starsUsed in 1 repo~1.4k tokens
    Media & CreativeAuto-check passed
  • Builds hand-editable SVG diagrams from computed layout coordinates, lints the source and renders a 2x PNG, with rules for when mermaid is the better choice.

    1.2k GitHub stars~5.2k tokensUpdated today
    Media & CreativeAuto-check: notes
  • Youtube Thumbnail

    hassancs91/claude-youtube-editor

    Dedicated YouTube thumbnail generator — interviews you for exactly the style elements you want (environment, text budget, extras, accent color), then renders high-contrast, vibrant, face-consistent…

    322 GitHub stars~2.1k tokensUpdated 1 mo ago
    Media & CreativeAuto-check: notes
  • Sf Diagram Nanobananapro

    Jaganpro/sf-skills

    AI-powered image generation for Salesforce visuals via Nano Banana Pro.

    424 GitHub stars~1.6k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • Space Image Studio

    SpaceZephyr/design-buddy

    Generates PNG images for four common needs: Xiaohongshu covers, slide illustrations, charts and article logic diagrams, with twelve visual styles and automatic style suggestions.

    174 GitHub stars~2k tokensUpdated 3 mo ago
    Media & CreativeAuto-check passed

Questions about Smart Illustrator

What does Smart Illustrator do?

Generates article illustrations, batch slide infographics and cover images from your text, using Gemini, Mermaid or Excalidraw engines and a prompt-only mode. A Chinese-language skill with three modes. Article mode reads a Markdown article and generates illustrations, slides mode produces batches of infographics from a script file, and cover mode makes cover images for platforms such as YouTube, WeChat, Twitter and Xiaohongshu with matching aspect ratios.

When should I use Smart Illustrator?

Smart Illustrator fits situations like: adding illustrations to an article; making a batch of slide-style infographics from a script; creating a cover or thumbnail for a platform; producing a Bento Grid feature showcase image.

How do I install Smart Illustrator in Claude Code?

Run `npx skills add axtonliu/smart-illustrator --skill smart-illustrator -a claude-code`. Or copy the skill folder (the axtonliu/smart-illustrator repository) into .claude/skills/smart-illustrator in your project. Claude Code loads it when a task matches its description.

How do I install Smart Illustrator in Codex?

Run `npx skills add axtonliu/smart-illustrator --skill smart-illustrator -a codex`. Or copy the skill folder (the axtonliu/smart-illustrator repository) into .agents/skills/smart-illustrator in your project. Codex loads it when a task matches its description.

Can I use Smart Illustrator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add axtonliu/smart-illustrator --skill smart-illustrator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-illustrator, .gemini/skills/smart-illustrator, .github/skills/smart-illustrator and .opencode/skills/smart-illustrator in your project.

What does Smart Illustrator need to run?

Going by SKILL.md and its folder, Smart Illustrator needs TypeScript for the scripts in its folder, the command-line tools its instructions call (npx) and credentials named GEMINI_API_KEY. Our summary lists: Access to the Gemini API, except in prompt-only mode.

Does Smart Illustrator access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Smart Illustrator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Smart Illustrator use?

Smart Illustrator is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Smart Illustrator use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 592k tokens, read only when the agent opens those files.

What are the alternatives to Smart Illustrator?

Skills that share tags, products or a category with Smart Illustrator: SEO Image Generator (AgriciDaniel/claude-seo, 18k stars), Nano Banana (kkoppenhaver/cc-nano-banana, 378 stars), SVG Technical Infographic Author (modu-ai/moai-adk, 1.2k stars) and Youtube Thumbnail (hassancs91/claude-youtube-editor, 322 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smart Illustrator?

axtonliu (a GitHub user) maintains it in axtonliu/smart-illustrator, which has 564 GitHub stars. The repository was last updated on June 26, 2026.

Source: axtonliu/smart-illustrator on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.