Deck generator skill

Generate professional presentations with AI-generated images.

by ericosiu·MIT license·★ 3,615 Stars on the repo·GitHub ↗

Use now

Files of Deck generator

ericosiu/main1 file shown
SKILL.md
Show the full text107 lines

Deck Generator

Generate complete presentations where every slide is an AI-generated image in a consistent visual style.

Quick Start

  1. Read the content spec (user provides slide content or a markdown file)
  2. Read references/styles.md to pick or customize a visual style
  3. Run scripts/generate-deck.py with content + style

Workflow

Step 1: Content Spec

Accept slide content in any format. Normalize to this structure per slide:

  • Title: Bold headline
  • Body: Key points, stats, or narrative
  • Visual cues: Icons, diagrams, layouts described in words

If user provides a markdown file with --- separators, parse each section as a slide. If user provides a topic only, generate 10-14 slides following standard deck structures.

Step 2: Style Selection

Available style presets:

Style Description
whiteboard Hand-drawn sketch on white. Black ink, orange accents.
corporate Navy/white/gold. Clean sans-serif. Professional.
minimalist Pure white, electric blue accent. Maximum negative space.
dark-tech Near-black background, neon green. Terminal aesthetic.
playful Bright pastels, rounded shapes. Modern startup vibe.
editorial Black/white with red spot color. Magazine aesthetic.

Default: whiteboard. User can specify any preset or describe a custom style.

Step 3: Generate
# Set your API key
export GEMINI_API_KEY="your-gemini-api-key"

# Run the generator
python3 scripts/generate-deck.py \
  --content slides.json \
  --style whiteboard \
  --title "Deck Title" \
  [--output-dir ./output] \
  [--aspect 16:9]

The script:

  1. Generates each slide image via Imagen 4.0 API
  2. Saves all images to the output directory
  3. Optionally creates a Google Slides presentation (requires Google Slides API credentials)
  4. Returns paths to all generated images
Step 4: Review & Iterate

To regenerate individual slides:

python3 scripts/generate-deck.py \
  --content slides.json \
  --style whiteboard \
  --slides 3,7 \
  --output-dir ./output

Key Details

  • Cost: ~4 cents per image. A 14-slide deck costs roughly 56 cents in API calls.
  • Speed: ~2 minutes for 14 slides.
  • API: Imagen 4.0 via Google's Generative Language API
  • Auth: Set $GEMINI_API_KEY environment variable
  • Aspect ratios: 16:9 (default), 1:1, 4:3, 3:4, 9:16
  • Image models: imagen-4.0-generate-001 (best quality), imagen-4.0-fast-generate-001 (faster)

Content JSON Format

[
  {"name": "01-title", "prompt": "Title slide: 'Your Deck Title' with company logo placeholder"},
  {"name": "02-problem", "prompt": "Problem slide showing frustrated marketer staring at dashboard with declining metrics"},
  {"name": "03-solution", "prompt": "Solution slide: AI agent workflow diagram with 3 connected boxes"}
]

Google Slides Integration (Optional)

To automatically create a Google Slides presentation, set up Google Slides API credentials:

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
python3 scripts/generate-deck.py \
  --content slides.json \
  --style whiteboard \
  --title "My Deck" \
  --google-slides \
  --google-account [email protected]
