claude-to-im-skill
Bridges a running Claude Code or Codex session to Telegram, Discord, Feishu/Lark, QQ, or WeChat so you can chat with the coding agent from your phone. Covers setting up, starting, stopping, and diagnosing the bridge.
Generates illustrations for documents, articles and notes by analysing their structure, extracting the key points and creating a matching image for each topic. Supports cover images and custom aspect ratios.
Claude Code
$ npx -y skills add op7418/document-illustrator-skill --agent claude-code
Codex
$ npx skills add op7418/document-illustrator-skill -a codex
Cursor
$ npx skills add op7418/document-illustrator-skill -a cursor
Gemini CLI
$ npx skills add op7418/document-illustrator-skill -a gemini-cli
GitHub Copilot
$ npx skills add op7418/document-illustrator-skill -a github-copilot
OpenCode
$ npx skills add op7418/document-illustrator-skill -a opencode
Windsurf
$ npx skills add op7418/document-illustrator-skill -a windsurf


基于 AI 智能分析的文档配图生成工具
Document Illustrator 是一个 Claude Code Skill,它能智能理解文档内容,自动归纳核心要点,并为每个主题生成专业配图。无需依赖特定文档格式,AI 会理解内容并生成符合你选择风格的高质量图片。
npx skills add https://github.com/op7418/Document-illustrator-skill
cd ~/.claude/skills/
git clone https://github.com/op7418/Document-illustrator-skill.git
配置 API 密钥(见下方"配置说明"部分)
安装 Python 依赖(见下方"环境要求"部分)
在 Claude Code 中直接告诉 Claude:
帮我为这个文档生成配图:/path/to/document.md
或者:
我想为这篇文章生成一些配图
Claude 会引导你完成整个配图生成流程。
视觉特点:
适用场景:
视觉特点:
适用场景:
视觉特点:
适用场景:
使用 npx(推荐):
npx skills add https://github.com/op7418/Document-illustrator-skill
手动安装:
cd ~/.claude/skills/
git clone https://github.com/op7418/Document-illustrator-skill.git
cd document-illustrator
获取 Gemini API 密钥:Google AI Studio
在 Skill 根目录创建 .env 文件:
cd ~/.claude/skills/document-illustrator
echo "GEMINI_API_KEY=your-api-key-here" > .env
或直接编辑 .env 文件:
GEMINI_API_KEY=your-api-key-here
安全提示:
.env文件包含敏感信息,请勿提交到版本控制系统
cd ~/.claude/skills/document-illustrator
pip install google-genai pillow python-dotenv
或使用 pip3:
pip3 install google-genai pillow python-dotenv
运行测试命令:
python3 scripts/generate_single_image.py --help
预期输出应显示脚本的帮助信息,表示安装成功。
这是主要的使用方式,让 Claude 智能处理整个流程。
基本命令:
帮我为这个文档生成配图:~/blog/my-article.md
交互式流程:
选择图片比例
是否生成封面图
指定配图数量
确认内容归纳
生成配图
images/ 文件夹完整示例:
用户: 帮我为 ~/documents/ai-evolution.md 生成配图,用渐变玻璃风格
Claude: 好的,让我先读取这个文档...
[读取并分析文档内容]
检测到文档长度约 3000 字。
请选择图片比例:
1. 16:9 (横屏)
2. 3:4 (竖屏)
用户: 1
Claude: 是否生成封面图?
1. 是
2. 否
用户: 是
Claude: 期望生成多少张内容配图?
建议范围:3-10 张
根据文档内容,推荐生成 5 张
用户: 5
Claude: 📋 内容归纳完成
📄 封面图内容:
"AI 技术演化:从规则到智能"
- 核心概念、演化路径、最佳实践
📚 内容配图(共 5 张):
1. AI 技术的起源
2. 机器学习的突破
3. 深度学习革命
4. 大语言模型时代
5. 未来发展趋势
✓ 所有内容已覆盖,无遗漏
确认开始生成配图吗?(Y/N)
用户: Y
Claude: 🖼️ 开始生成配图...
正在生成封面图...
✓ 已保存: ~/documents/images/cover.png
正在生成第 1/5 张...
✓ 已保存: ~/documents/images/illustration-01.png
...
✨ 完成!共生成 6 张配图
如果你想要更多控制或进行批量处理,可以直接调用 Python 脚本。
单图生成:
python3 scripts/generate_single_image.py \
--title "人工智能的未来" \
--content "AI 技术正在快速发展..." \
--style gradient-glass \
--aspect-ratio 16:9 \
--resolution 2K \
--output ~/output/image.png
参数说明:
--title: 图片标题--content: 图片内容描述--style: 风格(gradient-glass / ticket / vector-illustration)--aspect-ratio: 比例(16:9 / 3:4)--resolution: 分辨率(2K / 4K)--output: 输出文件路径使用渐变玻璃卡片风格,16:9 比例,适合科技博客和演示文稿。
使用票据风格,3:4 比例,适合信息图表和社交媒体分享。

