Skip to content

JuneYaooo/gpt-image2-ppt-skills

gpt-image2-ppt

Verified

Generate visually striking PPT slides via OpenAI's gpt-image-2 -- use any style in styles/<collection>/STYLE_ID.md or mimic a user-supplied .pptx template; outputs high-res slide PNGs and a 16:9 .pptx. Use when the user asks to make a presentation, slides, deck, pitch deck, investor PPT, magazine-style PPT, or 做一份 PPT / 生成幻灯片 / 用 gpt-image 生成 PPT / 按这个模板生成 PPT.

FileKindSize
SKILL.mdskill md56.8 KB
agents/openclaw.yamlconfig1006 B
examples/README.mdmarkdown2.8 KB
examples/book-sharing/recipe.mdmarkdown787 B
examples/book-sharing/slides_plan.mdmarkdown1.8 KB
examples/courseware/recipe.mdmarkdown725 B
examples/courseware/slides_plan.mdmarkdown2.0 KB
examples/editable-pptx-poc/demo1-cover.scene.jsonconfig912 B
examples/editable-pptx/case05-summer-poster/README.mdmarkdown4.1 KB
examples/editable-pptx/case05-summer-poster/clean-plate.pngbinary2.5 MB
examples/editable-pptx/case05-summer-poster/edge-check-black.pngbinary697.7 KB
examples/editable-pptx/case05-summer-poster/edge-check-white.pngbinary695.4 KB
examples/editable-pptx/case05-summer-poster/editable.pptxbinary3.3 MB
examples/editable-pptx/case05-summer-poster/layers/mascot-icecream-group.pngbinary813.1 KB
examples/editable-pptx/case05-summer-poster/original.pngbinary2.4 MB
examples/editable-pptx/case05-summer-poster/quality-report.jsonconfig355 B
examples/editable-pptx/case05-summer-poster/rendered.pngbinary3.7 MB
examples/editable-pptx/case05-summer-poster/slide-01.scene.jsonconfig3.3 KB
examples/investor-pitch/recipe.mdmarkdown803 B
examples/investor-pitch/slides_plan.mdmarkdown2.5 KB
examples/product-launch/recipe.mdmarkdown841 B
examples/product-launch/slides_plan.mdmarkdown1.8 KB
examples/thesis-defense/recipe.mdmarkdown806 B
examples/thesis-defense/slides_plan.mdmarkdown2.4 KB
examples/weekly-report/recipe.mdmarkdown771 B
examples/weekly-report/slides_plan.mdmarkdown1.6 KB
scripts/codex_backend.pyscript9.1 KB
scripts/editable_pptx/__init__.pyscript398 B
scripts/editable_pptx/layers.pyscript2.0 KB
scripts/editable_pptx/masking.pyscript3.8 KB
scripts/editable_pptx/poc.pyscript5.7 KB
scripts/editable_pptx/provider.pyscript2.7 KB
scripts/editable_pptx/renderer.pyscript6.0 KB
scripts/editable_pptx/scene.pyscript4.8 KB
scripts/editable_pptx/workflow.pyscript6.0 KB
scripts/generate_ppt.pyscript162.9 KB
scripts/image_generator.pyscript26.0 KB
scripts/md_to_plan.pyscript5.9 KB
scripts/render_template.pyscript21.7 KB
scripts/runtime_profile.pyscript6.3 KB
scripts/template_analyzer.pyscript42.9 KB

scripts/editable_pptx/layers.py

View on GitHub
"""Raster layer extraction and overlap strategy routing."""

from __future__ import annotations

from dataclasses import dataclass

from PIL import Image


@dataclass(frozen=True)
class LayerMetrics:
    mask_confidence: float
    edge_contamination: float
    occlusion_ratio: float

    def __post_init__(self) -> None:
        for name, value in (
            ("mask_confidence", self.mask_confidence),
            ("edge_contamination", self.edge_contamination),
            ("occlusion_ratio", self.occlusion_ratio),
        ):
            if not 0.0 <= value <= 1.0:
                raise ValueError(f"{name} 必须在 0 到 1 之间")


def extract_rgba_layer(source: Image.Image, mask: Image.Image) -> Image.Image:
    if source.size != mask.size:
        raise ValueError("源图与 layer mask 尺寸必须一致")
    layer = source.convert("RGBA")
    layer.putalpha(mask.convert("L"))
    return layer


def paste_layer(background: Image.Image, layer: Image.Image, position: tuple[int, int]) -> Image.Image:
    result = background.convert("RGBA").copy()
    result.alpha_composite(layer.convert("RGBA"), dest=position)
    return result


def choose_layer_strategy(metrics: LayerMetrics, design_mode: bool = False) -> str:
    if design_mode:
        return "ai_regenerate"
    if metrics.mask_confidence < 0.90 or metrics.edge_contamination > 0.08:
        return "ai_regenerate"
    if metrics.occlusion_ratio > 0.20:
        return "occlusion_complete"
    return "direct_extract"


def build_ai_separation_prompt(object_description: str, scene_context: str) -> str:
    return (
        f"从参考幻灯片中分离并重建单个对象:{object_description}。"
        f"原位置与遮挡关系:{scene_context}。"
        "保持对象的身份、轮廓、透视、材质、颜色、相对尺寸与光线方向;"
        "补全被遮挡部分,但不要重新设计,不要添加其他对象,不要生成文字、数字或 Logo。"
        "输出适合后续透明抠图的单对象画面。"
    )
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall