SuperAPI AI Directory

pw-aippt-old

Data & analytics

View repository

Updated 10-15 21:37

About this skill

AIPPT - AI PPT Generation Workflow

Positioning: Fully automated PPT generation workflow Dependencies: pw-image-generation skill Core: Base image constrains style + prompts replace content + AI image generation + package PPTX

Quick Start

1. Prepare the project

mkdir my-ppt-project && cd my-ppt-project
mkdir -p template prompts images

2. Prepare the template (base image)

Method 1: PDF automatic conversion (recommended)

node ~/.claude/skills/pw-aippt/scripts/pdf-to-images.js template.pdf ./template 150

Requires poppler to be installed: brew install poppler

Method 2: PowerPoint/Keynote export

Export as PNG images and save to the template/ directory. See references/01_导出方法.md

3. Generate prompts

# 在 Claude Code 中执行
/pw-aippt https://example.com/article
# 或
/pw-aippt "文章内容..."

The skill will automatically analyze the template, break down the content, and generate prompt files to the prompts/ directory.

4. Generate images

node ~/.claude/skills/pw-image-generation/scripts/generate-image.js

5. Package PPTX

node ~/.claude/skills/pw-image-generation/scripts/merge-to-pptx.js ./images output.pptx

Core Concepts

Workflow

导出图片 → 风格提取 → 分析模板 → 内容分段 → 内容映射 → 生成提示词 → 生成图片 → 打包PPTX
    ↓          ↓          ↓          ↓          ↓            ↓           ↓          ↓
  垫图    风格定义    布局库      页面规划    提示词文件    prompts/    PNG文件    .pptx

New Step Description:

  • Style Extraction: Extract the template's design aesthetics, background system, font system, color system, visual elements, and style constraints according to standardized specifications to form a reusable style definition document

Prompt Structure

## 提示词

Refer to this PPT template image: {base image URL}

Generate a new content page.

[Style Constraints] (strictly follow)

Design Aesthetics

{design aesthetics description extracted from template analysis}

Background System

  • Color: {exact Hex value}
  • Texture: {texture description}
  • Gradient: {gradient information}

Font System

Title Font

  • Font: {font name}
  • Weight: {weight}
  • Size: {size}
  • Color: {Hex value}

Body Font

  • Font: {font name}
  • Weight: {weight}
  • Size: {size}
  • Color: {Hex value}

Color System

{color table extracted from template analysis}

Visual Elements

{list of decorative elements}

Style Rules

Should maintain

  • {list of features to maintain}

Prohibited changes

  • Do not add slide numbers, footers, or logos (unless originally present in the template)
  • {other prohibited items}

[Unchangeable Areas] (strictly keep as-is)

  • {specific unchangeable elements}

[Changeable Areas]

  • Change the page title to: {new title}
  • Change the content area to: {new content}

[Generation Instructions] Maintain a professional style, with clear and readable content. absolutely no watermark, clean output only

For detailed examples, see references/05_提示词模板示例.md

Using the Style Library:

  • You can select a predefined style template from the references/styles/ directory
  • Supported styles: corporate, minimal, technical, creative
  • Copy the style definition to the [Style Constraints] section of the prompt, and fine-tune it according to the actual template

Core Principles

Visual Consistency (Important)

The most common problem with image series is inconsistent style. Elements that must remain consistent:

  1. Visual Style: Color scheme, decoration, fonts, and background match the template
  2. Layout proportions: Maintain similar whitespace proportions and element positions
  3. Decorative elements: Use the same type of decoration
  4. LOGO/Page number: All images must include it (if the template has it)

Implementation methods:

  • Use a reference image to constrain the style (image-to-image)
  • Clearly specify non-editable areas in the prompt
  • For subsequent images, explicitly require "maintain the same style as the template"

Common issues:

  1. Background color changes → Clearly constrain the background in the "non-editable areas"
  2. Decorative elements disappear → List in detail the position and style of each decorative element
  3. Font sizes are inconsistent → Standardize font size specifications across all prompts

Content breakdown

  • Cover page: Main title + subtitle, strong visual impact
  • Table of contents page: Chapter list, clear navigation
  • Content page: Each page focuses on 1 core point
  • Ending page: Summary/Thanks/Contact information

Number of pages:

  • Simple content (<1500 words): 10-15 pages
  • Medium complexity (1500-3000 words): 15-20 pages
  • In-depth content (>3000 words): 25-30 pages

File naming: Use a numeric prefix, such as 01_封面页.md, 02_目录页.md


Reference documents

File Description
references/01_导出方法.md Export PPT as images (reference images)
references/02_PPT模板分析方法.md Analyze the template, output the layout library and style definition
references/03_内容分段方法.md Split the content into pages
references/04_内容映射方法.md Match content to layouts, generate prompts
references/05_提示词模板示例.md Prompt format example (recommended)
references/styles/README.md Style library usage instructions
references/styles/corporate.md Business style template
references/styles/minimal.md Minimalist style template
references/styles/technical.md Technical style template
references/styles/creative.md Creative style template

Notes

  1. Reference image quality: Exported template images must have high resolution (1920x1080 or higher recommended)
  2. Prompt accuracy: Clearly describe editable/non-editable areas to avoid arbitrary AI modifications
  3. Visual consistency: Use reference images to constrain the style and ensure all pages have a consistent style
  4. The first image is very important: After generating the first image, carefully compare it with the template and confirm it is correct before batch generating
  5. Avoid Markdown formatting: Do not use **加粗** or other formatting markers in prompts