🚀 快速安装
复制以下命令并运行,立即安装此 Skill:
npx skills add https://skills.sh/claude-office-skills/skills/ai-slides
💡 提示:需要 Node.js 和 NPM
AI 幻灯片技能 (AI Slides Skill)
概述 (Overview)
此技能支持 AI 驱动的演示文稿生成。提供一个主题或大纲,即可获得一份完整的、结构清晰、内容专业的演示文稿。
使用方法 (How to Use)
- 提供主题、大纲或粗略笔记 (Provide a topic, outline, or rough notes)
- 指定受众和演示文稿时长 (Specify audience and presentation length)
- 我将生成一份完整的演示文稿 (I’ll generate a complete presentation)
示例提示 (Example prompts):
- “创建一个关于机器学习的 10 页幻灯片”
- “为一家 SaaS 初创公司生成一份融资演示文稿”
- “制作关于网络安全基础的培训幻灯片”
- “根据这些数据制作一份季度回顾演示文稿”
领域知识 (Domain Knowledge)
演示文稿结构 (Presentation Structure)
# 有效的演示文稿结构 (Effective presentation structure)
structure:
- title_slide:
title: "清晰、引人入胜的标题 (Clear, compelling title)"
subtitle: "背景或标语 (Context or tagline)"
author: "演讲者姓名 (Presenter name)"
- agenda:
items: 3-5 个主要主题 (3-5 main topics)
- introduction:
hook: "吸引人的开场 (Attention-grabbing opening)"
context: "为何重要 (Why this matters)"
- main_content:
sections: 3-5 个关键点 (3-5 key points)
each_section:
- 标题 (heading)
- 3-5 个要点或视觉元素 (3-5 bullets or visual)
- 支持数据 (supporting data)
- conclusion:
summary: "关键要点 (Key takeaways)"
call_to_action: "下一步行动 (What to do next)"
- closing:
thank_you: true
contact_info: true
qa_prompt: true
内容生成模式 (Content Generation Pattern)
def generate_presentation(topic, audience, slide_count=10):
"""AI 驱动的演示文稿生成 (AI-powered presentation generation)."""
# 1. 生成大纲 (Generate outline)
outline = generate_outline(topic, slide_count)
# 2. 扩展每个部分 (Expand each section)
slides = []
for section in outline:
slide_content = expand_section(section, audience)
slides.append(slide_content)
# 3. 添加视觉建议 (Add visuals suggestions)
for slide in slides:
slide['visuals'] = suggest_visuals(slide['content'])
# 4. 格式化为 Marp Markdown (Format as Marp markdown)
presentation = format_as_marp(slides)
return presentation
def generate_outline(topic, count):
"""生成演示文稿大纲 (Generate presentation outline)."""
# 典型结构 (Typical structure)
outline = [
{'type': 'title', 'title': topic},
{'type': 'agenda'},
# 主要内容(60% 的幻灯片)(Main content - 60% of slides)
# ... 内容幻灯片 (content slides)
{'type': 'summary'},
{'type': 'closing'}
]
return outline
Marp 输出 (Marp Output)
def format_as_marp(slides):
"""将幻灯片转换为 Marp Markdown (Convert slides to Marp markdown)."""
marp = """---
marp: true
theme: gaia
paginate: true
---
"""
for slide in slides:
if slide['type'] == 'title':
marp += f"""<!-- _class: lead -->
# {slide['title']}
{slide.get('subtitle', '')}
---
"""
elif slide['type'] == 'content':
marp += f"""# {slide['heading']}
"""
for point in slide['points']:
marp += f"- {point}\n"
marp += "\n---\n\n"
return marp
示例:生成技术演讲 (Example: Generate Tech Talk)
topic = "Docker 简介 (Introduction to Docker)"
audience = "容器技术新手开发者 (Developers new to containers)"
slides = 10
# 生成的演示文稿 (Generated presentation)
presentation = """---
marp: true
theme: gaia
paginate: true
---
<!-- _class: lead -->
# Docker 简介 (Introduction to Docker)
容器化变得简单 (Containerization Made Simple)
---
# 议程 (Agenda)
1. 什么是 Docker? (What is Docker?)
2. 核心概念 (Core Concepts)
3. 入门指南 (Getting Started)
4. 最佳实践 (Best Practices)
5. 演示 (Demo)
---
# 什么是 Docker? (What is Docker?)
- 用于打包应用程序的容器平台 (Container platform for packaging applications)
- 虚拟机的轻量级替代方案 (Lightweight alternative to VMs)
- “一次构建,随处运行” ("Build once, run anywhere")
- 1500万+ 开发者,700万+ 应用 (15M+ developers, 7M+ applications)
---
# 为什么需要容器? (Why Containers?)
| 虚拟机 (VMs) | 容器 (Containers) |
|-----|------------|
| GB 级大小 (GB size) | MB 级大小 (MB size) |
| 启动需要数分钟 (Minutes to start) | 启动需要数秒 (Seconds to start) |
| 完整操作系统 (Full OS) | 共享内核 (Shared kernel) |
---
# 核心概念 (Core Concepts)
- **镜像 (Image)**:蓝图/模板 (Blueprint/template)
- **容器 (Container)**:运行实例 (Running instance)
- **Dockerfile**:构建指令 (Build instructions)
- **仓库 (Registry)**:镜像存储(Docker Hub)(Image storage - Docker Hub)
---
# 入门指南 (Getting Started)
```bash
# 拉取镜像 (Pull an image)
docker pull nginx
# 运行容器 (Run a container)
docker run -p 8080:80 nginx
# 列出容器 (List containers)
docker ps
你的第一个 Dockerfile (Your First Dockerfile)
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "start"]
最佳实践 (Best Practices)
- 使用官方基础镜像 (Use official base images)
- 最小化层数 (Minimize layers)
- 不要以 root 身份运行 (Don’t run as root)
- 使用 .dockerignore
- 多阶段构建 (Multi-stage builds)
总结 (Summary)
✅ Docker 简化了部署 (simplifies deployment)
✅ 容器轻量且快速 (lightweight & fast)
✅ 易于上手 (Easy to get started)
✅ 行业标准 (Industry standard)
问题?(Questions?)
资源:docs.docker.com
“””
## 最佳实践 (Best Practices)
1. **了解你的受众 (Know Your Audience)**:根据受众调整复杂度和示例 (Tailor complexity and examples)
2. **一页一概念 (One Idea Per Slide)**:保持聚焦 (Keep focused)
3. **6x6 规则 (6x6 Rule)**:最多 6 个项目符号,每个 6 个词 (Max 6 bullets, 6 words each)
4. **视觉优先 (Visual First)**:建议图像/图表 (Suggest images/diagrams)
5. **强有力的开场和结尾 (Strong Opening/Closing)**:吸引注意力和行动号召 (Hook and call-to-action)
## 资源 (Resources)
- [Marp](https://marp.app/) - Markdown 演示文稿 (Markdown presentations)
- [Slidev](https://sli.dev/) - Vue 驱动的幻灯片 (Vue-powered slides)
- [reveal.js](https://revealjs.com/) - HTML 演示文稿 (HTML presentations)
📄 原始文档
完整文档(英文):
https://skills.sh/claude-office-skills/skills/ai-slides
💡 提示:点击上方链接查看 skills.sh 原始英文文档,方便对照翻译。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

评论(0)