Agent skill

Document Illustrator

by op7418 in op7418/Document-illustrator-skill

基于文档内容自动生成配图。AI 智能分析文档结构,归纳核心要点, 为每个主题生成符合特定风格的配图。支持封面图生成和自定义图片比例。

MITAuto-check: notesMedia & Creative

Install Document Illustrator

skills CLI
$ npx skills add op7418/Document-illustrator-skill --skill document-illustrator -a claude-code

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

GitHub CLI
$ gh skill install op7418/Document-illustrator-skill document-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
document-illustrator
GitHub stars
599
Token cost
~1.6k tokens
SKILL.md length
378 words
Files
10 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

基于文档内容自动生成配图。AI 智能分析文档结构,归纳核心要点, 为每个主题生成符合特定风格的配图。支持封面图生成和自定义图片比例。

  • Works in 11 steps: 渐变玻璃卡片风格 (gradient-glass) → 票据风格 (ticket) → 矢量插画风格 (vector-illustration) → …
  • Tasks that involve Image generation
  • SKILL.md covers 🎯 核心特点, 🚀 使用方法, 📝 完整工作流程 and 🎨 三种风格说明, plus 4 more sections
  • Runs Python scripts from its folder; calls pip; needs GEMINI_API_KEY

What it does

Document Illustrator is an agent skill from op7418/Document-illustrator-skill. 基于文档内容自动生成配图。AI 智能分析文档结构,归纳核心要点, 为每个主题生成符合特定风格的配图。支持封面图生成和自定义图片比例。 使用场景:当用户需要为文档、文章、笔记生成配图时。 关键词:配图、插图、illustration、generate images、document images

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 other files, including scripts (for example `README.md`, `examples/README.md` and `scripts/generate_illustrations.py`).

It sits in Media & Creative, covering Image generation and Icons and illustration. It works with Adobe Illustrator. The repository describes itself as: 帮你从文档生成对应的多张配图,内置了歸藏精心探索的图片风格,支持 16:9 和 3:4 两种比例,方便发小红书以及推特。 The licence is MIT.

When your agent uses it

  • Tasks that involve Image generation
  • Tasks that involve Icons and illustration

Example prompts

  • “/document-illustrator”

Requirements

  • Python 3
  • A credential in GEMINI_API_KEY
  • Pre-approved tools (allowed-tools): Read, Write, Bash(python:*), Glob, AskUserQuestion

Workflow steps

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

  1. 渐变玻璃卡片风格 (gradient-glass)
  2. 票据风格 (ticket)
  3. 矢量插画风格 (vector-illustration)
  4. 完整性优先
  5. 逻辑清晰
  6. 平衡分配
  7. 用户可控
  8. 合理选择图片数量
  9. 根据用途选择比例
  10. 封面图的使用
  11. 风格选择建议

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash(python:*)
    • Glob
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • pip

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

  • Network

    Links to these hosts (documentation or services it may open):

    • makersuite.google.com

    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

Document Illustrator loads about 1.6k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 378 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:306
    在 `~/.claude/skills/document-illustrator/.env` 中配置
  • NoteMentions a .env fileSKILL.md:347
    1. 检查 `.env` 文件中的 `GEMINI_API_KEY`

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 op7418/Document-illustrator-skill at commit 8344815, republished under its MIT licence (© op7418). 378 words, ~1,588 tokens.

Download SKILL.mdSave it as .claude/skills/document-illustrator/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
document-illustrator
description
基于文档内容自动生成配图。AI 智能分析文档结构,归纳核心要点, 为每个主题生成符合特定风格的配图。支持封面图生成和自定义图片比例。 使用场景:当用户需要为文档、文章、笔记生成配图时。 关键词:配图、插图、illustration、generate images、document images
allowed-tools
Read, Write, Bash(python:*), Glob, AskUserQuestion
model
claude-sonnet-4-5-20250514

Document Illustrator Skill

基于 AI 智能分析的文档配图生成工具。无需依赖特定格式,自动理解内容并生成专业配图。

