SKILL.md
唯讀
名稱
ai-slides
描述
使用 AI 從大綱到精美投影片,完整生成簡報
版本
1.0
AI 投影片技能
概述
此技能可讓 AI 驅動的簡報生成。提供主題或大綱,即可獲得結構完整、內容豐富且格式精美的完整簡報。
使用方式
- 提供主題、大綱或粗略筆記
- 指定聽眾與簡報長度
- 我將生成完整的簡報
範例提示:
- 「建立一份關於機器學習的 10 頁投影片」
- 「為 SaaS 新創公司生成一份募資簡報」
- 「製作關於網路安全基礎的訓練投影片」
- 「根據這份資料製作季度檢討簡報」
領域知識
簡報結構
# 有效的簡報結構
structure:
- title_slide:
title: "清晰、有吸引力的標題"
subtitle: "背景或標語"
author: "講者姓名"
- agenda:
items: 3-5 個主要主題
- introduction:
hook: "吸引注意的開場"
context: "為什麼這很重要"
- main_content:
sections: 3-5 個關鍵重點
each_section:
- heading
- 3-5 個項目符號或視覺元素
- supporting data
- conclusion:
summary: "重點摘要"
call_to_action: "下一步行動"
- closing:
thank_you: true
contact_info: true
qa_prompt: true
內容生成模式
def generate_presentation(topic, audience, slide_count=10):
"""AI 驅動的簡報生成。"""
# 1. 生成大綱
outline = generate_outline(topic, slide_count)
# 2. 展開每個章節
slides = []
for section in outline:
slide_content = expand_section(section, audience)
slides.append(slide_content)
# 3. 加入視覺建議
for slide in slides:
slide['visuals'] = suggest_visuals(slide['content'])
# 4. 格式化為 Marp Markdown
presentation = format_as_marp(slides)
return presentation
def generate_outline(topic, count):
"""生成簡報大綱。"""
# 典型結構
outline = [
{'type': 'title', 'title': topic},
{'type': 'agenda'},
# 主要內容(60% 的投影片)
# ... 內容投影片
{'type': 'summary'},
{'type': 'closing'}
]
return outline
Marp 輸出
def format_as_marp(slides):
"""將投影片轉換為 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
範例:生成技術演講
topic = "Docker 入門"
audience = "剛接觸容器的新手開發者"
slides = 10
# 生成的簡報
presentation = """---
marp: true
theme: gaia
paginate: true
---
<!-- _class: lead -->
# Docker 入門
容器化簡單上手
---
# 議程
1. 什麼是 Docker?
2. 核心概念
3. 快速入門
4. 最佳實務
5. 示範
---
# 什麼是 Docker?
- 用於打包應用程式的容器平台
- 輕量級 VM 替代方案
- 「一次建置,隨處執行」
- 1500 萬以上開發者,700 萬以上應用程式
---
# 為什麼要用容器?
| VM | 容器 |
|-----|------------|
| GB 大小 | MB 大小 |
| 數分鐘啟動 | 數秒啟動 |
| 完整作業系統 | 共享核心 |
---
# 核心概念
- **映像檔 (Image)**:藍圖/範本
- **容器 (Container)**:執行中的實例
- **Dockerfile**:建置指令
- **登錄檔 (Registry)**:映像檔儲存庫(Docker Hub)
---
# 快速入門
```bash
## 拉取映像檔
docker pull nginx
## 執行容器
docker run -p 8080:80 nginx
## 列出容器
docker ps
你的第一個 Dockerfile
FROM node:18
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "start"]
最佳實務
- 使用官方基礎映像檔
- 盡量減少層數
- 不要以 root 執行
- 使用 .dockerignore
- 多階段建置
總結
✅ Docker 簡化部署流程
✅ 容器輕量且快速
✅ 容易上手
✅ 業界標準
<!-- _class: lead -->
有問題嗎?
資源:docs.docker.com
"""
### 最佳實務
1. **了解你的聽眾**:調整複雜度與範例
2. **一頁一個重點**:保持專注
3. **6x6 法則**:最多 6 個項目,每個項目最多 6 個字
4. **視覺優先**:建議圖片/圖表
5. **強而有力的開場與結尾**:吸引注意與行動呼籲
### 資源
- [Marp](https://marp.app/) - Markdown 簡報
- [Slidev](https://sli.dev/) - Vue 驅動的投影片
- [reveal.js](https://revealjs.com/) - HTML 簡報






