| name | image-to-ppt-skills |
| description | Use when turning a reference effect image, paper figure, screenshot, or generated image-element set into a PowerPoint slide/deck; when asked to split a PPT effect into complete visual sub-images generated through image-to-image model calls; or when generated image blocks must be positioned beside their source/output path and supplemented with editable PPT text, charts, boxes, arrows, and validation previews. |
Image To PPT Skills
Overview
Create PPT-ready visual assets and editable PowerPoint slides from reference images. Preserve complete visual blocks as generated sub-images, keep charts and their labels together when generating image elements, then rebuild the final slide with precise placement and PPT-native text/shapes where accuracy matters.
Skill Coordination
- Use
imagegen for model-generated raster blocks or variants.
- Use
slides for .pptx authoring, rendering, overflow checks, and font checks.
- Use original source figures when available; do not rely only on screenshots if source images, PDFs, or LaTeX assets are present.
Image Model Check
Before block-image generation, identify the active image generation path:
- Built-in path: if the built-in
image_gen tool is available, use it by default.
- Explicit API/CLI path: if the user asks for a named model or endpoint, check whether the required CLI/API script, endpoint, and credentials are configured before using it. Do not print secrets.
- No model available: if no image generation path is available, stop before block-image decomposition and ask the user to connect a generation model.
Visual Input Requirement
This workflow requires a source image, effect image, source PDF figure render, or previously generated image visible in the conversation. If the user provides only text and no visual input, ask for or create a confirmed total effect image first as a separate prerequisite; do not start block generation from text-only prompts. Once the effect image exists, all block generation must be image-to-image or image-plus-text-to-image.
Hard Gates
The final PPT workflow is invalid unless these gates are satisfied:
- Do not use the whole reference image as the final slide. A PPT with one full-slide screenshot is not enough unless the user explicitly asks for a non-editable screenshot slide.
- The decomposition output must be images. Confirm or infer the total effect image first, then create a block plan where every planned block maps to a concrete sub-image file to be generated. Text-only semantic decomposition is not sufficient.
- Generation mode must be image-to-image. Every block sub-image generation call must use the confirmed source/effect image as a visual reference input, optionally with text instructions. Do not use text-only prompting to create block images.
- Generate each block sub-image through the selected image generation model interface. Use the confirmed source/effect image as style reference only. Issue one image generation request per planned block, not one request for the entire slide.
- Every block must have a visual image. Semantic descriptions, labels, and prompts may accompany a block, but they cannot replace the block PNG/sub-image.
- Keep complete semantic blocks together. Do not split a chart from axes, legend, metrics, caption, or internal labels unless the user explicitly requests fully editable reconstruction.
- Use PPT for exact text and layout. Chinese/English titles, module labels, arrows, numbering, callouts, panel frames, and alignment should be PPT-native whenever accuracy or later editing matters.
- Keep assets co-located. Generated block PNGs, contact sheets, authoring scripts, rendered previews, and
.pptx outputs must live beside the source image/PDF or beside the requested PPT output, normally in a sibling <source_stem>_assets/ or <ppt_stem>_assets/ directory.
If a request would violate these gates, state the exception before proceeding.
Asset Locality
Choose the asset root before generating anything:
- If the user provides an output
.pptx path, put generated assets in <ppt_stem>_assets/ next to that file.
- Else if the user provides a source image/PDF path, put generated assets in
<source_stem>_assets/ next to that source.
- Else use the current project output directory and create
image_to_ppt_assets/.
Copy or move selected generated outputs from $CODEX_HOME/generated_images/... into that asset root immediately after each generation. Never leave project-bound images only under $CODEX_HOME, a temp directory, or an unrelated working directory.
Workflow
-
Clarify deliverable only when ambiguous.
Determine whether the user wants only a PNG effect image, only image elements, or a full PPT. If the request says "continue" or names a prior artifact, proceed from that artifact.
-
Collect references.
Locate the reference effect image, source PDF, original figures, and generated block assets. Inspect dimensions and visual layout before editing.
-
Choose decomposition level and asset root.
Use lightweight block decomposition by default:
- header/banner
- complete content panels
- complete charts with axes, legends, metrics, and captions
- footer/core-message bands
Do not split a chart from its legend, metric labels, or explanatory text unless the user explicitly requests fully editable reconstruction.
Create the asset root beside the source image/PDF or requested PPT output before generating images.
-
Generate image elements before assembly.
Load the confirmed source/effect image so it is available as the visual reference input. Issue one imagegen request per complete block and save each result as an actual sub-image file. Each generation call must be image-to-image, or image-plus-text-to-image; it must not be text-to-image. Prompts must include exact text that must remain inside the block and the block role, for example "complete self-contained transfer panel with chart, legend, metric cards, and bullets." After each generation, copy selected outputs from $CODEX_HOME/generated_images/... into the asset root. Create a contact sheet in the same asset root for review.
-
Build the PPT.
Use PptxGenJS through the slides skill. Set 16:9 unless the reference clearly uses another size. Recreate the reference layout with stable coordinates:
- use images for complex scientific visuals or generated blocks
- use PPT-native text for titles, captions, metrics, and labels when exact spelling or later editing matters
- use PPT-native shapes for panels, process boxes, arrows, badges, metric cards, and separators
- place elements according to the reference effect image, not according to default PptxGenJS spacing
-
Supplement missing content.
If generated image blocks omit or garble important text, legends, axes, labels, values, or framework boxes, overlay correct editable PPT text/shapes. Prefer exact values from source papers or source figures over model-rendered approximations.
-
Validate before delivery.
Render the PPT to PNG and inspect it visually. Run overflow and font checks:
python3 /path/to/slides/scripts/render_slides.py deck.pptx --output_dir rendered
python3 /path/to/slides/scripts/slides_test.py deck.pptx
python3 /path/to/slides/scripts/detect_font.py deck.pptx --json
If LibreOffice hangs in javaldx, rerun with JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 when that path exists.
-
Deliver clean artifacts.
Put final files in the user's requested directory and keep required assets in the sibling asset root:
.pptx
- rendered preview PNG
- authoring
.js
- only the assets required to rebuild the deck
If the user says they only want the effect image, remove or avoid extra deliverables.
Prompt Pattern For Generated Blocks
Use this structure for each complete image block:
Use case: scientific-educational / productivity-visual.
Asset type: Complete PowerPoint <block type> image element.
Primary request: Generate a complete self-contained <panel/banner/chart/footer> for an academic PPT slide.
Exact text to render: <verbatim text that belongs inside this block>
Visual content: <chart/data/diagram/flow details>
Style: modern academic PPT, crisp readable labels, no watermark, no unrelated logos.
Constraint: Keep this whole block complete as one image element; do not separate charts, legends, metrics, captions, or internal labels.
Common Mistakes
- Do not cut a chart into separate visual and text assets when the user asked for complete elements.
- Do not trust AI-generated text blindly; inspect and overlay exact PPT-native text when needed.
- Do not leave generated images only under
$CODEX_HOME/generated_images; copy project-bound assets beside the source image/PDF or requested PPT output.
- Do not deliver a flat screenshot as the PPT unless the user explicitly wants a non-editable slide.
- Do not generate only one whole-slide image when the requested deliverable is an editable PPT built from a reference effect image.
- Do not generate block images from text-only prompts; use the source/effect image as the visual input and text only as an auxiliary constraint.
- Do not replace required generated block images with text-only descriptions. Descriptions can guide generation, but every planned visual block needs an image file.
- Do not skip rendered preview validation; layout errors usually appear only after LibreOffice/PowerPoint rendering.