P

Skill 详情

ppt-editing-skill

编辑现有的PowerPoint文件或模板,使用XML安全的工作流程。用于基于模板的幻灯片更新:分析布局、将内容映射到幻灯片、安全地复制/重新排序/删除幻灯片、并行编辑幻灯片XML、清理孤立资源,并重新打包验证过的PPTX输出。

来源平台:ModelScope
来源标识:ModelScope/MiniMax-AI/ppt-editing-skill
源文件:原始说明
办公效率 超热门 ModelScope 中 风险 下载 128访问 393Stars 4.4千 ModelScopeGitHub Copilot
来源平台ModelScope
文档版本master
热度超热门
排名信号下载 128
概述 安装 文档 下载

快速判断

编辑现有的PowerPoint文件或模板,使用XML安全的工作流程。用于基于模板的幻灯片更新:分析布局、将内容映射到幻灯片、安全地复制/重新排序/删除幻灯片、并行编辑幻灯片XML、清理孤立资源,并重新打包验证过的PPTX输出。

最后校验2026-03-25
来源平台ModelScope
安全提示
下载副本ZIP 可用

适合任务

  • 按 ModelScope 收录说明完成平台、开发或工作流任务。
  • 通过下载包离线保存 Skill 内容。
  • 结合下载量、访问量和喜欢数评估优先级。

输入与输出

输入:任务目标、上下文材料、平台信息、文件路径、约束条件或需要处理的内容。

输出:按 Skill 说明生成的文档、代码、检查结果、计划、建议或操作步骤。

示例任务

  • 使用 ppt-editing-skill 帮我完成当前任务,并先确认必要上下文。
  • 根据 ppt-editing-skill 的说明,列出操作步骤和风险检查点。

安装方式

  1. 下载本站提供的 Skill ZIP 并解压。
  2. 把解压后的 Skill 目录放入当前 AI 工具支持的 skills 目录。
  3. 如需在线查看原始内容,可打开 GitHub 的 SKILL.md

在线原始地址:modelscope-minimax-ai-ppt-editing-skill/SKILL.md

风险边界

使用前请检查权限、外部依赖和要处理的数据类型。第三方平台数据、支付、部署、账号和密钥相关内容应先核对官方说明。

SKILL.md 文档介绍

Editing Presentations

Template-Based Workflow

When using an existing presentation as a template:

1. 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.

2. 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:

  • Multi-column layouts (2-column, 3-column)
  • Image + text combinations
  • Full-bleed images with text overlay
  • Quote or callout slides
  • Section dividers
  • Stat/number callouts
  • Icon grids or icon + text rows

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).

3. Unpack

4. Build presentation (do this yourself, not with subagents):

  • Delete unwanted slides (remove from <p:sldIdLst>)
  • Duplicate slides you want to reuse (add_slide.py)
  • Reorder slides in <p:sldIdLst>
  • Complete all structural changes before step 5

5. 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.

6. Clean

7. Pack

Output Structure

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.

---

Scripts

| 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 Operations

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.

---

Editing Content

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:

  • The slide file path(s) to edit
  • "Use the Edit tool for all changes"
  • The formatting rules and common pitfalls below

For each slide:

1. Read the slide's XML

2. Identify ALL placeholder content—text, images, charts, icons, captions

3. Replace each placeholder with final content

Use the Edit tool, not sed or Python scripts. The Edit tool forces specificity about what to replace and where, yielding better reliability.

Formatting Rules

  • Bold all headers, subheadings, and inline labels: Use b="1" on <a:rPr>. This includes:
  • Slide titles
  • Section headers within a slide
  • Inline labels like (e.g.: "Status:", "Description:") at the start of a line
  • Never use unicode bullets (•): Use proper list formatting with <a:buChar> or <a:buAutoNum>
  • Bullet consistency: Let bullets inherit from the layout. Only specify <a:buChar> or <a:buNone>.

---

Common Pitfalls

Template Adaptation

When source content has fewer items than the template:

  • Remove excess elements entirely (images, shapes, text boxes), don't just clear text
  • Check for orphaned visuals after clearing text content
  • Run content QA with markitdown to catch mismatched counts

When replacing text with different length content:

  • Shorter replacements: Usually safe
  • Longer replacements: May overflow or wrap unexpectedly
  • Verify with markitdown after text changes
  • Consider truncating or splitting content to fit the template's design constraints

Template 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.

Multi-Item Content

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.

Smart Quotes

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 &#x201C;Agreement&#x201D;</a:t>

| Character | Name | Unicode | XML Entity |

|-----------|------|---------|------------|

| " | Left double quote | U+201C | &#x201C; |

| " | Right double quote | U+201D | &#x201D; |

| ' | Left single quote | U+2018 | &#x2018; |

| ' | Right single quote | U+2019 | &#x2019; |

Other

  • Whitespace: Use xml:space="preserve" on <a:t> with leading/trailing spaces
  • XML parsing: Use defusedxml.minidom, not xml.etree.ElementTree (corrupts namespaces)
建议反馈