$ show JuneYaooo/gpt-image2-ppt-skills
This repository is an installable AI-agent skill that generates PowerPoint decks by producing 16:9 slide images with OpenAI's gpt-image-2 model and packaging them into .pptx files. The actual pipeline is CLI-driven: a natural-language or Markdown slide plan is converted into structured JSON (scripts/md_to_plan.py), combined with a selected style or cloned template profile (scripts/runtime_profile.py, scripts/template_analyzer.py), rendered through a robust API wrapper (scripts/image_generator.py), and assembled into a deliverable PPTX (scripts/generate_ppt.py). It also supports optional 'editable' mode, where generated slides are reconstructed into native PowerPoint objects via python-pptx, plus versioned slide editing, rollback, and deterministic real-image overlay with vision-based QA. This makes it a hybrid application/data repository: the dominant character is a tool, but a large fraction of the repo is a curated corpus of 265+ style specification files that encode design tokens, layout routing rules, and machine-readable JSON layout manifests.
The LLM identified 5 files worth highlighting for reuse:
A robust OpenAI-compatible image-generation client with chat/images endpoint fallback, retry handling for transient errors, aspect-ratio validation and regeneration, and multimodal reference-image support. It is self-contained and could be extracted into any project needing reliable image-model invocation.
Uses a vision LLM to extract global style, theme colors/fonts, per-page layouts, JSON schemas, and external image slots from an uploaded PPTX render. Results are cached by content hash, and the module also handles layout assignment and prompt rendering, forming a reusable template-to-spec distillation pipeline.
Central normalization layer that converts heterogeneous inputsβcloned template profiles and sidecar style definitionsβinto a single validated RuntimeProfile contract with capability flags and prompt-strategy selection. Demonstrates a clean adapter pattern for unifying different style data sources behind one interface.
Provides deterministic image masking, compositing, and letterboxing utilities with strict size validation. It enables AI-edited image regions to be blended back into generated slides without corrupting the full visual, and is isolated enough to be reused in other image-generation or photo-editing pipelines.
A strict scene model that describes reconstructed PowerPoint slides as structured objects (text boxes, shapes, pictures, layers), enabling native editable PPTX output and versioned slide-level rollback. The validated structure is a reusable pattern for converting pixel-based generated documents into editable object graphs.