pptx
БесплатноБез исполняемых скриптовНе проверенWork with Microsoft PowerPoint `.pptx` files using the installed `paper-pptx` distribution, which imports as `pptx` and extends `python-pptx` with inspection…
от mudler★ 50 644 звезды на GitHubОб этом скилле
PPTX with paper-pptx
The tools named here are installed in the guest image of the sandbox add-on (gVisor or a virtual machine). The host backend does not have them: check that the import works before you rely on it.
Write the scripts you use to build or check a file in the chat's work folder, where the shell starts and that
"$WORK"holds (the note of the turn names it too), for examplepython3 "$WORK/build.py", or run a one-off script inline withpython3 - <<'EOF'. Quote every path with double quotes. Save only the file the user asked for, where they asked or in their home, and nowhere else.
paper-pptx is an upgraded distribution of python-pptx. It keeps the familiar import and ordinary API:
from pptx import Presentation
presentation = Presentation(source_path)
Use your existing knowledge of python-pptx for normal slides, shapes, text, tables, charts, images, layouts, and formatting. The fork adds public APIs for the places where ordinary python-pptx is thin: effective-value inspection, stable targeting, notes and footer handling, slide lifecycle, relationship-aware clone/import/composition, owned chart and media graphs, semantic diffs, and package-preserving saves.
paper-pptx is installed under the pptx import.
The Paper API companion maps Paper-specific capabilities to their public symbols. The generated API reference covers the complete public API, including the surface inherited from python-pptx, with one page per module. It is large; search by symbol and read only the relevant section.
Package behavior
Paper operations refuse ambiguous targets rather than selecting the first matching layout, placeholder, section, shape, or text block. A presentation.batch() block validates once at exit and discards every edit in the block if validation fails.
A PaperRefusal means paper-pptx cannot guarantee the attempted operation through its guarded API. The concrete subclass and message identify the condition that caused the refusal. In rare cases an ordinary python-pptx mutation or direct package editing may be appropriate when unguarded serialization is intentionally acceptable and its effects on the deck's relationship and ownership graph are understood. Verify the resulting deck carefully.
Opening a deck can also refuse. paper-pptx validates every member of the package on intake and rejects an archive with more than one reading or one that is unsafe to expand, so a hand-rezipped or tool-mangled file may raise PackageLimitError where upstream python-pptx opened it. Report the refusal and its message rather than working around it; each such refusal matches what PowerPoint itself does with that file.
Precise ZIP/OOXML work is still available when it is genuinely narrower than object-model mutation, the exact members and relationships are understood, and the candidate can be checked independently. Never copy a slide, chart, image, notes part, or shape XML without accounting for its complete relationship and ownership graph.
Saving
presentation.save(output) uses normalized serialization and can rewrite semantically unchanged package members. patch_save(source, presentation, output) preserves unrelated original XML bytes and returns a diff.
Saving is refused while a batch() block is open, so close the block before writing.
Build and check a deck
You cannot see a deck by reading its code. Build it in the office sandbox profile, which has LibreOffice Impress and fonts, and look at every slide before you say it is done.
Switch first. Call
sandbox_profilewith actionuseand profileofficebefore you write anything. Switching restarts the sandbox: the files stay, but installed packages and running processes are lost. So switch before you build, and build the whole deck inoffice. If the switch fails orofficeis not listed, say so and tell the user that the look of the deck was not checked.Give sizes in EMU, not in bare numbers. python-pptx reads a plain number as EMU (914400 per inch), so
add_textbox(0.5, 1.0, 4.0, 2.0)makes a box of about 0.004 inch: the deck opens, and every shape is a dot. Use the guard helper for every position and size:import sys sys.path.insert(0, "/usr/local/lib/localai/document-skills/pptx") from pptx_guard import inch, check slide.shapes.add_textbox(inch(0.5), inch(1.0), inch(4.0), inch(2.0)) ... prs.save(path) check(path) # raises with one line for each problemcheckfails when a shape is narrower or shorter than 0.2 inch (lines excepted), is outside the slide, or holds text that does not fit its box. Fix every line it prints, then run it again. It also works from the shell:python3 /usr/local/lib/localai/document-skills/pptx/pptx_guard.py deck.pptx. It is an estimate made without a renderer: a clean result does not prove that t
Установить pptx в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл pptx?
Work with Microsoft PowerPoint `.pptx` files using the installed `paper-pptx` distribution, which imports as `pptx` and extends `python-pptx` with inspection, guarded edits, composition, diffs, and package-preserving saves. To build a deck, switch to the `office` sandbox profile, which can render every slide to an image.
Как установить скилл pptx?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pptx запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic