Create polished, editable PowerPoint files for slide decks, presentations, and explicit .pptx requests.
Create an editable .pptx in /workspace with the preinstalled python-pptx
package. Never install or download dependencies. For a new deck, set
output_path to a descriptive /workspace/<name>.pptx path.
Use this order:
prs.slide_width and prs.slide_height once; slide size is deck-wide.text_frame.fit_text(...); resolve it at runtime with fc-match, for example
fc-match -f '%{file}\n' Arial, and use the first non-empty line. If no file
is returned, do not call fit_text; shorten the text or enlarge its region.text_frame.word_wrap = True and explicit text-frame margins; use zero
margins where text must align exactly with a nearby shape.text_frame.auto_size) because
PowerPoint and LibreOffice can resolve it differently. For a single-style
title or subtitle, text_frame.fit_text(...) may be used with the font file
resolved above so the fitted size is written into the PPTX. If a title must
shrink below 28 pt or a subtitle below 16 pt, shorten it, enlarge its region,
or split the content across slides instead.add_picture, derive the missing
dimension from the source image instead of setting both width and height to
unrelated values. Extended crop values are legal, but the left and right crop
fractions must sum to less than 1, as must the top and bottom fractions, so
some of the image remains visible.Before verification, run local assertions against the complete deck. Every failure must name the slide and shape so it can be repaired directly:
Save the PPTX to output_path, reopen it with python-pptx, and confirm the
slide count and required content. Do not call verify_artifact after each slide;
verification renders and reviews the whole deck.
Start an in-place revision with load_artifact_for_revision. Open
primary_path with python-pptx, edit that current deck directly, and save the
result to expected_output_path; for the revision, that path is output_path.
Preserve unaffected slide masters, layouts, notes, relationships, and media.
Use markdown_path as textual context, not as a replacement deck. Do not
reconstruct slides with vision; verify_artifact may use vision after the
revision is written.
A changed title, filename, or design is still the same artifact unless the user
explicitly asks for a separate copy. After verification, save the revision with
the returned artifact_id and expected_generation.
verify_artifact(path=output_path, format="pptx") once after local
validation.output_path, and call
verify_artifact once more. Warnings are advisory.Call save_artifact only when the latest verification of those exact PPTX bytes
returned status="verified", using
save_artifact(path=output_path, title="...", markdown_representation="...").
A failed verification invalidates every earlier pass: never attempt to save
afterward. Working files may use any paths; no source file, preview file, or
matching filename stem is part of the publication contract. The Markdown
representation must faithfully contain the deck's substantive text for
accessibility and search.
a51f9a3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.