$npx -y skills add stvlynn/dingtalk-wukong-skills --skill pptxPresentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
| 1 | # PPT演示文稿处理专家 Real Skill |
| 2 | |
| 3 | ## 一句话说明 |
| 4 | |
| 5 | 从 HTML 自动生成精美 PPT,支持演示文稿编辑、批注管理和内容提取。 |
| 6 | |
| 7 | **Presentation Creation & Editing** - Creating presentations from HTML, editing content, managing comments, extracting text. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## 使用场景 |
| 12 | |
| 13 | **适用**: |
| 14 | - 从数据/HTML 自动生成标准化 PPT 报告 |
| 15 | - 创建精美的演示文稿(销售、培训、汇报) |
| 16 | - 提取 PPT 文本、批注、演讲者备注 |
| 17 | - 修改幻灯片内容、布局、主题 |
| 18 | - 批量生成多个演示文稿 |
| 19 | |
| 20 | **不适用**: |
| 21 | - 复杂动画制作(用专业软件 / use professional software) |
| 22 | - 实时协同编辑(用 Google Slides / use Google Slides for real-time collaboration) |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## 核心流程 |
| 27 | |
| 28 | ``` |
| 29 | 用户需求 → 内容分析 → 配色选择 → 工具选择 → 生成 PPT → 验证输出 |
| 30 | User request → Content analysis → Color palette → Tool selection → Generate PPT → Validate |
| 31 | ``` |
| 32 | |
| 33 | **任务类型判断 (Task Classification)**: |
| 34 | |
| 35 | ### Creating Presentations (创建演示文稿) |
| 36 | - **HTML to PPT Workflow (推荐 / RECOMMENDED)** |
| 37 | - Write HTML slides with styling |
| 38 | - Convert using html2pptx library |
| 39 | - Accurate positioning and formatting |
| 40 | - Web-safe fonts only (Arial, Helvetica, Georgia, etc.) |
| 41 | |
| 42 | - **Python-PPTX Workflow** |
| 43 | - Programmatic slide creation |
| 44 | - Batch generation from data |
| 45 | - Template-based automation |
| 46 | |
| 47 | ### Reading & Analysis (读取与分析) |
| 48 | - **Text extraction** → markitdown (convert to markdown) |
| 49 | - **Comments & Notes** → Unpack OOXML and read XML |
| 50 | - **Design analysis** → Extract theme, colors, fonts from XML |
| 51 | |
| 52 | ### Editing Existing (编辑已有文稿) |
| 53 | - **Simple edits** → python-pptx library |
| 54 | - **Complex edits** → Unpack OOXML, modify XML, repack |
| 55 | |
| 56 | --- |
| 57 | |
| 58 | ## 任务完成标准 |
| 59 | |
| 60 | **必须满足**(缺一不可): |
| 61 | - PPT 可正常打开并播放 |
| 62 | - 幻灯片内容清晰可读 |
| 63 | - 配色协调,视觉层次分明 |
| 64 | - 布局合理,文字不拥挤 |
| 65 | |
| 66 | **质量评级**: |
| 67 | - ⭐⭐⭐⭐⭐ 优秀 - 设计精美 + 内容完整 + 自动化生成 |
| 68 | - ⭐⭐⭐ 及格 - 内容正确 + PPT 可用 + 格式规范 |
| 69 | - ⭐ 失败 - PPT 损坏或内容错误 |
| 70 | |
| 71 | --- |
| 72 | |
| 73 | ## 参考资料(供 AI 使用) |
| 74 | |
| 75 | | 类型 | 路径 | 说明 | |
| 76 | |-----|------|------| |
| 77 | | 核心文档 | `docs/00-SKILL-完整制作指南.md` | Complete PPT creation guide (~500 lines) | |
| 78 | | OOXML库 | `ooxml/` | Low-level XML operations | |
| 79 | | 工具脚本 | `scripts/unpack.py` | Unpack PPTX files | |
| 80 | | 工具脚本 | `scripts/pack.py` | Pack PPTX files | |
| 81 | |
| 82 | --- |
| 83 | |
| 84 | ## 关键原则(AI 必读 / Critical Principles) |
| 85 | |
| 86 | ### 1. Design First - Content-Informed Approach (设计先行) |
| 87 | **CRITICAL**: Before creating any presentation, analyze the content: |
| 88 | - **Consider subject matter**: What is this about? What tone/industry/mood? |
| 89 | - **Check branding**: If company mentioned, consider brand colors |
| 90 | - **Match palette to content**: Select colors reflecting the subject |
| 91 | - **State your approach**: Explain design choices BEFORE writing code |
| 92 | |
| 93 | ### 2. Web-Safe Fonts Only (仅使用 Web 安全字体) |
| 94 | **Allowed fonts**: Arial, Helvetica, Times New Roman, Georgia, Courier New, Verdana, Tahoma, Trebuchet MS, Impact |
| 95 | - **No custom fonts**: They won't render correctly |
| 96 | - **Font pairing**: Use max 2-3 fonts per presentation |
| 97 | |
| 98 | ### 3. Visual Hierarchy (视觉层次) |
| 99 | - **Extreme size contrast**: 72pt headlines vs 11pt body text |
| 100 | - **Weight variation**: Bold headers, normal body, light captions |
| 101 | - **Color emphasis**: Use accent color for key information |
| 102 | - **Clear structure**: Title → Main content → Supporting details |
| 103 | |
| 104 | ### 4. Chart & Table Layout Rules (图表布局规则) |
| 105 | **PREFERRED - Two-column layout**: |
| 106 | - Header spanning full width |
| 107 | - Text/bullets in one column (40%) + Chart/table in other (60%) |
| 108 | - Better balance and readability |
| 109 | |
| 110 | **Alternative - Full-slide layout**: |
| 111 | - Chart/table takes entire slide for maximum impact |
| 112 | |
| 113 | **NEVER vertically stack**: |
| 114 | - ❌ Do NOT place charts/tables below text in single column |
| 115 | - ❌ Causes poor readability and layout issues |
| 116 | |
| 117 | ### 5. Color Palette Selection (18种配色方案) |
| 118 | **Think beyond defaults**: What colors genuinely match this topic? |
| 119 | **Consider multiple angles**: Topic, industry, mood, energy, audience, brand |
| 120 | **Be adventurous**: Healthcare doesn't have to be green, finance doesn't have to be navy |
| 121 | |
| 122 | --- |
| 123 | |
| 124 | ## 18种精选配色方案 (Color Palettes) |
| 125 | |
| 126 | ### Business & Professional (商业/专业) |
| 127 | 1. **Classic Blue**: Navy (#1C2833), Slate (#2E4053), Silver (#AAB7B8), Off-white (#F4F6F6) |
| 128 | 2. **Black & Gold**: Gold (#BF9A4A), Black (#000000), Cream (#F4F6F6) |
| 129 | 3. **Charcoal & Red**: Charcoal (#292929), Red (#E33737), Light Gray (#CCCBCB) |
| 130 | |
| 131 | ### Creative & Vibrant (创意/活力) |
| 132 | 4. **Teal & Coral**: Teal (#5EA8A7), Deep Teal (#277884), Coral (#FE4447), White (#FFFFFF) |
| 133 | 5. **Retro Rainbow**: Purple (#722880), Pink (#D72D51), Orange (#EB5C18), Amber (#F08800), Gold (#DEB600) |
| 134 | 6. **Vibrant Orange**: Orange (#F96D00), Light Gray (#F2F2F2), Charcoal (#222831) |
| 135 | 7. **Bold Red**: Red (#C0392B), Bright Red (#E74C3C), Orange (#F39C12), Yellow (#F1C40F), Green (#2ECC71) |
| 136 | |
| 137 | ### Natural & Warm (自然/温暖) |
| 138 | 8. **Sage & Terracotta**: Sage (#87A96B), Terracotta (#E07A5F), Cream (#F4F1DE), Charcoal (#2C2C2C) |
| 139 | 9. **Forest Green**: Black (#191A19), Green (#4E9F3D), Dark Green (#1E5128), White (#FFFFFF) |
| 140 | 10. **Vintage Earthy**: Mustard (#E3B448), Sage (#CBD18F), Forest Green (#3A6B35), Cream (#F4F1DE) |
| 141 | 11. **Cream & Forest**: Cream (#FFE1C7), Forest Green (#40695B), White |