使用矢量插画风格,16:9 比例,适合教育内容和故事叙述。
注意:以上为示例占位符。实际生成的图片效果取决于文档内容和选择的风格。
📄 文档输入
↓
🤖 Claude 读取和理解
↓
💡 AI 智能归纳核心主题
↓
✅ 用户确认内容分配
↓
🎨 调用 Gemini API 生成图片
↓
💾 保存到本地目录
传统方式:
代码解析标题 → 机械切分章节 → 生成配图
↓
❌ 依赖特定格式(## ###)
❌ 容易遗漏非标准内容
❌ 无法理解语义
Document Illustrator:
AI 理解内容 → 智能归纳主题 → 用户确认 → 生成配图
↓
✅ 格式无关,任何文档都能处理
✅ 保证内容完整性
✅ 用户可控,结果透明
核心优势:
document-illustrator/
├── README.md # 项目说明文档(本文件)
├── LICENSE # MIT 许可证
├── SKILL.md # Skill 定义文件(供 Claude Code 使用)
├── .env # API 密钥配置(需自行创建)
├── .gitignore # Git 忽略规则
├── scripts/ # Python 脚本目录
│ ├── generate_illustrations.py # 批量生成脚本(已废弃)
│ └── generate_single_image.py # 单图生成脚本
├── styles/ # 风格提示词目录
│ ├── gradient-glass.md # 渐变玻璃卡片风格
│ ├── ticket.md # 票据风格
│ └── vector-illustration.md # 矢量插画风格
└── examples/ # 示例图片目录(可选)
└── README.md # 示例说明
你可以创建自己的图片风格:
在 styles/ 目录创建新的 .md 文件,例如 my-style.md
编写 Gemini 提示词:
### 提示词
帮我生成一张[描述你的风格]的图片...
[详细的风格要求]
- 配色方案
- 构图规则
- 设计元素
- 视觉效果
scripts/generate_single_image.py 以支持新风格(在 --style 参数中添加新选项)我们欢迎贡献!如果你想为本项目做出贡献:
Fork 本仓库
创建功能分支:
git checkout -b feature/my-new-feature
提交你的更改:
git commit -m "Add: 新功能描述"
推送到分支:
git push origin feature/my-new-feature
创建 Pull Request
贡献类型:
代码规范:
A: 请检查以下几点:
.env 文件中的 GEMINI_API_KEY 拼写正确A: 可以尝试:
A: 使用 --resolution 参数:
2K(默认):16:9 为 2560x1440,3:4 为 1920x25604K:16:9 为 3840x2160,3:4 为 2880x3840注意:4K 图片生成时间更长,API 成本可能更高。
A: 目前推荐通过 Claude Code 逐个处理文档。如果需要批量处理,可以编写自定义脚本循环调用 generate_single_image.py。
A: 每张图片需要调用一次 Gemini API:
具体成本取决于 Google AI 的定价策略,请查看 Gemini API 定价。
A: 可能的原因:
| 项目 | 说明 |
|---|---|
| AI 模型 | gemini-3-pro-image-preview (Nano Banana Pro) |
| 图片格式 | PNG |
| 16:9 分辨率 | 2K (2560x1440) / 4K (3840x2160) |
| 3:4 分辨率 | 2K (1920x2560) / 4K (2880x3840) |
| 支持文档格式 | Markdown, 纯文本, PDF 等(任何 Claude 可读的格式) |
| 平均生成时间 | 10-20 秒/张 |
| Python 版本 | 3.8+ |
| 主要依赖 | google-genai, pillow, python-dotenv |
太少(1-2 张):
太多(15+ 张):
推荐:
16:9 适合:
3:4 适合:
建议生成封面图:
可以不生成封面图:
| 内容类型 | 推荐风格 | 理由 |
|---|---|---|
| 技术文档 | 渐变玻璃卡片 | 现代、科技感强 |
| 数据报告 | 票据风格 | 简洁、信息密度高 |
| 教程故事 | 矢量插画 | 温馨、易于理解 |
| 产品介绍 | 渐变玻璃卡片 | 高端、未来感 |
| 学术论文 | 票据风格 | 专业、严谨 |
| 儿童内容 | 矢量插画 | 可爱、友好 |
本项目采用 MIT 许可证。
你可以自由地:
前提是:
本项目由以下技术驱动:
特别感谢所有为本项目做出贡献的开发者和用户。
如有问题或建议,欢迎通过以上方式联系!
让 AI 帮你理解和归纳内容,生成专业配图! ✨
Bridges a running Claude Code or Codex session to Telegram, Discord, Feishu/Lark, QQ, or WeChat so you can chat with the coding agent from your phone. Covers setting up, starting, stopping, and diagnosing the bridge.
Adds variety-show style effects such as caption text, cards, name bars and chapter titles to interview and podcast videos. It analyzes the subtitles, proposes effects for approval, then renders the video in a chosen visual theme.
A Claude Code and Codex skill that turns articles, notes, chart screenshots, and product or work material into labeled explanatory illustrations and restyled charts with Chinese labels. It is meant for a central image in social cards, slides, and documents.
Gives Claude Code access to the prompts.chat library, letting you search, retrieve and improve AI prompt templates, and find and install Agent Skills from its registry.
A Claude Code skill for generating editable PPTX presentations and slides from a workflow, with reusable brand, style, layout, and deck workspaces, native charts, speaker notes, and template filling.
Gives AI agents control over Word, Excel and PowerPoint files, with skills for building .docx reports, academic papers, Excel dashboards and Morph-style animated slides.
A skill that builds animation-rich HTML presentations from scratch or converts PowerPoint files to web slides. Useful for anyone turning a deck into a web presentation.
Generates illustrations for documents, articles and notes by analysing their structure, extracting the key points and creating a matching image for each topic. Supports cover images and custom aspect ratios. Install it with the command on its page. It includes Document-illustrator-skill. Its skills do not fire on their own yet. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it