Communitygithub.com

helloo1568/image-ppt

将书籍、PDF 或文字材料转化为精美可编辑 PPT 的 AI 工作流技能 | 三步流程:内容提炼 - 图片PPT生成 - 可编辑PPTX还原 | 推荐 Codex + GPT-Image 2.0

image-ppt 是什么?

image-ppt is a Claude Code agent skill that 将书籍、PDF 或文字材料转化为精美可编辑 PPT 的 AI 工作流技能 | 三步流程:内容提炼 - 图片PPT生成 - 可编辑PPTX还原 | 推荐 Codex + GPT-Image 2.0.

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add helloo1568/image-ppt

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Image to PPT — Workflow for Converting Text Materials to Editable Presentations (General Methodology)

Overview

This skill provides a complete three-step workflow for converting text materials—such as book PDFs, papers, and reports—into polished, editable PowerPoint presentations. Originating from community tutorials (author: Player 22186848) on Heihe Community and inspired by UP master "Yiwu Qianhe" on Bilibili's academic PPT creation approach, it has been generalized for diverse scenarios including classroom presentations, book sharing, lab meetings, project pitches, and competition demos.

Recommended runtime environment: Codex + GPT-Image 2.0. Codex handles document reading, workflow orchestration, and PPTX assembly (shell + python-pptx all-in-one); GPT-Image 2.0 generates consistent, text-accurate PPT pages. In Step 1/2 prompts, "image2 image generation model" corresponds to GPT-Image 2.0 in the Codex environment, the native image model in GPT/ChatGPT environments, and should be replaced with the actual image generation tool used in other environments.

Platform-agnostic: The core methodology consists of three prompts and a three-step process, usable in any AI agent with document reading, image generation, and file output capabilities (Codex, ChatGPT/GPT, Claude, Kimi, Doubao, WorkBuddy, Tongyi, etc.). When executing, simply map the generic capabilities described here to your current AI tool.

The three core prompts are stored in references/prompts.md and should be referenced per step.

Workflow Decision Tree

User inputs text material (PDF / book / paper / report / plain text)
         │
         ▼
  ┌──────────────┐
  │ Step 1       │  Content Extraction + Style Design
  │ Read material│  → Extract core content
  │ Generate 4    │  → Generate 4 style previews
  │ previews     │
  └──────┬───────┘
         │ User selects one style
         ▼
  ┌──────────────┐
  │ Step 2       │  Image-based PPT Generation
  │ Generate     │  → Generate pages one by one in selected style
  │ pages & merge│  → Merge into downloadable .pptx
  └──────┬───────┘
         │ Obtain image-based PPT (non-editable)
         ▼
  ┌──────────────┐
  │ Step 3       │  Editable Restoration
  │ Decompose    │  → Image layer + editable text layer
  │ page by page │  → Output editable .pptx
  │ Output       │
  └──────────────┘

Step 1: Content Extraction and Style Design

Goal

Deeply read and understand the source material, extract core content; concurrently generate four sets of PPT thumbnail previews in different styles for user selection.

Execution Steps

  1. Read source material: Read the PDF/document provided by the user. For long documents, process in segments and summarize key points.
  2. Extract content outline: Extract the following elements from the material:
    • Author background, writing context
    • Overall structure of the book/document
    • Main arguments, key chapters
    • Typical cases, notable quotes
    • Practical significance and reading insights
  3. Obtain reference style: Ask the user if they have a reference PPT template image. If so, analyze its color scheme, fonts, and layout style.
  4. Generate four style previews: Use the AI's image generation capability to create four sets of PPT thumbnail previews (similar to a slide sorter view) based on Prompt 1 in references/prompts.md. The four sets should share the same content structure but differ in theme colors, layout, and visual style.
  5. Pause for user selection: Display the four previews and ask the user to select one style.

Adaptation Notes

  • Codex (recommended): Use document reading to extract content, then call image generation (strongly recommended: GPT-Image 2.0) to create previews. In Prompt 1, "image2 image generation model" corresponds to GPT-Image 2.0.
  • AI with native image generation (e.g., GPT): Send the source material PDF, reference style image, and Prompt 1 directly; the AI will invoke its image model to generate previews.
  • AI using external image generation tools (e.g., Claude, WorkBuddy): First extract content with document reading, then call the available image generation tool to create previews. Replace "image2 image generation model" in Prompt 1 with the actual tool used.

Step 2: Generate Complete Image-Based PPT

Goal

Based on the user-selected style template, generate complete PPT page images one by one and assemble them into a downloadable .pptx file.