🎯 核心特点

  • ✨ AI 智能归纳:自动理解文档内容,智能提取核心主题
  • 🎨 格式无关:支持任何格式的文档(Markdown、纯文本、PDF 等)
  • 📐 灵活比例:支持 16:9(横屏)和 3:4(竖屏)
  • 🖼️ 封面图可选:可生成概括全文的封面图
  • 🎭 三种风格:渐变玻璃卡片、票据风格、矢量插画

🚀 使用方法

直接告诉 Claude
帮我为这个文档生成配图:/path/to/document.md

或者:

我想为这篇文章生成一些配图

📝 完整工作流程

第 1 步:Claude 读取和理解文档

当你请求生成配图时,Claude 会:

  1. 使用 Read 工具读取完整文档
  2. AI 分析理解文档内容和结构
  3. 识别核心主题和要点

无需担心文档格式:

  • ✅ 标准 Markdown(##、###)
  • ✅ 分隔线格式(======、------)
  • ✅ 纯文本段落
  • ✅ 任何其他格式
第 2 步:配置选项(3 个问题)

Claude 会询问你的偏好:

问题 1:图片比例
请选择图片比例:
1. 16:9 (横屏) - 适合演示文稿、幻灯片、横屏展示
2. 3:4 (竖屏) - 适合社交媒体、手机查看、海报

请选择 (1/2):
问题 2:封面图
是否生成封面图?
封面图将概括文档的所有核心信息,作为系列配图的引导。

1. 是 - 生成封面图 + 内容配图
2. 否 - 仅生成内容配图

请选择 (1/2):
问题 3:内容配图数量
期望生成多少张内容配图?
建议范围:3-10 张
根据文档内容,推荐生成 6 张

请输入数字:
第 3 步:Claude 归纳内容并展示

根据你指定的数量,Claude 会智能归纳文档,然后展示给你确认:

📋 内容归纳完成

📄 封面图内容:(如果选择生成)
"AI 编程工具概念演化:从 Rules 到 Skills"
- 核心概念:静态上下文 vs 动态上下文
- 演化路径:Rules → Commands → MCP → Modes → Skills
- 最佳实践:简化为两个核心工具

📚 内容配图(共 6 张):

1. Rules 的诞生与演化
   包含:早期模型幻觉问题、rules 文件的作用、静态上下文概念

2. Commands 和工作流打包
   包含:固定工作流的出现、slash command、团队分享

3. MCP Servers 带来动态能力
   包含:第三方工具集成、OAuth 认证、上下文膨胀问题

4. Modes 和 Subagents 的登场
   包含:人设提示词、系统提示词修改、可靠性设计、Hooks 确定性

5. Skills 统一动态上下文
   包含:Skills 概念、动态加载、编程工具优化

6. 最佳实践与未来展望
   包含:Rules 使用建议、Skills 探索、核心理念总结

✓ 所有内容已覆盖,无遗漏

确认开始生成配图吗?(Y/N)

关键保证:

  • ✅ 内容完整:所有重要信息都会被归入某张图片
  • ✅ 逻辑清晰:按照内容的自然逻辑分段
  • ✅ 用户可控:展示归纳结果,等待用户确认
第 4 步:生成配图

确认后,Claude 调用 Python 脚本生成图片:

🖼️  开始生成配图...

正在生成封面图...
  ✓ 已保存: /path/to/document/images/cover.png

正在生成第 1/6 张...
  标题: Rules 的诞生与演化
  ✓ 已保存: /path/to/document/images/illustration-01.png

正在生成第 2/6 张...
  标题: Commands 和工作流打包
  ✓ 已保存: /path/to/document/images/illustration-02.png

...

✨ 完成!共生成 7 张配图(1 张封面 + 6 张内容)
第 5 步:输出结果

输出位置:文档所在目录下的 images/ 文件夹

/path/to/your/document/
└── images/
    ├── cover.png              # 封面图(如果选择生成)
    ├── illustration-01.png    # 第 1 张内容配图
    ├── illustration-02.png    # 第 2 张内容配图
    ├── illustration-03.png
    ├── illustration-04.png
    ├── illustration-05.png
    └── illustration-06.png

🎨 三种风格说明

1. 渐变玻璃卡片风格 (gradient-glass)

特点:

  • Apple Keynote 风格的极简主义
  • 玻璃拟态(Glassmorphism)设计
  • 深邃虚空黑或纯净陶瓷白基底
  • 流动的极光渐变色
  • 3D 玻璃物体和发光效果

适用场景:

  • 科技产品介绍
  • 数据分析报告
  • 未来趋势展望
  • 产品功能演示
2. 票据风格 (ticket)

特点:

  • 数字极简票券设计
  • 高度对比的黑白配色
  • 类似登机牌、门票的结构
  • 精确的几何分区
  • 中英混排,多向文字布局

适用场景:

  • 信息图表
  • 统计数据展示
  • 时间线和流程图
  • 要点总结
3. 矢量插画风格 (vector-illustration)

特点:

  • 扁平化矢量插画
  • 统一粗细的黑色轮廓线
  • 复古柔和的配色
  • 几何化处理
  • 横向全景式构图

适用场景:

  • 故事叙述
  • 概念解释
  • 教育内容
  • 品牌宣传

💡 使用示例

示例 1:完整流程
用户: 帮我为 ~/blog/ai-tools.md 生成配图,用票据风格

Claude: 好的,让我先读取这个文档...
        [读取文档,分析内容]

        检测到文档长度约 3000 字,内容涉及 AI 工具演化。

        请选择图片比例:
        1. 16:9 (横屏)
        2. 3:4 (竖屏)

用户: 1

Claude: 是否生成封面图?
        1. 是
        2. 否

用户: 是

Claude: 期望生成多少张内容配图?
        建议范围:3-10 张
        根据文档内容,推荐生成 5 张

用户: 5

Claude: [展示归纳的 5 个主题]
        确认开始生成配图吗?

用户: Y

Claude: [调用 Python 脚本生成 6 张图片]
        ✨ 完成!配图已保存到 ~/blog/images/
示例 2:纯文本文档
用户: 为这个纯文本笔记生成配图

Claude: [读取笔记,即使没有任何标题也能理解内容]
        [智能识别 3 个核心主题]
        [询问配置、展示归纳、生成配图]
示例 3:自定义数量
用户: 我想要 8 张图,竖屏的,不要封面

Claude: 好的,16:9 竖屏,不生成封面,8 张内容配图。
        [将文档归纳为 8 个主题]
        [展示归纳结果,用户确认后生成]

🔧 技术细节

图片规格
比例分辨率适用场景
16:92560x1440 (2K)演示文稿、横屏展示
3:41920x2560社交媒体、竖屏查看

可选 4K 分辨率:

  • 16:9 → 3840x2160
  • 3:4 → 2880x3840
API 调用
  • 模型:Gemini 2.0 Flash Image Preview (Nano Banana Pro)
  • 成本:每张图片 = 1 次 API 调用
  • 速度:平均 10-20 秒/张
环境要求

必需:

bash
pip install google-genai pillow python-dotenv

API 密钥:

  • 在 ~/.claude/skills/document-illustrator/.env 中配置
  • 或设置环境变量 GEMINI_API_KEY

📊 内容归纳原则

Claude 归纳内容时遵循以下原则:

1. 完整性优先
  • ✅ 所有重要信息都会被包含
  • ✅ 不会遗漏关键概念
  • ✅ 保留原文的核心观点
2. 逻辑清晰
  • 按照内容的自然逻辑分段
  • 相关内容归为一组
  • 保持叙事的连贯性
3. 平衡分配
  • 每张图片包含相似的信息量
  • 避免某张过于拥挤或空洞
  • 根据内容重要性调整
4. 用户可控
  • 展示归纳结果给用户确认
  • 用户可以要求调整
  • 确认后才开始生成

🐛 故障排除

问题 1:API 密钥错误

错误信息:

Error: Invalid API key

解决方案:

  1. 检查 .env 文件中的 GEMINI_API_KEY
  2. 确保 API 密钥有效且未过期
  3. 获取新密钥:https://makersuite.google.com/app/apikey
问题 2:内容归纳不理想

问题:归纳的主题不符合预期

解决方案:

  1. 在归纳展示阶段,告诉 Claude 你的期望
  2. Claude 会重新归纳并调整
  3. 确认满意后再开始生成
Show full SKILL.md (149 more words)Show less
问题 3:图片生成失败

可能原因:

  • 网络连接问题
  • API 配额用尽
  • 内容过长超过限制

解决方案:

  1. 检查网络连接
  2. 检查 API 配额
  3. 尝试增加图片数量(分散内容)

💰 成本估算

图片数量API 调用次数预估成本
无封面 + 3 张3 次低
有封面 + 5 张6 次中
有封面 + 10 张11 次较高

建议:

  • 短文档(<1000字):3-5 张
  • 中等文档(1000-3000字):5-7 张
  • 长文档(>3000字):8-10 张

📚 最佳实践

1. 合理选择图片数量

太少:

  • 每张图片信息量过大
  • 不容易理解和记忆

太多:

  • 内容分散
  • 增加成本和生成时间

推荐:

  • 根据文档长度选择
  • 每张图片涵盖 1-2 个核心观点
2. 根据用途选择比例

16:9 适合:

  • PPT 演示
  • 网站横幅
  • 视频封面
  • 博客配图(桌面端)

3:4 适合:

  • 社交媒体(Instagram、小红书)
  • 移动端文章
  • 海报设计
  • 竖屏视频
3. 封面图的使用

建议生成封面图的场景:

  • 系列文章(作为统一引导)
  • 社交分享(作为预览图)
  • 文档首页(概括全文)

可以不生成的场景:

  • 仅内部使用
  • 图片数量已足够
  • 希望降低成本
4. 风格选择建议

技术文档 → 渐变玻璃卡片风格 数据报告 → 票据风格 教程故事 → 矢量插画风格 产品介绍 → 渐变玻璃卡片风格

🔄 工作原理

传统方式(已废弃)
[代码] 读取文档 → 识别 ## ### 标题 → 机械切分
       ↓
    依赖特定格式
    容易遗漏内容
    不够智能
新方式(当前实现)
[Claude] 读取文档 → AI 理解内容 → 智能归纳主题
         ↓
      格式无关
      内容完整
      用户可控

核心区别:

  • ❌ 旧方式:依赖代码解析,只能处理标准格式
  • ✅ 新方式:AI 理解内容,任何格式都能处理

🎯 与其他工具的对比

功能Document Illustrator传统 PPT 工具AI 图片生成器
理解文档内容✅ AI 智能理解❌ 需要手动❌ 需要手动输入
格式依赖✅ 格式无关❌ 依赖特定格式✅ 无依赖
内容完整性✅ 自动验证⚠️ 手动确保❌ 无法保证
批量生成✅ 一次生成多张❌ 逐张制作⚠️ 需要多次输入
风格一致性✅ 自动保持⚠️ 手动调整⚠️ 需要重复提示词

📞 获取帮助

如有问题或建议:

  1. 直接在 Claude Code 中询问 Claude
  2. 查看计划文件:~/.claude/plans/shimmering-tickling-seahorse.md
  3. 检查 Skill 目录:~/.claude/skills/document-illustrator/

让 AI 帮你理解和归纳内容,生成专业配图! ✨

© op7418, 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 9 other files (scripts) in the repository root of op7418/Document-illustrator-skill.

  • SKILL.md
  • .gitignore
  • LICENSE
  • README.md
  • examples/README.md
  • scripts/generate_illustrations.py
  • scripts/generate_single_image.py
  • styles/gradient-glass.md
  • styles/ticket.md
  • styles/vector-illustration.md

Open the folder on GitHubat commit 8344815

Compare with similar skills

Document 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.

Document Illustrator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Document Illustrator this skillop7418/Document-illustrator-skill599—~1.6kAutomated safety check: NotesMIT
Imagensanjay3290/ai-skills4307 repos~657Automated safety check: PassApache-2.0
Canghe Article Illustratorfreestylefly/canghe-skills4612 repos~1.3kAutomated safety check: PassNone
Cursor Image Generationtmcfarlane/oh-my-cursor109—~1.8kAutomated safety check: PassMIT
Imagegennexu-io/open-design100k—~300Automated safety check: PassApache-2.0
Imagennexu-io/open-design100k—~279Automated safety check: PassApache-2.0

Similar skills

  • Imagen

    sanjay3290/ai-skills

    Generate images using Google Gemini's image generation capabilities.

    430 GitHub starsUsed in 7 repos~657 tokens
    Media & CreativeAuto-check passed
  • Canghe Article Illustrator

    freestylefly/canghe-skills

    Analyzes article structure, identifies positions requiring visual aids, generates illustrations with Type × Style two-dimension approach.

    461 GitHub starsUsed in 2 repos~1.3k tokens
    Media & CreativeAuto-check passed
  • Cursor Image Generation

    tmcfarlane/oh-my-cursor

    Generate and iterate images in Cursor using the built-in image model and strong prompts.

    109 GitHub stars~1.8k tokensUpdated 3 mo ago
    Media & CreativeAuto-check passed
  • Imagegen

    nexu-io/open-design

    Generate and edit images using OpenAI's Image API for project assets — UI mockups, icons, illustrations, social cards, and visual references.

    100k GitHub stars~300 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Imagen

    nexu-io/open-design

    Generate images using Google Gemini's image generation API for UI mockups, icons, illustrations, and visual assets.

    100k GitHub stars~279 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Xiaohu IP Illustration Studio

    xiaohuailabs/xiaohu-ip-studio

    Creates body illustrations for Chinese long-form articles starring a fixed IP character, with a method of anchor, metaphor and self-check and a library of 31 characters.

    295 GitHub stars~2.6k tokensUpdated 3 mo ago
    Media & CreativeAuto-check passed

Questions about Document Illustrator

What does Document Illustrator do?

基于文档内容自动生成配图。AI 智能分析文档结构,归纳核心要点, 为每个主题生成符合特定风格的配图。支持封面图生成和自定义图片比例。. Document Illustrator is an agent skill from op7418/Document-illustrator-skill.

When should I use Document Illustrator?

Document Illustrator fits situations like: tasks that involve Image generation; tasks that involve Icons and illustration.

How do I install Document Illustrator in Claude Code?

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

How do I install Document Illustrator in Codex?

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

Can I use Document 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 op7418/Document-illustrator-skill --skill document-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/document-illustrator, .gemini/skills/document-illustrator, .github/skills/document-illustrator and .opencode/skills/document-illustrator in your project.

What does Document Illustrator need to run?

Going by SKILL.md and its folder, Document Illustrator needs Python for the scripts in its folder, the command-line tools its instructions call (pip) and credentials named GEMINI_API_KEY. Our summary lists: Python 3; A credential in GEMINI_API_KEY. Its frontmatter pre-approves these tools: Read, Write, Bash(python:*), Glob, AskUserQuestion.

Does Document Illustrator access the network?

SKILL.md names 1 domain. As links in the text: makersuite.google.com. This is read from the text; nothing was executed.

Is Document Illustrator safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. 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 Document Illustrator use?

Document 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 Document Illustrator use?

About 1.6k tokens (SKILL.md is roughly 6.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Document Illustrator?

Skills that share tags, products or a category with Document Illustrator: Imagen (sanjay3290/ai-skills, 430 stars), Canghe Article Illustrator (freestylefly/canghe-skills, 461 stars), Cursor Image Generation (tmcfarlane/oh-my-cursor, 109 stars) and Imagegen (nexu-io/open-design, 100k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Document Illustrator?

op7418 (a GitHub user) maintains it in op7418/Document-illustrator-skill, which has 599 GitHub stars. The repository was last updated on January 21, 2026.

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