document-illustrator

op7418/document-illustrator-skill · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/op7418/document-illustrator-skill --skill document-illustrator
0 commentsdiscussion
summary

AI-powered illustration generation that analyzes document content and creates styled images for each key topic.

  • Automatically extracts core themes from any document format (Markdown, plain text, PDF) without requiring specific structure
  • Offers three visual styles: gradient glassmorphism, ticket/ticket-stub design, and flat vector illustration
  • Supports flexible image ratios (16:9 landscape or 3:4 portrait) and optional cover image generation
  • Displays归纳 results for user confirmation
skill.md

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:9 2560x1440 (2K) 演示文稿、横屏展示
3:4 1920x2560 社交媒体、竖屏查看

可选 4K 分辨率:

  • 16:9 → 3840x2160
  • 3:4 → 2880x3840

API 调用

  • 模型:Gemini 2.0 Flash Image Preview (Nano Banana Pro)
  • 成本:每张图片 = 1 次 API 调用
  • 速度:平均 10-20 秒/张

环境要求

必需

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. 确认满意后再开始生成

问题 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 帮你理解和归纳内容,生成专业配图!

how to use document-illustrator

How to use document-illustrator on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add document-illustrator
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/op7418/document-illustrator-skill --skill document-illustrator

The skills CLI fetches document-illustrator from GitHub repository op7418/document-illustrator-skill and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/document-illustrator

Reload or restart Cursor to activate document-illustrator. Access the skill through slash commands (e.g., /document-illustrator) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.861 reviews
  • Dev Jain· Dec 28, 2024

    document-illustrator fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Noor Jackson· Dec 28, 2024

    Registry listing for document-illustrator matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Dev Gupta· Dec 28, 2024

    Useful defaults in document-illustrator — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Dev Mensah· Dec 24, 2024

    I recommend document-illustrator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Chaitanya Patil· Dec 16, 2024

    document-illustrator is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Kabir Mehta· Dec 4, 2024

    Keeps context tight: document-illustrator is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Rahul Santra· Nov 27, 2024

    Keeps context tight: document-illustrator is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • James Harris· Nov 23, 2024

    We added document-illustrator from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Chen Srinivasan· Nov 19, 2024

    I recommend document-illustrator for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Noor Wang· Nov 19, 2024

    document-illustrator reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 61

1 / 7