apps/runtime/src-tauri/builtin-skills/pptx/skills/ppt-editing-skill/SKILL.md
Edit existing PowerPoint files or templates with XML-safe workflows. Use for template-based deck updates: analyze layouts, map content to slides, duplicate/reorder/delete slides safely, edit slide XML in parallel, clean orphaned assets, and repack validated PPTX output.
npx skillsauth add haojing8312/workclaw ppt-editing-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When using an existing presentation as a template:
Copy and analyze:
cp /path/to/user-provided.pptx template.pptx
python -m markitdown template.pptx > template.md
Review template.md to see placeholder text and slide structure.
Plan slide mapping: For each content section, choose a template slide.
⚠️ USE VARIED LAYOUTS — monotonous presentations are a common failure mode. Don't default to basic title + bullet slides. Actively seek out:
Avoid: Repeating the same text-heavy layout for every slide.
Match content type to layout style (e.g., key points → bullet slide, team info → multi-column, testimonials → quote slide).
Unpack
Build presentation (do this yourself, not with subagents):
<p:sldIdLst>)add_slide.py)<p:sldIdLst>Edit content: Update text in each slide{N}.xml.
Use subagents here if available — slides are separate XML files, so subagents can edit in parallel.
Clean
Pack
Copy the user-provided file to template.pptx in cwd. This preserves the original and gives a predictable name for all downstream scripts.
cp /path/to/user-provided.pptx template.pptx
./
├── template.pptx # Copy of user-provided file (never modified)
├── template.md # markitdown extraction
├── unpacked/ # Editable XML tree
└── edited.pptx # Final repacked deck
Minimum expected deliverable: edited.pptx.
| Script | Purpose |
|--------|---------|
| unpack.py | Extract and pretty-print PPTX |
| add_slide.py | Duplicate slide or create from layout |
| clean.py | Remove orphaned files |
| pack.py | Repack with validation |
Removes slides not in <p:sldIdLst>, unreferenced media, orphaned rels.
Always write to /tmp/ first, then copy to the final path. Python's zipfile module uses seek internally, which fails on some volume mounts (e.g. Docker bind mounts). Writing to a local temp path avoids this.
Validates, repairs, condenses XML, re-encodes smart quotes.
Slide order is in ppt/presentation.xml → <p:sldIdLst>.
Reorder: Rearrange <p:sldId> elements.
Delete: Remove <p:sldId>, then run clean.py.
Add: Use add_slide.py. Never manually copy slide files—the script handles notes references, Content_Types.xml, and relationship IDs that manual copying misses.
Subagents: If available, use them here (after completing step 4). Each slide is a separate XML file, so subagents can edit in parallel. In your prompt to subagents, include:
For each slide:
Use the Edit tool, not sed or Python scripts. The Edit tool forces specificity about what to replace and where, yielding better reliability.
b="1" on <a:rPr>. This includes:
<a:buChar> or <a:buAutoNum><a:buChar> or <a:buNone>.When source content has fewer items than the template:
markitdown to catch mismatched countsWhen replacing text with different length content:
markitdown after text changesTemplate slots ≠ Source items: If template has 4 team members but source has 3 users, delete the 4th member's entire group (image + text boxes), not just the text.
If source has multiple items (numbered lists, multiple sections), create separate <a:p> elements for each — never concatenate into one string.
❌ WRONG — all items in one paragraph:
<a:p>
<a:r><a:rPr .../><a:t>Step 1: Do the first thing. Step 2: Do the second thing.</a:t></a:r>
</a:p>
✅ CORRECT — separate paragraphs with bold headers:
<a:p>
<a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
<a:r><a:rPr lang="en-US" sz="2799" b="1" .../><a:t>Step 1</a:t></a:r>
</a:p>
<a:p>
<a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
<a:r><a:rPr lang="en-US" sz="2799" .../><a:t>Do the first thing.</a:t></a:r>
</a:p>
<a:p>
<a:pPr algn="l"><a:lnSpc><a:spcPts val="3919"/></a:lnSpc></a:pPr>
<a:r><a:rPr lang="en-US" sz="2799" b="1" .../><a:t>Step 2</a:t></a:r>
</a:p>
<!-- continue pattern -->
Copy <a:pPr> from the original paragraph to preserve line spacing. Use b="1" on headers.
Handled automatically by unpack/pack. But the Edit tool converts smart quotes to ASCII.
When adding new text with quotes, use XML entities:
<a:t>the “Agreement”</a:t>
| Character | Name | Unicode | XML Entity |
|-----------|------|---------|------------|
| " | Left double quote | U+201C | “ |
| " | Right double quote | U+201D | ” |
| ' | Left single quote | U+2018 | ‘ |
| ' | Right single quote | U+2019 | ’ |
xml:space="preserve" on <a:t> with leading/trailing spacesdefusedxml.minidom, not xml.etree.ElementTree (corrupts namespaces)tools
处理通用任务:创建和修改文件、分析本地文件数据、整理文件结构、执行命令、网页检索和浏览器操作。Use when 用户未指定垂直专家但需要端到端完成任务。
development
Open, create, read, analyze, edit, or validate Excel/spreadsheet files (.xlsx, .xlsm, .csv, .tsv). Use when the user asks to create, build, modify, analyze, read, validate, or format any Excel spreadsheet, financial model, pivot table, or tabular data file. Covers: creating new xlsx from scratch, reading and analyzing existing files, editing existing xlsx with zero format loss, formula recalculation and validation, and applying professional financial formatting standards. Triggers on 'spreadsheet', 'Excel', '.xlsx', '.csv', 'pivot table', 'financial model', 'formula', or any request to produce tabular data in Excel format.
data-ai
生成、编辑和读取 PowerPoint 演示文稿。支持三类任务: 1) 读取或分析现有 PPTX 文本内容; 2) 在模板或已有演示文稿上做 XML 安全编辑; 3) 从零创建新演示文稿并输出原生 .pptx 文件。 适用于 .pptx 演示文稿创建、结构化改写、模板复用、讲稿梳理与版式优化。
tools
用于创建或优化高质量技能。适用于需要判断是否该新建技能、设计触发规则、整理复用资源并做轻量评测时。