hashgraph-online/awesome-codex-plugins / plugins/alpoxdev/hypercore/skills/hyper-pptx
hyper-pptx
VerifiedUse this skill when the user asks to build, edit, or read a PowerPoint deck - create a .pptx from an outline or analysis, add slide transitions or element animations, change text or fonts in a deck someone else made, remove slides, or open a .pptx and report what each slide says. Write a typed JSON spec, render with a bundled engine to a .pptx plus checked slide images, or inspect an existing deck before touching it. Do not use for slide images only, PDF-only output, Google Slides, or Keynote.
references/research-images.md
View on GitHub# Research: Images
Picture placement is where generated decks most often look wrong: a stretched photo, a letterbox the author did not expect, a caption on top of the picture it describes, or a hero that reads as a dark rectangle because the scrim is too strong. This file records the geometry rules this package follows and why.
## 1. The Two Operations
A picture is fitted into a box in exactly two ways, and the choice is about what may be lost.
| Operation | Keeps | Loses | Use when |
|---|---|---|---|
| `contain` | the whole picture | part of the box (letterbox) | the picture is evidence and must not be cropped, e.g. a screenshot |
| `fill` | the whole box | part of the picture (crop) | the picture is texture or mood, e.g. a hero background |
Both centring decisions come from the same two ratios: the source aspect $R = w_s/h_s$ and the box aspect $Q = W/H$.
For `contain`:
$$w = \min(W,\; H \cdot R), \qquad h = w / R$$
For `fill`, the crop is symmetric and expressed as a percentage of the source, which is what `a:srcRect` takes:
$$c_l = c_r = \frac{1 - Q/R}{2} \times 100\%, \qquad c_t = c_b = 0 \quad (R > Q)$$
The percentages, not pixels, matter because `srcRect` is defined in thousandths of a percent of the source. Writing the crop there means PowerPoint, and any converter, shows the same window.
## 2. Dimensions Come From The File
The package reads the pixel dimensions from the file header before layout: PNG from the `IHDR` chunk, JPEG from the first `SOFn` marker. The author's `aspect` is only a fallback for a file that cannot be read.
A wrong aspect is not a cosmetic error. With `contain` it letterboxes a correct crop into a wrongly shaped box; with `fill` it crops the wrong band off the picture. Both look like a broken deck and neither is visible in the spec.
## 3. Captions Reserve Their Band
A caption under a picture is a real text shape with its own height. The picture's height is computed after the caption band is subtracted, so a caption can never land on the picture above it. This is why a gallery's pictures shrink when captions are added: the captions took the space first.
## 4. The Scrim
A hero puts text over a photograph. Text directly on a picture fails on any busy image, so the package inserts a flat black overlay at a fixed alpha and draws the text on that, at full contrast.
| `scrim` | Result |
|---|---|
| 0.35 to 0.45 | light image, text must be short and large |
| 0.55 (default) | safe over most photographs |
| 0.70 and above | near-solid, image becomes texture |
The rule is not "add a gradient": a gradient scrim is invisible over a picture with its own light gradient, and it cannot be checked by reading a value. A flat alpha can be reasoned about and measured.
## 5. What The Render Checks
| Check | Condition |
|---|---|
| `IMAGE_SMALL` | a source under 320 × 180 will look soft when projected |
| `IMAGE_EXTREME` | an aspect under 1:5 crops badly in any box |
| `IMAGE_NO_ALT` | a picture with no alternative text is a delivery defect |
| `IMAGE_REMOTE` | a remote URL is refused, so a deck never depends on a network |
| `IMAGE_UNREADABLE` | a file whose pixel size cannot be read is refused, not guessed |
Alt text is written into the picture as `descr`, which is what a screen reader announces and what a reader sees when the image fails to load.
## 6. What Was Rejected
- **Automatic side selection.** Deciding left vs right from content type is a guess that reads as arbitrariness. The author names the side.
- **Background-image cropping via shapes.** Some generators put a picture as a shape fill with a texture offset. `srcRect` on a `p:pic` is simpler, survives round-tripping, and keeps the picture as a picture.
- **Stretched to fit.** Filling the box regardless of aspect is the single most recognisable mark of a generated deck.
## Sources
> Checked 2026-11-14.
| Claim | Source |
|---|---|
| `a:srcRect` crop is expressed as a percentage of the source | <http://www.datypic.com/sc/ooxml/e-a_srcRect-1.html> |
| Picture part structure and `descr` alternative text | <https://learn.microsoft.com/en-us/office/open-xml/presentation/structure-of-a-presentationml-document> |
| Contain and cover geometry with source aspect ratios | <https://github.com/hugohe3/ppt-master> |
| Alt text as a delivery requirement for generated decks | <https://github.com/microsoft/Resource2Skill> |
| Image placement pipeline and its review rules | <https://github.com/eddyzzl/imagegen-pptx-pipeline> |
### Evidence grade
`LOCAL` — the geometry is implemented in `assets/runtime/layout.jq` and verified against rendered slides on 2026-11-14; `srcRect` percentages were checked by unzipping the output and reading the picture XML. The projection thresholds (320 × 180, 1:5) are this package's choices, not measurements from the sources.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse 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 PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse 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 presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |