关于 slide-creator
将文字内容整理为幻灯片大纲并生成 AI 幻灯片图像的 Skill,适合把文章、简报或提纲转为视觉演示,并可按反馈修改单页。
主要功能
- 01提取要点并梳理结构
- 02编写幻灯片大纲与讲述要点
- 03生成图像提示词和幻灯片图像
- 04重新生成或编辑指定幻灯片
- 05批量生成图像
适用场景
- 01将博客文章转为幻灯片
- 02根据文章或简报制作幻灯片
- 03根据反馈重新生成单页
- 04制作风格统一的幻灯片背景
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ roasbeef/ claude-files --skill slide-creator安装后在 Claude Code 中输入/slide-creator确认已加载。
附带文件references/slide-styles.mdscripts/create_slides.py
详细介绍
幻灯片创作器
此技能使用 AI 图像生成将书面内容转换为可视化幻灯片图片。它会分析文本内容、提取要点,并生成适合演示的幻灯片图片。
前提条件
- 必须提供用于图像生成的
nano-banana技能。 - Python 3.10+
- 已安装
google-genai软件包
工作流概览
- 输入:接收内容(博客文章、文章、新闻简报、大纲)
- 分析:提取要点并梳理结构
- 大纲:创建包含标题和演讲要点的幻灯片大纲
- 生成:创建图像提示词并生成幻灯片图片
- 优化:根据反馈重新生成指定幻灯片
根据内容创建幻灯片
步骤 1:分析内容
阅读并分析源内容,识别:
- 主题
- 主要章节或部分
- 需要可视化的重要要点
- 逻辑流程和过渡
步骤 2:创建幻灯片大纲
按以下结构组织演示文稿:
Slide 1: Title slide (topic, subtitle)
Slide 2: Introduction/Problem statement
Slides 3-N: Key points (one concept per slide)
Slide N+1: Conclusion/Summary
Slide N+2: Call to action (optional)
步骤 3:生成图像提示词
为每张幻灯片创建图像提示词,要求:
- 以视觉方式呈现核心概念
- 所有幻灯片的风格保持一致
- 为叠加文字留出适当空间
- 符合所需的宽高比(通常为 16:9)
步骤 4:生成幻灯片图片
使用 nano-banana 技能生成图片:
# Single slide
python ~/.claude/skills/nano-banana/scripts/generate_image.py \
"Professional slide background: [concept], [style], 16:9 aspect, clean with text space" \
slide_01.png --aspect 16:9
# Batch generation
python ~/.claude/skills/nano-banana/scripts/batch_generate.py \
slide_prompts.json ./slides/ --aspect 16:9 --parallel 3
步骤 5:优化
根据反馈重新生成指定幻灯片:
# Edit existing slide
python ~/.claude/skills/nano-banana/scripts/edit_image.py \
slides/slide_03.png "make the colors more vibrant" slides/slide_03_v2.png
幻灯片提示词模式
标题幻灯片
Bold typography-inspired background for [topic] presentation, [style], gradient [colors], modern and professional, 16:9 aspect ratio
概念幻灯片
Visual metaphor for [concept]: [metaphor description], [style], [brand colors], clean composition with space on [left/right] for text overlay, presentation graphic
数据/统计幻灯片
Abstract data visualization representing [metric/trend], infographic style, [colors], clean white background, professional presentation graphic
过渡/章节幻灯片
Section divider for [section name], abstract [theme] imagery, gradient [colors], full bleed background, minimal text space
结论幻灯片
Inspiring background for conclusion: [theme], uplifting atmosphere, [colors], professional, space for summary points
风格预设
预定义的风格预设请参阅 references/slide-styles.md:
- Corporate:专业蓝色、线条简洁、极简
- Creative:大胆配色、动感构图
- Technical:深色主题、代码/电路美学
- Minimalist:留白、低调点缀
- Warm:大地色调、有机形状
批量生成格式
创建 slide_prompts.json 文件:
[
{
"prompt": "Title slide for AI presentation, modern tech aesthetic, blue gradient, bold composition",
"filename": "slide_01_title.png",
"aspect": "16:9"
},
{
"prompt": "Visual metaphor: neural network as interconnected nodes, tech illustration style, blue and purple",
"filename": "slide_02_intro.png",
"aspect": "16:9"
},
{
"prompt": "Growth chart concept, abstract rising bars with glow effect, tech presentation style",
"filename": "slide_03_growth.png",
"aspect": "16:9"
}
]
示例:将博客文章转换为幻灯片
输入博客文章
# The Future of Remote Work
Remote work is transforming how we think about productivity...
## Key Benefits
1. Flexibility
2. Work-life balance
3. Global talent access
## Challenges
- Communication
- Culture building
- Technology needs
## Best Practices
...
生成的幻灯片大纲
1. Title: "The Future of Remote Work"
2. Hook: Remote work transformation visual
3. Benefits: Flexibility metaphor
4. Benefits: Work-life balance visual
5. Benefits: Global connectivity
6. Challenges: Communication barriers
7. Solutions: Best practices overview
8. Conclusion: Future outlook
生成的提示词
[
{"prompt": "Title slide: Future of Remote Work, modern office fading into home workspace, professional blue tones", "filename": "slide_01.png"},
{"prompt": "Remote work transformation: office desk morphing into laptop anywhere, clean illustration style", "filename": "slide_02.png"},
{"prompt": "Flexibility concept: person working from beach, mountain, city cafe montage, lifestyle photography style", "filename": "slide_03.png"}
]
制作优质幻灯片的技巧
- 一致性:在所有提示词中使用相同的风格关键词。
- 文字空间:始终加入“文字空间”或“用于叠加内容的干净区域”。
- 宽高比:标准演示文稿使用 16:9。
- 单一概念:每张幻灯片只可视化一个核心要点。
- 色彩协调:确定一套配色,并在每个提示词中引用。
处理反馈
用户提出修改要求时:
- 指定幻灯片:使用修改后的提示词仅重新生成该幻灯片。
- 更改风格:创建新的提示词,并批量重新生成全部幻灯片。
- 细微编辑:使用 edit_image.py 进行调整。
- 迭代优化:使用 chat_session.py 进行复杂的优化。
输出结构
output_dir/
├── slide_01_title.png
├── slide_02_intro.png
├── slide_03_point1.png
├── slide_04_point2.png
├── slide_05_point3.png
├── slide_06_conclusion.png
└── slide_prompts.json # Save prompts for reference
评论
支持 Markdown