PPT Skill
Spec-driven PPT generation: extract design DNA from reference PPTX → gather
content → generate natively editable slides with agent-loop style verification.
Slash Commands
| Command |
Purpose |
/ppt-spec <file.pptx> |
Extract design spec from reference PPTX (cover/toc/content/end_page recognition + layout analysis) |
/ppt-spec-vl <file.pptx> |
Extract VL-driven spec with element role analysis, layout dedup, JSON output (no text content) |
/ppt-outline <content> |
Generate content outline using WPS model from prompt-ppt-content.md (titles + body only) |
/ppt-diagram <type> <content> |
Generate diagram (architecture/flowchart/sequence) from description |
/ppt <content or file> |
Generate PPT: gather content → confirm outline → generate PPTX → apply layout design |
Quick Start
# Extract design spec from a reference PPTX
python scripts/ppt_cli.py extract-spec reference.pptx
# Generate PPT from content (with agent-loop style verification)
python scripts/ppt_cli.py generate-pptx --spec specs/my_spec/ --outline outline.yaml -o output.pptx --workers 4
# Direct SVG to PPTX conversion
python scripts/ppt_cli.py convert slide1.svg slide2.svg -o output.pptx
Commands
| Command |
Description |
extract-spec <pptx> |
Extract design spec → specs/<name>/ directory (pages by type, assets, logic.yaml) |
extract-vl-spec <pptx> |
Extract VL-driven spec → specs/<name>/ JSON + slide images (no text, layout dedup) |
generate-pptx |
Generate PPTX from spec + outline with agent-loop eval (--spec --outline -o --workers) |
convert <svg>... -o <pptx> |
Direct SVG→native-shape PPTX conversion |
list-specs |
List available design specs |
select-spec <name> |
Set active design spec |
gather-content <text|file> |
Content gathering → slide-by-slide outline (adaptive questioning, 8-question cap) |
list-outlines |
List saved content outlines |
All scripts run from the skill root directory.
Workflow
/ppt-outline — Generate Content Outline
This command has two modes depending on input richness:
Mode A — Topic-only (input <= 30 words, no structure markers)
The user only provided a topic name (e.g. "AI in Healthcare 2024").
Do NOT proceed with outline generation directly. Instead:
- Detect sufficiency: The skill outputs a structured JSON delegation signal:
{
"type": "delegate",
"skill": "deerflow-skill",
"query": "<topic>",
"context": "Research this presentation topic comprehensively. Gather key sections, trends, data points, examples, case studies, and supporting evidence needed for a professional slide deck."
}
- Call deerflow-skill: The outer agent reads this signal and invokes
deerflow-skill with the query to research the topic thoroughly.
- Return enriched content: After deerflow-skill returns comprehensive research, call
ppt-skill again with the enriched content.
- Apply prompt-ppt-content.md: When the content is received (now rich), apply
prompt-ppt-content.md WPS rules to optimize the content into a structured outline:
- Each slide gets W (What): Navigation label
- P (Point): Core conclusion (bold, prominent)
- S (Support): Evidence (data, cases, quotes)
- Output: Markdown outline ready for
/ppt generation
Mode B — Rich content (detailed input with structure)
The user provided sufficient detail (bullets, sections, or extensive text).
- Apply WPS model: Use
prompt-ppt-content.md principles directly
- Analyze input → extract sections and key points
- Structure each slide with W (What) / P (Point) / S (Support)
- Validate outline completeness
- Output: Markdown outline ready for
/ppt generation
/ppt-diagram — Generate Diagram
- Classify diagram type: architecture, data-flow, flowchart, sequence, class, er-diagram, network-topology
- Extract structure: identify nodes, edges, containers from description
- Apply layout rules:
- Architecture: horizontal layers (Client → Gateway → Services → Data)
- Flowchart: top-to-bottom, diamond for decisions
- Sequence: vertical lifelines with horizontal messages
- Generate SVG using 7 visual styles:
- Style 1: Flat Icon (default, white bg)
- Style 2: Dark Terminal (monospace, dark bg)
- Style 3: Blueprint (cyan on navy)
- Style 4: Notion Clean (minimal)
- Style 5: Glassmorphism (translucent)
- Style 6: Claude Official (warm cream)
- Style 7: OpenAI (green accent)
- Export: SVG + PNG via rsvg-convert
/ppt-spec — Extract Design Spec
Two extraction modes:
Mode A — Standard (extract-spec) — preserves text content
- Read the reference PPTX with
python-pptx + lxml
- Extract color palette (12 HEX values from theme1.xml), fonts, backgrounds
- Classify each page: cover / toc / transition / content / end_page
- For content pages, identify layout sub-type: left_right, top_bottom, etc.
- If
VL_ENABLED=true in config.txt, use VL model for enhanced layout description
- Extract reusable assets (backgrounds, images)
- Analyze presentation logic (narrative, density rhythm, sections)
- Save as directory:
specs/<name>/ with spec.yaml, pages/, assets/, logic.yaml
Mode B — VL-driven (extract-vl-spec) — no text content, layout dedup
- Read the reference PPTX with
python-pptx, extract every element's properties:
- Position, size (normalized 0-1)
- Font family, size, weight, color, alignment
- Fill color, stroke color/width, corner radius
- Image dimensions
- Z-order, shape name
- Render each slide to PNG via macOS QuickLook
- Send slide image + structured element properties to VL model:
- VL compares the visual image with extracted element attributes
- VL describes each element's ROLE: "Element 1 is the title bar",
"Elements 3-6 form a flowchart in the content area"
- VL identifies composite groups and design patterns
- Layout dedup: group similar pages by element structure signature
- Cover/end_page → one JSON file each
- Content pages with same layout → merged into one JSON file
- Output
specs/<name>/ with:
spec.json — master spec (palette, fonts, canvas, layout index)
cover.json, end_page.json, content_*.json — per-layout blueprints
slides/ — slide PNG screenshots
- Source PPTX copy for reference
See references/spec-format.md.
/ppt — Generate Presentation
- Assess sufficiency: evaluate if user input has enough detail
- If insufficient (topic-only): call
deerflow-skill to research the topic, gather comprehensive content, then apply prompt-ppt-content.md for outlined>
- If sufficient: proceed directly with
prompt-ppt-content.md WPS optimization
- User confirms the outline before generation
- Phase 1: Spec Matching (agent-loop, per slide, in parallel, using VL model):
- Match slide to correct spec page type (cover→cover spec, content→matching layout spec, etc.)
- Generate SVG with strict style constraints from spec
- Evaluate: color match, font match, layout IoU, background, density
- If score < 90% → add fix instructions, regenerate (max 5 iterations)
- All slides generated in parallel via ThreadPoolExecutor
- Phase 2: Layout Design (agent-loop, using
prompt-ppt-layout.md):
- Apply WPS hierarchy: W (navigation) small, P (point) large/bold, S (support) regular
- Typography: sans-serif fonts, 1.5x line spacing, justified text
- Color rules: single primary color, dark text (#333-#444)
- Whitespace: 8-12% margins, breathing room
- Visuals: Bootstrap Icons from
assets/bootstrap-icons-1.13.1/
- Validate layout checklist (max 3 iterations)
- Convert: all SVGs → native-shape PPTX via SVG→DrawingML pipeline
- Output: editable
.pptx with real PowerPoint shapes
Content Gathering Mode
When the user just wants to prepare content without generating PPTX:
- Assess content sufficiency (word count, structure markers)
- If sufficient → directly apply
prompt-ppt-content.md WPS optimization
- If insufficient (topic-only) → call
deerflow-skill to research, then apply WPS optimization
- Output:
outlines/<name>.yaml — ready for /ppt generation
Configuration
Copy config.example.txt to config.txt for VL model analysis in spec extraction:
VL_ENABLED=true
VL_PROVIDER=openai # openai | anthropic | gemini | ollama
VL_MODEL=gpt-4o
VL_API_KEY=sk-...
Resources
| Directory/File |
Contents |
scripts/ppt_cli.py |
CLI entry point |
scripts/ppt_skill/ |
Python package (converter, spec, content, layout, diagram, finalize, evaluator) |
references/spec-format.md |
Design spec schema |
references/prompt-ppt-content.md |
Content generation principles (WPS model) |
references/prompt-ppt-layout.md |
Layout design principles |
references/diagram-styles/ |
Diagram style references (7 styles + icons) |
templates/diagram/ |
Diagram SVG templates |
assets/Illustration/ |
400 vector illustrations (unDraw, MIT License) |
assets/bootstrap-icons-1.13.1/ |
2000+ SVG icons for slides |
assets/templates/icons/ |
11,600+ SVG icons (5 libraries) |
assets/templates/charts/ |
70+ chart/infographic SVGs |
config.example.txt |
Model configuration template |
Illustration Library
assets/Illustration/ contains 283 open-source vector illustrations from unDraw:
Categories
| Category |
Count |
Examples |
| AI & Technology |
10+ |
ai-chat, ai-code-assistant, coding-assistant |
| Data Analytics |
15+ |
analyze, data-table, analytics-setup |
| Team & Collaboration |
10+ |
collaboration, followers, eating-together |
| Success & Achievement |
10+ |
accomplishments, completed, goals |
| Business & Marketing |
15+ |
business-decisions, customer-survey, contract |
| Learning & Education |
10+ |
continuous-learning, exam-prep, five-year-plan |
| Documents & Files |
10+ |
document-ready, file-analysis, add-files |
Search Illustrations
# Search for AI-related illustrations
python3 scripts/ppt_skill/illustration_finder.py search "ai"
# Search by category
python3 scripts/ppt_skill/illustration_finder.py list --category data
# Get random illustrations
python3 scripts/ppt_skill/illustration_finder.py random --count 5
# List all categories
python3 scripts/ppt_skill/illustration_finder.py list --categories
Use in PPT
from pptx import Presentation
from pptx.util import Inches
# Add illustration to slide
prs = Presentation()
slide = prs.slides.add_slide(prs.slide_layouts[6])
slide.shapes.add_picture(
"assets/Illustration/undraw_ai-chat_ljb9.svg",
Inches(1), Inches(1), Inches(4)
)
Customize Colors
Edit SVG fill attributes to match your brand:
<!-- Original orange -->
<path fill="#f9a826" d="..." />
<!-- Change to brand blue -->
<path fill="#0070C0" d="..." />
Requirements
Python 3.10+ with:
python-pptx>=0.6.21
Pillow>=9.0.0
PyYAML>=6.0
Optional for VL analysis: openai, anthropic, or google-generativeai.
1---2name: ppt-skill3description: AI-powered PPT generation skill — extracts design specs from existing PPTX files and generates natively editable .pptx files with agent-loop style verification. Use /ppt-spec to analyze a reference PPTX and extract design spec, or /ppt to generate a presentation. Also use when the user asks to create slides, make a presentation, generate pptx, analyze pptx style, or convert content to slides. Supports cover/toc/content/end_page recognition, multi-layout content, VL model analysis, and 90%+ style fidelity.4---56# PPT Skill78Spec-driven PPT generation: extract design DNA from reference PPTX → gather9content → generate natively editable slides with agent-loop style verification.1011## Slash Commands1213| Command | Purpose |14|---------|---------|15| `/ppt-spec <file.pptx>` | Extract design spec from reference PPTX (cover/toc/content/end_page recognition + layout analysis) |16| `/ppt-spec-vl <file.pptx>` | Extract VL-driven spec with element role analysis, layout dedup, JSON output (no text content) |17| `/ppt-outline <content>` | Generate content outline using WPS model from prompt-ppt-content.md (titles + body only) |18| `/ppt-diagram <type> <content>` | Generate diagram (architecture/flowchart/sequence) from description |19| `/ppt <content or file>` | Generate PPT: gather content → confirm outline → generate PPTX → apply layout design |2021## Quick Start2223```bash24# Extract design spec from a reference PPTX25python scripts/ppt_cli.py extract-spec reference.pptx2627# Generate PPT from content (with agent-loop style verification)28python scripts/ppt_cli.py generate-pptx --spec specs/my_spec/ --outline outline.yaml -o output.pptx --workers 42930# Direct SVG to PPTX conversion31python scripts/ppt_cli.py convert slide1.svg slide2.svg -o output.pptx32```3334## Commands3536| Command | Description |37|---------|-------------|38| `extract-spec <pptx>` | Extract design spec → `specs/<name>/` directory (pages by type, assets, logic.yaml) |39| `extract-vl-spec <pptx>` | Extract VL-driven spec → `specs/<name>/` JSON + slide images (no text, layout dedup) |40| `generate-pptx` | Generate PPTX from spec + outline with agent-loop eval (--spec --outline -o --workers) |41| `convert <svg>... -o <pptx>` | Direct SVG→native-shape PPTX conversion |42| `list-specs` | List available design specs |43| `select-spec <name>` | Set active design spec |44| `gather-content <text\|file>` | Content gathering → slide-by-slide outline (adaptive questioning, 8-question cap) |45| `list-outlines` | List saved content outlines |4647All scripts run from the skill root directory.4849## Workflow5051### `/ppt-outline` — Generate Content Outline5253This command has two modes depending on input richness:5455**Mode A — Topic-only (input <= 30 words, no structure markers)**56The user only provided a topic name (e.g. "AI in Healthcare 2024").57Do NOT proceed with outline generation directly. Instead:58591. **Detect sufficiency**: The skill outputs a structured JSON delegation signal:60 ```json61 {62 "type": "delegate",63 "skill": "deerflow-skill",64 "query": "<topic>",65 "context": "Research this presentation topic comprehensively. Gather key sections, trends, data points, examples, case studies, and supporting evidence needed for a professional slide deck."66 }67 ```682. **Call deerflow-skill**: The outer agent reads this signal and invokes `deerflow-skill` with the query to research the topic thoroughly.693. **Return enriched content**: After deerflow-skill returns comprehensive research, call `ppt-skill` again with the enriched content.704. **Apply prompt-ppt-content.md**: When the content is received (now rich), apply `prompt-ppt-content.md` WPS rules to optimize the content into a structured outline:71 - Each slide gets **W (What)**: Navigation label72 - **P (Point)**: Core conclusion (bold, prominent)73 - **S (Support)**: Evidence (data, cases, quotes)745. **Output**: Markdown outline ready for `/ppt` generation7576**Mode B — Rich content (detailed input with structure)**77The user provided sufficient detail (bullets, sections, or extensive text).78791. **Apply WPS model**: Use `prompt-ppt-content.md` principles directly80 - Analyze input → extract sections and key points81 - Structure each slide with W (What) / P (Point) / S (Support)82 - Validate outline completeness832. **Output**: Markdown outline ready for `/ppt` generation8485### `/ppt-diagram` — Generate Diagram86871. **Classify diagram type**: architecture, data-flow, flowchart, sequence, class, er-diagram, network-topology882. **Extract structure**: identify nodes, edges, containers from description893. **Apply layout rules**:90 - Architecture: horizontal layers (Client → Gateway → Services → Data)91 - Flowchart: top-to-bottom, diamond for decisions92 - Sequence: vertical lifelines with horizontal messages934. **Generate SVG** using 7 visual styles:94 - Style 1: Flat Icon (default, white bg)95 - Style 2: Dark Terminal (monospace, dark bg)96 - Style 3: Blueprint (cyan on navy)97 - Style 4: Notion Clean (minimal)98 - Style 5: Glassmorphism (translucent)99 - Style 6: Claude Official (warm cream)100 - Style 7: OpenAI (green accent)1015. **Export**: SVG + PNG via rsvg-convert102103### `/ppt-spec` — Extract Design Spec104105Two extraction modes:106107**Mode A — Standard (`extract-spec`) — preserves text content**1081091. Read the reference PPTX with `python-pptx` + `lxml`1102. Extract color palette (12 HEX values from theme1.xml), fonts, backgrounds1113. Classify each page: cover / toc / transition / content / end_page1124. For content pages, identify layout sub-type: left_right, top_bottom, etc.1135. If `VL_ENABLED=true` in `config.txt`, use VL model for enhanced layout description1146. Extract reusable assets (backgrounds, images)1157. Analyze presentation logic (narrative, density rhythm, sections)1168. Save as directory: `specs/<name>/` with `spec.yaml`, `pages/`, `assets/`, `logic.yaml`117118**Mode B — VL-driven (`extract-vl-spec`) — no text content, layout dedup**1191201. Read the reference PPTX with `python-pptx`, extract every element's properties:121 - Position, size (normalized 0-1)122 - Font family, size, weight, color, alignment123 - Fill color, stroke color/width, corner radius124 - Image dimensions125 - Z-order, shape name1262. Render each slide to PNG via macOS QuickLook1273. Send slide image + structured element properties to **VL model**:128 - VL compares the visual image with extracted element attributes129 - VL describes each element's ROLE: "Element 1 is the title bar",130 "Elements 3-6 form a flowchart in the content area"131 - VL identifies composite groups and design patterns1324. **Layout dedup**: group similar pages by element structure signature133 - Cover/end_page → one JSON file each134 - Content pages with same layout → merged into one JSON file1355. Output `specs/<name>/` with:136 - `spec.json` — master spec (palette, fonts, canvas, layout index)137 - `cover.json`, `end_page.json`, `content_*.json` — per-layout blueprints138 - `slides/` — slide PNG screenshots139 - Source PPTX copy for reference140141See [references/spec-format.md](references/spec-format.md).142143### `/ppt` — Generate Presentation1441451. **Assess sufficiency**: evaluate if user input has enough detail1462. **If insufficient (topic-only)**: call `deerflow-skill` to research the topic, gather comprehensive content, then apply `prompt-ppt-content.md` for outlined>1473. **If sufficient**: proceed directly with `prompt-ppt-content.md` WPS optimization1484. **User confirms** the outline before generation1495. **Phase 1: Spec Matching** (agent-loop, per slide, in parallel, using VL model):150 - Match slide to correct spec page type (cover→cover spec, content→matching layout spec, etc.)151 - Generate SVG with strict style constraints from spec152 - Evaluate: color match, font match, layout IoU, background, density153 - If score < 90% → add fix instructions, regenerate (max 5 iterations)154 - All slides generated in parallel via ThreadPoolExecutor1556. **Phase 2: Layout Design** (agent-loop, using `prompt-ppt-layout.md`):156 - Apply WPS hierarchy: W (navigation) small, P (point) large/bold, S (support) regular157 - Typography: sans-serif fonts, 1.5x line spacing, justified text158 - Color rules: single primary color, dark text (#333-#444)159 - Whitespace: 8-12% margins, breathing room160 - Visuals: Bootstrap Icons from `assets/bootstrap-icons-1.13.1/`161 - Validate layout checklist (max 3 iterations)1627. **Convert**: all SVGs → native-shape PPTX via SVG→DrawingML pipeline1638. Output: editable `.pptx` with real PowerPoint shapes164165### Content Gathering Mode166167When the user just wants to prepare content without generating PPTX:1681691. Assess content sufficiency (word count, structure markers)1702. If sufficient → directly apply `prompt-ppt-content.md` WPS optimization1713. If insufficient (topic-only) → call `deerflow-skill` to research, then apply WPS optimization1724. Output: `outlines/<name>.yaml` — ready for `/ppt` generation173174## Configuration175176Copy `config.example.txt` to `config.txt` for VL model analysis in spec extraction:177178```ini179VL_ENABLED=true180VL_PROVIDER=openai # openai | anthropic | gemini | ollama181VL_MODEL=gpt-4o182VL_API_KEY=sk-...183```184185## Resources186187| Directory/File | Contents |188|----------------|----------|189| `scripts/ppt_cli.py` | CLI entry point |190| `scripts/ppt_skill/` | Python package (converter, spec, content, layout, diagram, finalize, evaluator) |191| `references/spec-format.md` | Design spec schema |192| `references/prompt-ppt-content.md` | Content generation principles (WPS model) |193| `references/prompt-ppt-layout.md` | Layout design principles |194| `references/diagram-styles/` | Diagram style references (7 styles + icons) |195| `templates/diagram/` | Diagram SVG templates |196| `assets/Illustration/` | **400 vector illustrations** (unDraw, MIT License) |197| `assets/bootstrap-icons-1.13.1/` | 2000+ SVG icons for slides |198| `assets/templates/icons/` | 11,600+ SVG icons (5 libraries) |199| `assets/templates/charts/` | 70+ chart/infographic SVGs |200| `config.example.txt` | Model configuration template |201202## Illustration Library203204`assets/Illustration/` contains **283** open-source vector illustrations from unDraw:205206### Categories207208| Category | Count | Examples |209|----------|-------|----------|210| **AI & Technology** | 10+ | `ai-chat`, `ai-code-assistant`, `coding-assistant` |211| **Data Analytics** | 15+ | `analyze`, `data-table`, `analytics-setup` |212| **Team & Collaboration** | 10+ | `collaboration`, `followers`, `eating-together` |213| **Success & Achievement** | 10+ | `accomplishments`, `completed`, `goals` |214| **Business & Marketing** | 15+ | `business-decisions`, `customer-survey`, `contract` |215| **Learning & Education** | 10+ | `continuous-learning`, `exam-prep`, `five-year-plan` |216| **Documents & Files** | 10+ | `document-ready`, `file-analysis`, `add-files` |217218### Search Illustrations219220```bash221# Search for AI-related illustrations222python3 scripts/ppt_skill/illustration_finder.py search "ai"223224# Search by category225python3 scripts/ppt_skill/illustration_finder.py list --category data226227# Get random illustrations228python3 scripts/ppt_skill/illustration_finder.py random --count 5229230# List all categories231python3 scripts/ppt_skill/illustration_finder.py list --categories232```233234### Use in PPT235236```python237from pptx import Presentation238from pptx.util import Inches239240# Add illustration to slide241prs = Presentation()242slide = prs.slides.add_slide(prs.slide_layouts[6])243slide.shapes.add_picture(244 "assets/Illustration/undraw_ai-chat_ljb9.svg",245 Inches(1), Inches(1), Inches(4)246)247```248249### Customize Colors250251Edit SVG `fill` attributes to match your brand:252253```xml254<!-- Original orange -->255<path fill="#f9a826" d="..." />256257<!-- Change to brand blue -->258<path fill="#0070C0" d="..." />259```260261## Requirements262263Python 3.10+ with:264265```266python-pptx>=0.6.21267Pillow>=9.0.0268PyYAML>=6.0269```270271Optional for VL analysis: `openai`, `anthropic`, or `google-generativeai`.