跳到正文
Skillpedia
PDF、Word 与幻灯片14k · #11336

pptx-official

它能做什么

这项技能全面处理 PowerPoint 文件,包括新演示文稿、模板填写、读取幻灯片和转换演示文稿。适合制作或更新演示文稿的人。

适用场景

  • ✓当你需要一份新的演示文稿,例如路演或培训演示文稿的时候。
  • ✓当你有一个 PowerPoint 模板,并想用数值填写它的时候。
  • ✓当你想把演示文稿转换为 PDF 或图片的时候。

技能链接

https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/pptx-official/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/pptx-official/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我想用本季度的销售数字填写我的 PowerPoint 模板,并导出为 PDF。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会选择一条路径:使用 Python 或 JavaScript 库构建、填写模板中的占位符、编辑文件结构,或读取文字。它可以渲染幻灯片,以便检查其外观。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

PPTX Skill

An Apache-2.0 toolkit for producing, editing, and reading Microsoft PowerPoint (.pptx) files. Written from scratch against the public ECMA-376 / ISO/IEC 29500 (PresentationML) specification and built on permissively-licensed tooling (python-pptx MIT, pptxgenjs MIT, lxml BSD-3-Clause, Pillow MIT-CMU, optional external binaries soffice MPL 2.0 and pdftoppm GPL) so it can be reused in commercial projects without restriction.

Decision matrix

Situation Path Read first
Build a deck from a prompt or dataset — no source file to start from Author with python-pptx (structured / repeatable) or PptxGenJS (design-heavy, JS) create.md
You have a .pptx template to fill in — keep its master, layouts, look Placeholder replacement via python-pptx edit.md → Template fill
Deep structural edits — reorder slides, splice XML, add unusual objects Explode → edit XML parts → assemble edit.md → Raw XML workflow
Only need the text / speaker notes / structure out of a .pptx Extraction pipeline read.md
Turn a deck into PDF or PNG images (visual QA, publishing) scripts/render_pdf.py / scripts/render_slides.py via LibreOffice see QA below
Grid of slide thumbnails for previewing a template scripts/contact_sheet.py (Pillow) read.md → Thumbnails

If the task mixes several of these, do them in this order: read → plan slide-by-slide → edit/create → validate → visual QA.

One-time environment setup

Bundled runtime: when the MIMO_PYTHON environment variable is set, skip uv/pip installs — run every Python command below with uv run replaced by "$MIMO_PYTHON" (python-pptx/Pillow/lxml preinstalled; pip console scripts unavailable, use "$MIMO_PYTHON" -m <module>). A bundled LibreOffice is exposed as MIMO_SOFFICE (picked up automatically by soffice_bridge.py/render_pdf.py), and slide rasterisation automatically falls back to pypdfium2 in that interpreter when Poppler (pdftoppm) is absent. For the PptxGenJS authoring path, bundled Node.js is exposed as MIMO_NODE, with pptxgenjs/react/react-dom/sharp/react-icons/mathjax-full preinstalled in MIMO_NODE_MODULES — run scripts as NODE_PATH="$MIMO_NODE_MODULES" "$MIMO_NODE" <script.js> instead of npm install.

Prerequisites

If uv or bun are not yet installed:

# Install uv (Python package/project manager)
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

# Install bun (TypeScript runtime, replaces Node.js for this workflow)
# macOS / Linux
curl -fsSL https://bun.sh/install | bash
# Windows: powershell -c "irm bun.sh/install.ps1|iex"

Only if the user explicitly refuses uv / bun, substitute pip (in a venv you manage yourself) for uv, and npm/pnpm + npx tsx for bun — everything else in this skill stays the same.

Python (uv)

Python dependencies are managed by uv. Do not use pip directly.

# Initialize project (if no pyproject.toml exists)
uv init -p 3.12

# Add dependencies
uv add python-pptx lxml Pillow
uv add defusedxml                  # safe XML parsing (recommended for manual XML edits)

Rules:

  • Never use pip — always uv add for packages.
  • Never run python scripts/... directly — always uv run scripts/....
  • Don't manually manage environments with python -m venv or source .venv/bin/activate.

TypeScript (bun)

For PptxGenJS creation, use bun (project-local, not global installs):

# Initialize (if no package.json exists)
bun init -y

# Add dependencies
bun add pptxgenjs                  # core PPTX creation library
bun add react react-dom sharp      # rasterization (icons + formulas)
bun add react-icons                # icon library (FA, MD, etc.)
bun add mathjax-full               # LaTeX formula rendering

# Type definitions (including Bun runtime types)
bun add -d @types/bun @types/react @types/react-dom

Create a tsconfig.json if one doesn't exist:

{
  "compilerOptions": {
    "lib": ["ESNext"],
    "target": "ESNext",
    "module": "Preserve",
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "noEmit": true,
    "jsx": "react-jsx",
    "strict":
常见问题

它会保留我模板的外观吗?

会。模板填写使用占位符,因此母版和版式保持不变。

它能让我看到幻灯片的效果吗?

能。它可以把演示文稿转换为 PDF 或图片,以便进行视觉检查。

它需要额外的软件吗?

某些渲染功能在安装了相应工具时会使用 LibreOffice 等可选工具。

详情

作者的原始描述

Use this skill whenever a Microsoft PowerPoint (.pptx) file is being produced, opened, transformed, or read. That includes: authoring slide decks, pitch decks, executive readouts, training material, or any presentation deliverable; extracting text or structure from an existing .pptx; filling a .pptx template with values; converting a deck to PDF or images; splitting or merging decks; inspecting slides, layouts, masters, tables, images, charts, speaker notes, or comments. Trigger on words like 'deck', 'slides', 'presentation', 'pitch deck', 'keynote' (when a .pptx is expected as output), or any

repo: XiaomiMiMo/MiMo-Code

热度

GitHub 星标
14k
排名
#11336
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能