pptx-notes-editor
v1.0.1PowerPoint speaker notes editor for AI 代理s. Use when the user needs to: (1) modify PPT speaker notes, (2) 导出 notes to Markdown, (3) rewrite notes in narrative/concise/verbatim style, (4) unpack/pack PPTX files. Works with Claude Code, OpenClaw, and any 代理 that supports 技能.md.
运行时依赖
安装命令
点击复制技能文档
PPTX Notes Editor 工作流 Decision Tree User 请求 ├── Modify Notes → 1,2,3,4,5,6 ├── 导出 to MD Only → 1,2 → 7 ├── Pack Existing Content Only → 5 (optional 验证 → 6) └── Unpack and View Only → 1
- Unpack PPTX
File Structure:
pptx-unpacked/ ├── ppt/ │ ├── slides/ # Slides │ │ ├── slide1.xml │ │ ├── slide2.xml │ │ └── _rels/ # Slide relationships │ │ ├── slide1.xml.rels │ │ └── slide2.xml.rels │ ├── notesSlides/ # Notes files │ │ ├── notesSlide1.xml │ │ └── notesSlide2.xml │ └── _rels/ │ └── presentation.xml.rels └── [Content_Types].xml
- Confirm Slide-to-Notes M应用ing
导入ant: The numbering of notesSlideN.xml does NOT necessarily cor响应 to PPT page numbers! You MUST confirm via the relationship files.
Method 1: 检查 Precise M应用ing (Recommended) # 检查 which notes file cor响应s to slide N cat pptx-unpacked/ppt/slides/_rels/slideN.xml.rels | grep -i "notesSlide"
# Example 输出: # # This means slideN.xml cor响应s to notesSlide2.xml
Method 2: Quick View All M应用ings # 列出 all slide-to-notes cor响应ences for f in pptx-unpacked/ppt/slides/_rels/slide.xml.rels; do slide=$(basename "$f" .xml.rels) notes=$(grep -o 'notesSlide[0-9]\.xml' "$f" | head -1) if [ -n "$notes" ]; then echo "$slide -> $notes" fi done
Edge Cases Slide has no notes: grep returns no 输出, this slide has no notes Notes file exists but no cor响应ing slide: may be orphaned notes, can be ignored
- Read Notes Content
PPTX XML uses these namespace prefixes:
a: - DrawingML namespace (text, shapes) p: - PresentationML namespace (slide structure) r: - Relationships namespace
Notes text is inside tags.
Method 1: Read Page by Page # 列出 all notes files ls pptx-unpacked/ppt/notesSlides/
# Use file reading 工具 to read individual notes file # Notes text is in tags
Method 2: Batch 提取 All Notes Text # 提取 text from all notes files (macOS compatible) grep -oh '[^<]' pptx-unpacked/ppt/notesSlides/.xml | sed 's/\([^<]\)<\/a:t>/\1/g' | head -50
Method 3: 提取 Single Page Notes by File # 提取 all text from notesSlide2.xml (macOS compatible) grep -oh '[^<]' pptx-unpacked/ppt/notesSlides/notesSlide2.xml | sed 's/\([^<]\)<\/a:t>/\1/g'
Handling XML Escaped Characters
Notes text may contAIn these escape sequences:
< → < > → > & → & " → "
Decode with sed:
sed 's/<//g; s/&/\&/g; s/"/"/g'
- Rewrite in Narrative Style
Present the user with the following choices before 启动ing:
Page Range Selection:
All pages Only pages without notes Only pages with existing notes Custom range (user 输入s e.g. "1-5,8,10-12")
Notes Style Selection:
Narrative style (storytelling, conversational, with beginning/development/命令行工具max/conclusion) Concise bullet points (distill key in格式化ion, brief and powerful) Verbatim script (complete spoken script that can be read aloud directly) Custom style (user describes desired style)
Language Selection (optional):
Keep original language Chinese English Step 1: Read through entire PPT content (build global 上下文)
Before modifying page by page, you MUST read through all slides to build global 上下文:
# Batch 提取 text summary from all slides (macOS compatible) for f in pptx-unpacked/ppt/slides/slide.xml; do slide=$(basename "$f" .xml) echo "=== $slide ===" grep -oh '[^<]' "$f" | sed 's/\([^<]\)<\/a:t>/\1/g' echo "" done
After reading, present a global overview to the user:
[PPT Global Overview] Total: X pages, Theme: xxx Page 1: Opening - xxx Page 2: Background - xxx Page 3: Core argument - xxx ... Page X: Summary - xxx
Narrative arc: xxx → xxx → xxx
Purpose of reading through:
Understand the overall narrative arc and 记录ical structure Know each page's 角色 (设置up, core argument