🎤 Claw Presenter — Prepare Presentation Narration
Converts PPT/PPTX/PDF files into a ready-to-present package: per-slide images + narration scripts.
What This Skill Does
Two jobs only:
- 1. Split — Convert each slide/page into a PNG image
- Script — Generate a narration script for each slide
Output is a folder that Claw Body can load for presentation playback with digital avatar narration.
Works With Claw Body
This skill is designed to pair with the claw-body skill (digital avatar). The workflow:
- 1. Claw Presenter (this skill) → parses PPT/PDF, generates slide images + narration scripts
- Claw Body → loads the output folder, displays slides with the digital avatar narrating each page
Typical usage:
- 1. User: "帮我准备 xxx.pptx 的讲解稿" → triggers claw-presenter
- After preparation is done, user: "讲解 presentations/xxx" → triggers claw-body presentation mode
⚠️ Make sure the claw-body skill is also installed if you want avatar-powered presentation playback.
When To Use
When user says anything like:
- - "帮我准备PPT讲解稿"
- "准备讲解 xxx.pptx"
- "帮我准备演讲稿"
- "生成PPT演讲词"
- "prepare presentation for xxx.pdf"
- "生成演讲词"
- "准备讲稿"
Do NOT use this skill when user just says "讲PPT" without preparation — that implies they want to present, and they should use Claw Body's presentation mode with an already-prepared folder.
Step 0: Get the File
If user didn't provide a file path, ask:
"请告诉我PPT/PDF文件的路径,例如 ~/Desktop/我的演讲.pptx"
Wait for user to provide the path before proceeding.
Step 1: Parse the File
Run the parse script to extract slides and text:
CODEBLOCK0
This creates:
CODEBLOCK1
Step 2: Generate Narration Scripts
After parsing, read presentation.json. For each slide:
- - If
slide.script is already filled (from speaker notes) → keep it, but optionally polish - If
slide.script is empty → generate natural narration based on slide.title and INLINECODE4
Style Guidelines
Ask the user (if not specified):
- - 风格: 正式汇报 / 轻松分享 / 教学讲解 / 幽默风趣
- 受众: 老板/领导 / 同事 / 客户 / 学生
- 语言: 中文 / English / 跟随原文
- 时长: 简短(每页15-30秒)/ 标准(30-60秒)/ 详细(1-2分钟)
Writing Good Narration
- - Open naturally: "首先我们来看..." / "接下来..."
- Don't just read the slide — explain, add context, connect to previous slide
- Keep transitions smooth between slides
- Match the style throughout
Step 3: Save the Scripts
After generating all scripts, update presentation.json — fill in the script field for each slide, then write back:
CODEBLOCK2
Step 4: Confirm with User
Show a summary:
📊 演讲稿准备完成!
- - 文件: xxx.pptx
- 共 12 页,其中 3 页使用了原始备注,9 页已生成演讲词
- 风格: 轻松分享
- 输出目录: presentations/xxx/
你可以:
- - 预览/修改某页的演讲词
- 在 Claw Body 中说"讲解 presentations/xxx" 开始演讲
- 或直接在这里文字预览
Output Format
INLINECODE7 structure:
CODEBLOCK3
Setup
Run the setup script to install all dependencies:
CODEBLOCK4
Or install manually:
Python Packages
CODEBLOCK5
System Dependencies
poppler (required — converts PDF to images):
| Platform | Command |
|---|
| macOS (Homebrew) | INLINECODE8 |
| Debian / Ubuntu |
sudo apt-get install -y poppler-utils |
| Fedora / RHEL |
sudo dnf install -y poppler-utils |
| Arch |
sudo pacman -S poppler |
LibreOffice (optional — high-fidelity PPTX→image conversion):
| Platform | Command |
|---|
| macOS (Homebrew) | INLINECODE12 |
| Debian / Ubuntu |
sudo apt-get install -y libreoffice |
| Other |
libreoffice.org/download |
Without LibreOffice, PPTX slides will fall back to simple text rendering (lower quality images).
Verify Installation
CODEBLOCK6
🎤 Claw Presenter — 准备演示讲解稿
将PPT/PPTX/PDF文件转换为可直接演示的包:每页图像 + 讲解脚本。
该技能的功能
仅两项任务:
- 1. 拆分 — 将每张幻灯片/页面转换为PNG图像
- 脚本 — 为每张幻灯片生成讲解脚本
输出是一个文件夹,Claw Body 可加载该文件夹,配合数字人讲解进行演示播放。
与 Claw Body 配合使用
该技能设计为与 claw-body 技能(数字人)配合使用。工作流程:
- 1. Claw Presenter(本技能)→ 解析PPT/PDF,生成幻灯片图像 + 讲解脚本
- Claw Body → 加载输出文件夹,显示幻灯片并由数字人讲解每页
典型用法:
- 1. 用户:帮我准备 xxx.pptx 的讲解稿 → 触发 claw-presenter
- 准备完成后,用户:讲解 presentations/xxx → 触发 claw-body 演示模式
⚠️ 如需使用数字人进行演示播放,请确保同时安装了 claw-body 技能。
何时使用
当用户说出类似以下内容时:
- - 帮我准备PPT讲解稿
- 准备讲解 xxx.pptx
- 帮我准备演讲稿
- 生成PPT演讲词
- prepare presentation for xxx.pdf
- 生成演讲词
- 准备讲稿
当用户仅说讲PPT而未要求准备时,请勿使用本技能 — 这意味着用户想要直接演示,应使用 Claw Body 的演示模式加载已准备好的文件夹。
第0步:获取文件
如果用户未提供文件路径,请询问:
请告诉我PPT/PDF文件的路径,例如 ~/Desktop/我的演讲.pptx
等待用户提供路径后再继续。
第1步:解析文件
运行解析脚本以提取幻灯片和文本:
bash
python3 /scripts/parse-presentation.py
这将创建:
/presentations//
presentation.json — 元数据、每页文本、备注
slides/
001.png, 002.png, ...
第2步:生成讲解脚本
解析后,读取 presentation.json。对于每张幻灯片:
- - 如果 slide.script 已填写(来自演讲者备注)→ 保留,但可选择性润色
- 如果 slide.script 为空 → 根据 slide.title 和 slide.content 生成自然讲解
风格指南
询问用户(如未指定):
- - 风格: 正式汇报 / 轻松分享 / 教学讲解 / 幽默风趣
- 受众: 老板/领导 / 同事 / 客户 / 学生
- 语言: 中文 / English / 跟随原文
- 时长: 简短(每页15-30秒)/ 标准(30-60秒)/ 详细(1-2分钟)
撰写优质讲解词
- - 自然开场:首先我们来看... / 接下来...
- 不要仅照读幻灯片 — 进行解释、补充背景、连接上一页
- 保持页面之间的过渡流畅
- 全程保持风格一致
第3步:保存脚本
生成所有脚本后,更新 presentation.json — 为每张幻灯片填写 script 字段,然后写回:
python
读取、更新脚本、写回
import json
with open(
/presentation.json, r) as f:
data = json.load(f)
for slide in data[slides]:
if not slide[script]:
slide[script] = <你生成的讲解词>
with open(/presentation.json, w) as f:
json.dump(data, f, ensure_ascii=False, indent=2)
第4步:向用户确认
显示摘要:
📊 演讲稿准备完成!
- - 文件: xxx.pptx
- 共 12 页,其中 3 页使用了原始备注,9 页已生成演讲词
- 风格: 轻松分享
- 输出目录: presentations/xxx/
你可以:
- - 预览/修改某页的演讲词
- 在 Claw Body 中说讲解 presentations/xxx 开始演讲
- 或直接在这里文字预览
输出格式
presentation.json 结构:
json
{
source: filename.pptx,
total_pages: 12,
output_dir: /path/to/presentations/filename,
slides: [
{
page: 1,
title: 封面,
content: [标题文字, 副标题],
notes: 原始备注,
has_notes: true,
image: slides/001.png,
script: 各位好,今天我来跟大家分享...
}
]
}
安装配置
运行安装脚本以安装所有依赖:
bash
bash /setup.sh
或手动安装:
Python 包
bash
pip3 install python-pptx Pillow pdf2image pdfplumber
系统依赖
poppler(必需 — 将PDF转换为图像):
| 平台 | 命令 |
|---|
| macOS (Homebrew) | brew install poppler |
| Debian / Ubuntu |
sudo apt-get install -y poppler-utils |
| Fedora / RHEL | sudo dnf install -y poppler-utils |
| Arch | sudo pacman -S poppler |
LibreOffice(可选 — 高保真PPTX→图像转换):
| 平台 | 命令 |
|---|
| macOS (Homebrew) | brew install --cask libreoffice |
| Debian / Ubuntu |
sudo apt-get install -y libreoffice |
| 其他 | libreoffice.org/download |
如未安装 LibreOffice,PPTX 幻灯片将回退为简单文本渲染(图像质量较低)。
验证安装
bash
python3 -c import pptx; print(python-pptx ✅)
python3 -c from PIL import Image; print(Pillow ✅)
python3 -c from pdf2image import convertfrompath; print(pdf2image ✅)
which pdftoppm && echo poppler ✅
which soffice && echo LibreOffice ✅ || echo LibreOffice ❌ (可选)