1---
2name: deck-generator
3description: Generate professional presentations with AI-generated images. Use when asked to create a deck, presentation, pitch deck, or slides. Supports style presets (whiteboard, corporate, minimalist, etc). Uses Imagen 4.0 API for image generation and Google Slides API for assembly. Produces full decks from markdown content specs in minutes.
4---
5 
6# Deck Generator
7 
8Generate complete presentations where every slide is an AI-generated image in a consistent visual style.
9 
10## Quick Start
11 
121. Read the content spec (user provides slide content or a markdown file)
132. Read `references/styles.md` to pick or customize a visual style
143. Run `scripts/generate-deck.py` with content + style
15 
16## Workflow
17 
18### Step 1: Content Spec
19 
20Accept slide content in any format. Normalize to this structure per slide:
21- **Title**: Bold headline
22- **Body**: Key points, stats, or narrative
23- **Visual cues**: Icons, diagrams, layouts described in words
24 
25If user provides a markdown file with `---` separators, parse each section as a slide.
26If user provides a topic only, generate 10-14 slides following standard deck structures.
27 
28### Step 2: Style Selection
29 
30Available style presets:
31 
32| Style | Description |
33|-------|-------------|
34| `whiteboard` | Hand-drawn sketch on white. Black ink, orange accents. |
35| `corporate` | Navy/white/gold. Clean sans-serif. Professional. |
36| `minimalist` | Pure white, electric blue accent. Maximum negative space. |
37| `dark-tech` | Near-black background, neon green. Terminal aesthetic. |
38| `playful` | Bright pastels, rounded shapes. Modern startup vibe. |
39| `editorial` | Black/white with red spot color. Magazine aesthetic. |
40 
41Default: `whiteboard`. User can specify any preset or describe a custom style.
42 
43### Step 3: Generate
44 
45```bash
46# Set your API key
47export GEMINI_API_KEY="your-gemini-api-key"
48 
49# Run the generator
50python3 scripts/generate-deck.py \
51 --content slides.json \
52 --style whiteboard \
53 --title "Deck Title" \
54 [--output-dir ./output] \
55 [--aspect 16:9]
56```
57 
58The script:
591. Generates each slide image via Imagen 4.0 API
602. Saves all images to the output directory
613. Optionally creates a Google Slides presentation (requires Google Slides API credentials)
624. Returns paths to all generated images
63 
64### Step 4: Review & Iterate
65 
66To regenerate individual slides:
67```bash
68python3 scripts/generate-deck.py \
69 --content slides.json \
70 --style whiteboard \
71 --slides 3,7 \
72 --output-dir ./output
73```
74 
75## Key Details
76 
77- **Cost**: ~4 cents per image. A 14-slide deck costs roughly 56 cents in API calls.
78- **Speed**: ~2 minutes for 14 slides.
79- **API**: Imagen 4.0 via Google's Generative Language API
80- **Auth**: Set `$GEMINI_API_KEY` environment variable
81- **Aspect ratios**: 16:9 (default), 1:1, 4:3, 3:4, 9:16
82- **Image models**: `imagen-4.0-generate-001` (best quality), `imagen-4.0-fast-generate-001` (faster)
83 
84## Content JSON Format
85 
86```json
87[
88 {"name": "01-title", "prompt": "Title slide: 'Your Deck Title' with company logo placeholder"},
89 {"name": "02-problem", "prompt": "Problem slide showing frustrated marketer staring at dashboard with declining metrics"},
90 {"name": "03-solution", "prompt": "Solution slide: AI agent workflow diagram with 3 connected boxes"}
91]
92```
93 
94## Google Slides Integration (Optional)
95 
96To automatically create a Google Slides presentation, set up Google Slides API credentials:
97 
98```bash
99export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
100python3 scripts/generate-deck.py \
101 --content slides.json \
102 --style whiteboard \
103 --title "My Deck" \
104 --google-slides \
105 --google-account [email protected]
106```
107 

Discussion

Alternatives

Visual explainerGenerate self-contained HTML visual explanations for systems, code changes, plans, data, and technical concepts. Use for diagrams, architecture overviews, diff or plan reviews, project recaps, comparison tables, slide decks, animated explainers, and other visual explanations.Design & UI · MIThtml-ppt — HTML PPT StudioHTML PPT Studio — author professional static HTML presentations in many styles, layouts, and animations, all driven by templates. Use when the user asks for a presentation, PPT, slides, keynote, deck, slideshow, "幻灯片", "演讲稿", "做一份 PPT", "做一份 slides", a reveal-style HTML deck, a 小红书 图文, or any kind of multi-slide pitch/report/sharing document that should look tasteful and be usable with keyboard navigation. Triggers include keywords like "presentation", "ppt", "slides", "deck", "keynote", "reveal", "slideshow", "幻灯片", "演讲稿", "分享稿", "小红书图文", "talk slides", "pitch deck", "tech sharing", "technical presentation".Design & UI · MITPR LensWHAT: Draws a code change or part of a codebase as an animated architecture or data-flow diagram, on its own or in a pull request. WHEN: asked to diagram, visualise or explain a change or a system, or when a pull request should carry a diagram. KEYWORDS: PR Lens, diagram, architecture, data flow, visualise, visualize, pull requestDesign & UI · MITReladrawWrite, render and edit diagrams in reladraw, a text diagram language where you say where things go, so the arrangement can be read back out of the source without looking at the picture. Use when asked to draw, diagram, sketch or visualize an architecture, a system, a data flow, a pipeline, a deployment, a directory layout, or the shape of a change or pull request; when reading or editing a .reladraw file; or when the user says "reladraw", "diagram this", "draw the architecture", "show me how these pieces fit". Use it in place of Mermaid, Graphviz, D2 or hand-drawn ASCII boxes whenever a node-and-line diagram is wanted and reladraw is installed. NOT for charts of data — bar, line, pie, scatter — and NOT for pictures that are not nodes and lines.Design & UI · Apache-2.0