A document illustration generation tool based on AI intelligent analysis. No need to rely on a specific format; it automatically understands the content and generates professional illustrations.
🎯 Core Features
- ✨ AI Intelligent Summarization: Automatically understands document content and intelligently extracts core topics
- 🎨 Format Agnostic: Supports documents in any format (Markdown, plain text, PDF, etc.)
- 📐 Flexible Ratios: Supports 16:9 (landscape) and 3:4 (portrait)
- 🖼️ Optional Cover Image: Can generate a cover image that summarizes the entire text
- 🎭 Three Styles: Gradient glass card, ticket style, vector illustration
🚀 How to Use
Tell Claude directly
帮我为这个文档生成配图:/path/to/document.md
Or:
我想为这篇文章生成一些配图
📝 Complete Workflow
Step 1: Claude reads and understands the document
When you request illustration generation, Claude will:
- Use the Read tool to read the complete document
- AI analyzes and understands the document content and structure
- Identify core topics and key points
No need to worry about document format:
- ✅ Standard Markdown (##, ###)
- ✅ Separator line format (======, ------)
- ✅ Plain text paragraphs
- ✅ Any other format
Step 2: Configure options (3 questions)
Claude will ask for your preferences:
Question 1: Image aspect ratio
请选择图片比例:
1. 16:9 (横屏) - 适合演示文稿、幻灯片、横屏展示
2. 3:4 (竖屏) - 适合社交媒体、手机查看、海报
请选择 (1/2):
Question 2: Cover image
是否生成封面图?
封面图将概括文档的所有核心信息,作为系列配图的引导。
1. 是 - 生成封面图 + 内容配图
2. 否 - 仅生成内容配图
请选择 (1/2):
Question 3: Number of content illustrations
期望生成多少张内容配图?
建议范围:3-10 张
根据文档内容,推荐生成 6 张
请输入数字:
Step 3: Claude summarizes the content and displays it
Based on the number you specify, Claude will intelligently summarize the document and then display it for your confirmation:
📋 内容归纳完成
📄 封面图内容:(如果选择生成)
"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)
Key Guarantees:
- ✅ Complete content: All important information will be included in one of the images
- ✅ Clear logic: Segmented according to the natural logic of the content
- ✅ User-controllable: Displays the summarization results and waits for user confirmation
Step 4: Generate illustrations
After confirmation, Claude calls a Python script to generate the images:
🖼️ 开始生成配图...
正在生成封面图...
✓ 已保存: /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 张内容)
Step 5: Output results
Output location: The images/ folder in the directory where the document is located
/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
🎨 Explanation of the Three Styles
1. Gradient glass card style (gradient-glass)
Features:
- Apple Keynote-style minimalism
- Glassmorphism design
- Deep void black or pure ceramic white base
- Flowing aurora gradient colors
- 3D glass objects and glowing effects
Applicable scenarios:
- Technology product introductions
- Data analysis reports
- Future trend outlooks
- Product feature demonstrations
2. Ticket style (ticket)
Features:
- Digital minimalist ticket design
- High-contrast black and white color scheme
- Structure similar to boarding passes and tickets
- Precise geometric partitions
- Mixed Chinese and English typesetting, multi-directional text layout
Use Cases:
- Infographics
- Statistical data presentation
- Timelines and flowcharts
- Key point summaries
3. Vector illustration style (vector-illustration)
Features:
- Flat vector illustration
- Uniform-thickness black outlines
- Retro soft color palette
- Geometric treatment
- Horizontal panoramic composition
Use Cases:
- Storytelling
- Concept explanation
- Educational content
- Brand promotion
💡 Usage Examples
Example 1: Complete workflow
用户: 帮我为 ~/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/
Example 2: Plain text document
用户: 为这个纯文本笔记生成配图
Claude: [读取笔记,即使没有任何标题也能理解内容]
[智能识别 3 个核心主题]
[询问配置、展示归纳、生成配图]
Example 3: Custom quantity
用户: 我想要 8 张图,竖屏的,不要封面
Claude: 好的,16:9 竖屏,不生成封面,8 张内容配图。
[将文档归纳为 8 个主题]
[展示归纳结果,用户确认后生成]
🔧 Technical Details
Image Specifications
| Aspect ratio | Resolution | Use Cases |
|---|---|---|
| 16:9 | 2560x1440 (2K) | Presentations, landscape display |
| 3:4 | 1920x2560 | Social media, portrait viewing |
Optional 4K resolution:
- 16:9 → 3840x2160
- 3:4 → 2880x3840
API Calls
- Model:Gemini 2.0 Flash Image Preview (Nano Banana Pro)
- Cost: 1 API call per image
- Speed: average 10-20 seconds/image
Environment Requirements
Required:
pip install google-genai pillow python-dotenv
API Key:
- In
~/.claude/skills/document-illustrator/.envconfiguration - or set the environment variable
GEMINI_API_KEY
📊 Content Summarization Principles
Claude follows these principles when summarizing content:
1. Completeness first
- ✅ All important information will be included
- ✅ Key concepts will not be omitted
- ✅ Retain the core viewpoints of the original text
2. Clear logic
- Segment according to the natural logic of the content
- Group related content together
- Maintain narrative coherence
3. Balanced distribution
- Each image contains a similar amount of information
- Avoid making one image too crowded or too empty
- Adjust according to the importance of the content
4. User controllable
- Show the summarization result to the user for confirmation
- The user can request adjustments
- Start generation only after confirmation
🐛 Troubleshooting
Issue 1: API key error
Error message:
Error: Invalid API key
Solution:
- Check
.envin theGEMINI_API_KEY - Ensure the API key is valid and has not expired
- Get a new key:https://makersuite.google.com/app/apikey
Issue 2: Unsatisfactory content summarization
Issue: The summarized topics do not meet expectations
Solution:
- During the summarization presentation stage, tell Claude your expectations
- Claude will re-summarize and adjust
- Start generation only after you are satisfied and confirm
Issue 3: Image generation failed
Possible causes:
- Network connection issues
- API quota exhausted
- Content too long and exceeds the limit
Solution:
- Check the network connection
- Check the API quota
- Try increasing the number of images (to distribute the content)
💰 Cost Estimation
| Number of images | Number of API calls | Estimated Cost |
|---|---|---|
| No cover + 3 images | 3 times | Low |
| With cover + 5 images | 6 times | Medium |
| With cover + 10 images | 11 times | Relatively high |
Recommendations:
- Short document (<1000 words): 3-5 images
- Medium document (1000-3000 words): 5-7 images
- Long document (>3000 words): 8-10 images
📚 Best Practices
1. Choose a reasonable number of images
Too few:
- Each image carries too much information
- Hard to understand and remember
Too many:
- Content is scattered
- Increases cost and generation time
Recommended:
- Choose based on document length
- Each image covers 1-2 core points
2. Choose the aspect ratio based on use case
16:9 is suitable for:
- PPT presentations
- Website banners
- Video covers
- Blog images (desktop)
3:4 is suitable for:
- Social media (Instagram, Xiaohongshu)
- Mobile articles
- Poster design
- Vertical videos
3. Use of cover images
Scenarios where generating a cover image is recommended:
- Article series (as a unified introduction)
- Social sharing (as a preview image)
- Document homepage (summarizes the full text)
Scenarios where it can be skipped:
- Internal use only
- The number of images is already sufficient
- Want to reduce costs
4. Style selection recommendations
Technical documentation → Gradient glass card style Data reports → Receipt style Tutorial stories → Vector illustration style Product introductions → Gradient glass card style
🔄 How It Works
Traditional approach (deprecated)
[代码] 读取文档 → 识别 ## ### 标题 → 机械切分
↓
依赖特定格式
容易遗漏内容
不够智能
New approach (current implementation)
[Claude] 读取文档 → AI 理解内容 → 智能归纳主题
↓
格式无关
内容完整
用户可控
Core differences:
- ❌ Old approach: relies on code parsing, can only handle standard formats
- ✅ New approach: AI understands the content, can handle any format
🎯 Comparison with other tools
| Feature | Document Illustrator | Traditional PPT tools | AI image generators |
|---|---|---|---|
| Understands document content | ✅ AI intelligent understanding | ❌ Requires manual work | ❌ Requires manual input |
| Format dependency | ✅ Format-agnostic | ❌ Depends on specific formats | ✅ No dependency |
| Content completeness | ✅ Automatic verification | ⚠️ Manual assurance | ❌ Cannot guarantee |
| Batch generation | ✅ Generate multiple at once | ❌ Create one by one | ⚠️ Requires multiple inputs |
| Style consistency | ✅ Automatically maintained | ⚠️ Manual adjustment | ⚠️ Requires repeated prompts |
📞 Get Help
If you have questions or suggestions:
- Ask Claude directly in Claude Code
- View the plan file:
~/.claude/plans/shimmering-tickling-seahorse.md - Check the Skill directory:
~/.claude/skills/document-illustrator/
Let AI help you understand and summarize the content, and generate professional illustrations! ✨