安装方式
手动下载安装
下载 ZIP 后解压到技能目录即可安装。若在桌面客户端 WebView中直接下载出现异常,本站会改为提示页 + 原始链接,请按页内说明操作。
下载 ZIP (oss-anthropic-pptx-v1.0.0.zip)触发指令
/pptx
跨平台安装指引
该技能声明兼容以下 1 个平台,将 ZIP 解压到对应目录即可被识别。
unzip oss-anthropic-pptx-v1.0.0.zip -d ~/.claude/skills/
mkdir -p 创建;启用 Skill 后请重启对应 Agent 让配置生效。
使用指南
PowerPoint(PPTX)技能
速查
| 任务 | 做法 |
|------|------|
| 读取/分析内容 | python -m markitdown presentation.pptx |
| 按模板编辑或创建 | 阅读上游 editing.md |
| 从零创建 | 阅读上游 pptxgenjs.md |
读取内容
# 提取文本
python -m markitdown presentation.pptx
# 视觉缩略图总览
python scripts/thumbnail.py presentation.pptx
# 解包查看原始 XML
python scripts/office/unpack.py presentation.pptx unpacked/
编辑工作流
完整步骤见上游 editing.md。
- 用
thumbnail.py分析模板版式 - 解包 → 改幻灯片 → 改内容 → 清理 → 再打包
从零创建
完整步骤见上游 pptxgenjs.md。
无模板或参考稿时使用。
设计思路
不要做无聊幻灯片。 白底黑字项目符号很难给人留下印象。每张片子都可从下列方向取材。
动手前
- 大胆且贴合主题的配色:换到别的主题也「还能用」说明不够专精。
- 主次分明:一种主色占 60–70% 视觉权重,1–2 个辅色 + 一个强调色;不要平均分配。
- 深浅对比:标题/结尾页用深色,内容页浅色(「三明治」结构);或全程深色走高端路线。
- 统一视觉母题:选一个元素贯穿全稿——圆角图框、彩色圆底图标、单侧粗边条等。
配色参考(十六进制)
| 主题 | 主色 | 辅色 | 强调 |
|------|------|------|------|
| Midnight Executive | 1E2761 | CADCFC | FFFFFF |
| Forest & Moss | 2C5F2D | 97BC62 | F5F5F5 |
| Coral Energy | F96167 | F9E795 | 2F3C7E |
| Warm Terracotta | B85042 | E7E8D1 | A7BEAE |
| Ocean Gradient | 065A82 | 1C7293 | 21295C |
| Charcoal Minimal | 36454F | F2F2F2 | 212121 |
| Teal Trust | 028090 | 00A896 | 02C39A |
| Berry & Cream | 6D2E46 | A26769 | ECE2D0 |
| Sage Calm | 84B59F | 69A297 | 50808E |
| Cherry Bold | 990011 | FCF6F5 | 2F3C7E |
每一页
每页都要有视觉元素——图、表、图标或形状;纯文字页易被遗忘。
版式示例:
- 双栏(左文右图)
- 图标 + 标题 + 说明(图标放彩色圆里)
- 2×2 / 2×3 网格
- 半幅通栏图 + 叠字
数据展示: 大号数字(60–72pt)+ 小标签;对比栏;时间线/流程箭头。
点缀: 小标题旁彩色圆图标;关键数据用斜体强调。
字体
避免通篇 Arial。标题有个性,正文干净。
| 标题字体 | 正文字体 | |----------|----------| | Georgia | Calibri | | Arial Black | Arial | | Calibri | Calibri Light | | Cambria | Calibri | | Trebuchet MS | Calibri | | Impact | Arial | | Palatino | Garamond | | Consolas | Calibri |
| 元素 | 字号 | |------|------| | 标题 | 36–44pt 粗体 | | 小节标题 | 20–24pt 粗体 | | 正文 | 14–16pt | | 说明 | 10–12pt 略浅 |
留白
- 边距至少约 0.5 英寸
- 内容块间距 0.3–0.5 英寸
- 不要塞满每一寸
常见错误(避免)
- 每页版式雷同
- 正文居中(标题可居中,段落请左对齐)
- 标题与正文字号差太小(标题至少约 36pt)
- 默认蓝灰「通用科技风」
- 间距随意、一页精修其余敷衍
- 纯标题+项目符号无配图
- 对齐形状时忽略文本框内边距(可设
margin: 0或微调形状位置) - 图标/文字与背景对比不足
- 标题下加装饰线(典型「AI 生成感」);用留白或色块区分即可
质检(必做)
默认认为有问题,你的任务是把它找出来。
第一版很少一次过关。把质检当「找 bug」,不是走过场。若第一遍「零问题」,多半查得不够细。
内容质检
python -m markitdown output.pptx
检查缺字、错字、顺序。
用模板时,检查占位符是否残留:
python -m markitdown output.pptx | grep -iE "xxxx|lorem|ipsum|this.*(page|slide).*layout"
有输出则必须修完再算成功。
视觉质检
⚠️ 尽量用子代理——哪怕只有 2–3 页。自己盯代码容易「看见预期而非事实」。
先转图片(见下文),再用类似提示词让模型看图:
- 重叠(字压线、线穿字)
- 文字溢出或被裁切
- 装饰线按单行标题画但标题折成两行
- 脚注与正文打架
- 间距过密(<0.3")或疏密不均
- 距页边 <0.5"
- 多栏不对齐
- 对比度不足(浅灰字配奶油底等)
- 文本框过窄导致过度折行
- 占位内容未删
验证闭环
- 生成 → 转图 → 检查
- 列出问题(若写「无」,再更苛刻查一遍)
- 修改
- 只重验改过的页——一改可能带出新问题
- 重复直到一整轮无新问题
至少完成一轮「修改 → 再验」前,不要宣称完成。
转为图片
python scripts/office/soffice.py --headless --convert-to pdf output.pptx
pdftoppm -jpeg -r 150 output.pdf slide
得到 slide-01.jpg 等。
只重渲某几页:
pdftoppm -jpeg -r 150 -f N -l N output.pdf slide-fixed
依赖
pip install "markitdown[pptx]"— 文本提取pip install Pillow— 缩略图网格npm install -g pptxgenjs— 从零生成- LibreOffice(
soffice)— 转 PDF(沙箱环境可用scripts/office/soffice.py) - Poppler(
pdftoppm)— PDF 转图
许可证以上游 LICENSE.txt 为准。
# PPTX Skill
## Quick Reference
| Task | Guide |
|------|-------|
| Read/analyze content | `python -m markitdown presentation.pptx` |
| Edit or create from template | Read [editing.md](editing.md) |
| Create from scratch | Read [pptxgenjs.md](pptxgenjs.md) |
---
## Reading Content
```bash
# Text extraction
python -m markitdown presentation.pptx
# Visual overview
python scripts/thumbnail.py presentation.pptx
# Raw XML
python scripts/office/unpack.py presentation.pptx unpacked/
```
---
## Editing Workflow
**Read [editing.md](editing.md) for full details.**
1. Analyze template with `thumbnail.py`
2. Unpack → manipulate slides → edit content → clean → pack
---
## Creating from Scratch
**Read [pptxgenjs.md](pptxgenjs.md) for full details.**
Use when no template or reference presentation is available.
---
## Design Ideas
**Don't create boring slides.** Plain bullets on a white background won't impress anyone. Consider ideas from this list for each slide.
### Before Starting
- **Pick a bold, content-informed color palette**: The palette should feel designed for THIS topic. If swapping your colors into a completely different presentation would still "work," you haven't made specific enough choices.
- **Dominance over equality**: One color should dominate (60-70% visual weight), with 1-2 supporting tones and one sharp accent. Never give all colors equal weight.
- **Dark/light contrast**: Dark backgrounds for title + conclusion slides, light for content ("sandwich" structure). Or commit to dark throughout for a premium feel.
- **Commit to a visual motif**: Pick ONE distinctive element and repeat it — rounded image frames, icons in colored circles, thick single-side borders. Carry it across every slide.
### Color Palettes
Choose colors that match your topic — don't default to generic blue. Use these palettes as inspiration:
| Theme | Primary | Secondary | Accent |
|-------|---------|-----------|--------|
| **Midnight Executive** | `1E2761` (navy) | `CADCFC` (ice blue) | `FFFFFF` (white) |
| **Forest & Moss** | `2C5F2D` (forest) | `97BC62` (moss) | `F5F5F5` (cream) |
| **Coral Energy** | `F96167` (coral) | `F9E795` (gold) | `2F3C7E` (navy) |
| **Warm Terracotta** | `B85042` (terracotta) | `E7E8D1` (sand) | `A7BEAE` (sage) |
| **Ocean Gradient** | `065A82` (deep blue) | `1C7293` (teal) | `21295C` (midnight) |
| **Charcoal Minimal** | `36454F` (charcoal) | `F2F2F2` (off-white) | `212121` (black) |
| **Teal Trust** | `028090` (teal) | `00A896` (seafoam) | `02C39A` (mint) |
| **Berry & Cream** | `6D2E46` (berry) | `A26769` (dusty rose) | `ECE2D0` (cream) |
| **Sage Calm** | `84B59F` (sage) | `69A297` (eucalyptus) | `50808E` (slate) |
| **Cherry Bold** | `990011` (cherry) | `FCF6F5` (off-white) | `2F3C7E` (navy) |
### For Each Slide
**Every slide needs a visual element** — image, chart, icon, or shape. Text-only slides are forgettable.
**Layout options:**
- Two-column (text left, illustration on right)
- Icon + text rows (icon in colored circle, bold header, description below)
- 2x2 or 2x3 grid (image on one side, grid of content blocks on other)
- Half-bleed image (full left or right side) with content overlay
**Data display:**
- Large stat callouts (big numbers 60-72pt with small labels below)
- Comparison columns (before/after, pros/cons, side-by-side options)
- Timeline or process flow (numbered steps, arrows)
**Visual polish:**
- Icons in small colored circles next to section headers
- Italic accent text for key stats or taglines
### Typography
**Choose an interesting font pairing** — don't default to Arial. Pick a header font with personality and pair it with a clean body font.
| Header Font | Body Font |
|-------------|-----------|
| Georgia | Calibri |
| Arial Black | Arial |
| Calibri | Calibri Light |
| Cambria | Calibri |
| Trebuchet MS | Calibri |
| Impact | Arial |
| Palatino | Garamond |
| Consolas | Calibri |
| Element | Size |
|---------|------|
| Slide title | 36-44pt bold |
| Section header | 20-24pt bold |
| Body text | 14-16pt |
| Captions | 10-12pt muted |
### Spacing
- 0.5" minimum margins
- 0.3-0.5" between content blocks
- Leave breathing room—don't fill every inch
### Avoid (Common Mistakes)
- **Don't repeat the same layout** — vary columns, cards, and callouts across slides
- **Don't center body text** — left-align paragraphs and lists; center only titles
- **Don't skimp on size contrast** — titles need 36pt+ to stand out from 14-16pt body
- **Don't default to blue** — pick colors that reflect the specific topic
- **Don't mix spacing randomly** — choose 0.3" or 0.5" gaps and use consistently
- **Don't style one slide and leave the rest plain** — commit fully or keep it simple throughout
- **Don't create text-only slides** — add images, icons, charts, or visual elements; avoid plain title + bullets
- **Don't forget text box padding** — when aligning lines or shapes with text edges, set `margin: 0` on the text box or offset the shape to account for padding
- **Don't use low-contrast elements** — icons AND text need strong contrast against the background; avoid light text on light backgrounds or dark text on dark backgrounds
- **NEVER use accent lines under titles** — these are a hallmark of AI-generated slides; use whitespace or background color instead
---
## QA (Required)
**Assume there are problems. Your job is to find them.**
Your first render is almost never correct. Approach QA as a bug hunt, not a confirmation step. If you found zero issues on first inspection, you weren't looking hard enough.
### Content QA
```bash
python -m markitdown output.pptx
```
Check for missing content, typos, wrong order.
**When using templates, check for leftover placeholder text:**
```bash
python -m markitdown output.pptx | grep -iE "xxxx|lorem|ipsum|this.*(page|slide).*layout"
```
If grep returns results, fix them before declaring success.
### Visual QA
**⚠️ USE SUBAGENTS** — even for 2-3 slides. You've been staring at the code and will see what you expect, not what's there. Subagents have fresh eyes.
Convert slides to images (see [Converting to Images](#converting-to-images)), then use this prompt:
```
Visually inspect these slides. Assume there are issues — find them.
Look for:
- Overlapping elements (text through shapes, lines through words, stacked elements)
- Text overflow or cut off at edges/box boundaries
- Decorative lines positioned for single-line text but title wrapped to two lines
- Source citations or footers colliding with content above
- Elements too close (< 0.3" gaps) or cards/sections nearly touching
- Uneven gaps (large empty area in one place, cramped in another)
- Insufficient margin from slide edges (< 0.5")
- Columns or similar elements not aligned consistently
- Low-contrast text (e.g., light gray text on cream-colored background)
- Low-contrast icons (e.g., dark icons on dark backgrounds without a contrasting circle)
- Text boxes too narrow causing excessive wrapping
- Leftover placeholder content
For each slide, list issues or areas of concern, even if minor.
Read and analyze these images:
1. /path/to/slide-01.jpg (Expected: [brief description])
2. /path/to/slide-02.jpg (Expected: [brief description])
Report ALL issues found, including minor ones.
```
### Verification Loop
1. Generate slides → Convert to images → Inspect
2. **List issues found** (if none found, look again more critically)
3. Fix issues
4. **Re-verify affected slides** — one fix often creates another problem
5. Repeat until a full pass reveals no new issues
**Do not declare success until you've completed at least one fix-and-verify cycle.**
---
## Converting to Images
Convert presentations to individual slide images for visual inspection:
```bash
python scripts/office/soffice.py --headless --convert-to pdf output.pptx
pdftoppm -jpeg -r 150 output.pdf slide
```
This creates `slide-01.jpg`, `slide-02.jpg`, etc.
To re-render specific slides after fixes:
```bash
pdftoppm -jpeg -r 150 -f N -l N output.pdf slide-fixed
```
---
## Dependencies
- `pip install "markitdown[pptx]"` - text extraction
- `pip install Pillow` - thumbnail grids
- `npm install -g pptxgenjs` - creating from scratch
- LibreOffice (`soffice`) - PDF conversion (auto-configured for sandboxed environments via `scripts/office/soffice.py`)
- Poppler (`pdftoppm`) - PDF to images