REA
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
AI-powered article illustrations with intelligent position detection and cover learning system. Claude Code Skill.
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/skills/axtonliu-smart-illustrator)在同一工作中把 AI 连到服务的 MCP
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Codebase intelligence for TypeScript and JavaScript, exposed as structured MCP analysis tools.
MCP server for terminal commands, file operations, and process management
同类工作,排序与 Skill 列表相同
| 本项 smart-illustrator | rea | andrej-karpathy-skills | graphify | MoneyPrinterTurbo | |
|---|---|---|---|---|---|
| 作者 | axtonliu | morluto | multica-ai | Graphify-Labs | harry0703 |
| Skill 数 | 1 | 1 | 1 | 1 | 1 |
| GitHub 星标 | 573 | 465,460 | 233,910 | 149,364 | 144,149 |
| 最近代码更新 | 2026年6月26日 | 2026年11月17日 | 2026年4月20日 | 2026年11月17日 | 2026年11月17日 |
| 许可证 | MIT | MIT | – | Apache-2.0 | MIT |
axtonliu 提供的 1 个 Skill(指令集),AI 读取后照做 · 不是 MCP server
MCP = 手
把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。
Skill = 手册
教 AI 怎么做某项工作的文本文件,不连接任何服务。
有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。
Claude Code
依据开发者 README 和 repo 中的文件夹
GitHub account axtonliu (person), 8 years old
★ 573 stars · code last changed 2026年6月26日
6 scripts that can run on a computer: scripts/batch-generate.ts, scripts/config.ts, scripts/cover-learner.ts, scripts/excalidraw-export.ts and 2 more
Scripts that go online: scripts/cover-learner.ts, scripts/batch-generate.ts, scripts/generate-image.ts
Scripts that touch settings folders (~/.claude or settings.json): scripts/mermaid-export.ts, scripts/generate-image.ts
Checked automatically from the repo files at commit 5140888 (read only, nothing was run). Not a safety guarantee: read it and decide for yourself
第一步:你用哪个 AI?
选择你用的应用,本页只显示该应用的安装方法
Uploading to claude.ai would fail: the description is over 200 characters (248). Use "Let the AI install it" instead
复制这句话,粘贴到 Claude Code 的对话中
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
重新打开 Claude Code,输入 /smart-illustrator,或直接提出相关任务,Claude 会自动选用
Checked against official docs 2026年11月12日 · Source: code.claude.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill
在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中
The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
把 smart-illustrator 文件夹放到 ~/.agents/skills/smart-illustrator
~ 是你的主文件夹($HOME)
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill
想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
复制这句话,粘贴到 Cursor 的对话中
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
在 Cursor 的 Agent 聊天中输入 / 并选择 smart-illustrator
Checked against official docs 2026年11月12日 · Source: cursor.com
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
正在检查命令 · 通过后才会显示复制按钮
适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com
其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。
已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹
以下文字来自开发者的 repo,不是 PopNx MCP 的指令
7,202 个字符 · 在 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 dark` | `styles/style-dark.md` |
| `--style bento` | `styles/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 分辨率):
| 平台 | 代码 | 宽高比 |
|------|------|--------|
| YouTube | `youtube` | 16:9 |
| 公众号 | `wechat` | 2.35:1 |
| Twitter | `twitter` | 1.91:1 |
| 小红书 | `xiaohongshu` | 3:4 |
---
## 参数说明
| 参数 | 默认值 | 说明 |
|------|--------|------|
| `--mode` | `article` | `article` / `slides` / `cover` |
| `--platform` | `youtube` | 封面图平台(仅 cover 模式) |
| `--topic` | - | 封面图主题(仅 cover 模式) |
| `--prompt-only` | `false` | 输出 prompt 到剪贴板,不调用 API(适用于所有模式) |
| `--style` | `light` | 风格:`light` / `dark` / `minimal` / `bento` |
| `--no-cover` | `false` | 不生成封面图 |
| `--ref` | - | 参考图路径(可多次使用) |
| `-c, --candidates` | `1` | 候选图数量(最多 4) |
| `-a, --aspect-ratio` | - | 宽高比:`16:9`(正文配图/封面图默认)、`3:2`(备选横版)、`3:4`(仅竖屏平台) |
| `--engine` | `auto` | 引擎选择:`auto`(自动)/ `mermaid` / `gemini` / `excalidraw` |
| `--mermaid-embed` | `false` | Mermaid 输出为代码块而非 PNG(旧行为) |
| `--save-config` | - | 保存到项目配置 |
| `--no-config` | `false` | 禁用 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"] }
```
---
## 三级配图引擎
| 优先级 | 引擎 | 适用场景 | 输出 |
|--------|------|---------|------|
| **1** | Gemini | 隐喻图、创意图、封面图、无法用图表表达的概念 | PNG |
| **2** | Excalidraw | 概念图、对比图、简单流程(≤ 8 节点)、关系图、手绘风格示意图 | PNG |
| **3** | Mermaid | **仅限**:复杂流程(> 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
```
### 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
```
3. 在文章中插入 PNG 图片引用
4. 保留 .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
```
4. 在文章中插入 PNG 图片引用
5. 保留 .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 配图
```
提问、分享技巧或报告无法使用。按“有帮助”数量排序。