Execution Steps

  1. Confirm style selection: Record the style number selected by the user in Step 1.
  2. Generate pages one by one: Based on the selected style template and the content outline from Step 1, generate PPT page images one by one. Each page should highlight one core idea, avoiding large blocks of text.
  3. Merge into PPTX: Embed all page images in order into 16:9 slides, producing a .pptx file (using PPT generator, python-pptx script, or the AI's built-in file output capability).
  4. Deliver file: Provide the generated .pptx file to the user.

Adaptation Notes

  • Codex (recommended): Loop through image generation calls (strongly recommended: GPT-Image 2.0) to draw each page, then use a python-pptx script to merge them into a .pptx. In Prompt 2, "image2 image generation model" corresponds to GPT-Image 2.0.
  • AI with native image generation (e.g., GPT): Send Prompt 2 (see references/prompts.md); the AI will generate pages one by one and automatically merge them into a pptx.
  • AI using external image generation tools: Manually orchestrate—first loop through the image generation tool for each page, then merge using a PPT generator or python-pptx script. Note that some AIs can only call a tool once per conversation; multiple rounds may be needed for all pages.

Important Notes

  • A single image generation call typically produces one image; multi-page PPTs require looping calls.
  • Recommended generation order: cover → table of contents → content pages → summary page → acknowledgments page.
  • Each page generation prompt must include: selected style description + specific content points for that page + page number.

Step 3: Restore Image-Based PPT to Editable PPTX

Goal

Convert the image-based PPT from Step 2 (each slide is a single non-editable image) into an editable PPTX file, preserving visual quality while making key text editable.

Execution Steps

  1. Process page by page: Handle each slide of the image-based PPT individually, processing at most 1-3 pages at a time to avoid quality degradation.
  2. Identify page structure: Analyze each page image and split content into two layers:
    • Complex visual assets: Brand logos, people, illustrations, 3D graphics, complex backgrounds, complex charts → crop/extract as high-resolution images for embedding
    • Editable information layer: Titles, subtitles, body text, key quotes, numbers, conclusion box text, page numbers → rebuild using native PPT text boxes
  3. Text restoration: Recreate editable text using native PPT text boxes, matching the original image's font style, size hierarchy, weight, color, line spacing, letter spacing, alignment, and position. If covering original text, use background color or partial masking to hide the original text before overlaying new text boxes to avoid ghosting.
  4. Visual restoration: Maintain the original page's layout ratio, visual focus, reading order, white space rhythm, colors, contrast, and light-dark relationships.
  5. Output and comparison: Output a 16:9 editable PPTX, and render a preview image for comparison with the original. If significant differences exist, iterate for improvements.
  6. Delivery explanation: Explain which elements have been restored as editable text, which remain as images, and any font substitutions made.

Restoration Instructions

Complete page-by-page restoration prompts are in references/prompts.md as Prompt 3. This prompt adopts a hybrid strategy of "complex visual fidelity + major text editable."

Adaptation Notes

  • AI with native image decomposition capability (e.g., GPT): Upload the image-based PPT + send Prompt 3; the AI's image function can decompose and combine layer elements to directly output an editable PPTX.
  • Codex (recommended):
    1. View each page image, identify text content and visual element structure
    2. Use an image processing library (e.g., Pillow) to crop complex visual areas into separate images
    3. Use python-pptx or pptxgenjs to build the PPTX: background image as base + native text boxes for text
    4. Process each page, 1-3 pages at a time
    5. Merge all pages into a final .pptx
  • Other AI (e.g., Claude, WorkBuddy): Follow the Codex path above, replacing the specific library/tool with whatever is available in the current environment.

Key Considerations

  • Decompose one page at a time: Process at most 3 pages at once; otherwise, element decomposition quality suffers.
  • Avoid double display: If the original image already contains text, must cover the original text with background color before overlaying text boxes, otherwise text ghosting will occur.
  • Font substitution: When the original font cannot be identified, use Heiti/Source Han Sans/Microsoft YaHei for Chinese, and the closest matching sans-serif/serif font for English.
  • Small text in complex visual areas: If extracting independently would harm visual quality, retain as an image but note it in the final explanation.

Resources

references/

  • prompts.md — Original text of the three core prompts (Prompt 1: Content Extraction and Style Design / Prompt 2: Image-Based PPT Generation / Prompt 3: Editable PPTX Restoration)

Tool Mapping Suggestions

When executing, map the generic capabilities to your current AI environment:

Generic CapabilityAvailable Tools/Skills Examples
Document ReadingBuilt-in PDF/document reader, MarkItDown, any file parsing capability
Image GenerationNative image model (e.g., GPT Image), Agnes, Midjourney, Jimeng, Tongyi Wanxiang, etc.
PPTX ConstructionAI's built-in file output, python-pptx, pptxgenjs, WPS/Office plugins

Applicable Scenarios

ScenarioDescription
University classroom group presentationsBook sharing, coursework presentations
Lab meetingsLiterature review, research progress reports
Project presentationsProject summaries, solution showcases
Competition demosBusiness plans, project pitches
Book sharing eventsBook content extraction and sharing

相关技能