slides-grab 1.2.1 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +32 -4
  2. package/bin/ppt-agent.js +76 -36
  3. package/package.json +3 -4
  4. package/scripts/build-viewer.js +48 -21
  5. package/scripts/editor-server.js +113 -18
  6. package/scripts/figma-export.js +16 -1
  7. package/scripts/html2pdf.js +51 -23
  8. package/scripts/html2pptx.js +22 -1
  9. package/scripts/validate-slides.js +22 -5
  10. package/skills/slides-grab/SKILL.md +25 -20
  11. package/skills/slides-grab/references/presentation-workflow-reference.md +12 -11
  12. package/skills/slides-grab-card-news/SKILL.md +35 -0
  13. package/skills/slides-grab-design/SKILL.md +19 -16
  14. package/skills/slides-grab-design/references/design-rules.md +11 -7
  15. package/skills/slides-grab-design/references/design-system-full.md +7 -19
  16. package/skills/slides-grab-design/references/detailed-design-rules.md +6 -1
  17. package/skills/slides-grab-export/SKILL.md +15 -8
  18. package/skills/slides-grab-export/references/html2pptx.md +4 -4
  19. package/skills/slides-grab-plan/SKILL.md +7 -5
  20. package/src/design-styles-data.js +1928 -0
  21. package/src/design-styles.js +55 -0
  22. package/src/editor/codex-edit.js +57 -45
  23. package/src/editor/editor-codex-prompt.md +50 -0
  24. package/src/editor/js/editor-init.js +34 -2
  25. package/src/editor/js/editor-state.js +9 -2
  26. package/src/editor/screenshot.js +4 -3
  27. package/src/export-resolution.cjs +21 -11
  28. package/src/figma.js +11 -3
  29. package/src/pptx-raster-export.cjs +79 -21
  30. package/src/resolve.js +2 -51
  31. package/src/slide-mode.cjs +72 -0
  32. package/src/validation/cli.js +23 -0
  33. package/src/validation/core.js +39 -25
  34. package/templates/design-styles/README.md +19 -0
  35. package/templates/design-styles/preview.html +3356 -0
  36. package/themes/corporate.css +0 -8
  37. package/themes/executive.css +0 -10
  38. package/themes/modern-dark.css +0 -9
  39. package/themes/sage.css +0 -9
  40. package/themes/warm.css +0 -8
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: slides-grab
3
- description: End-to-end presentation workflow for Codex. Use when making a full presentation from scratch — planning, designing slides, editing, and exporting. PDF is preferred; PPTX/Figma export is experimental / unstable.
3
+ description: End-to-end presentation workflow for Codex. Use when making a full presentation from scratch — planning, designing slides, editing, and exporting. PDF and per-slide PNG are preferred; PPTX/Figma export is experimental / unstable.
4
4
  metadata:
5
- short-description: Full pipeline from topic to PDF + experimental / unstable PPTX/Figma export
5
+ short-description: Full pipeline from topic to PDF/PNG + experimental / unstable PPTX/Figma export
6
6
  ---
7
7
 
8
8
  # slides-grab Skill (Codex) - Full Workflow Orchestrator
@@ -18,27 +18,28 @@ Guides you through the complete presentation pipeline from topic to exported fil
18
18
  Use the installed **slides-grab-plan** skill.
19
19
 
20
20
  1. Take user's topic, audience, and tone.
21
- 2. Create `slide-outline.md`.
22
- 3. Present outline to user.
23
- 4. Revise until user explicitly approves.
21
+ 2. **Style selection (mandatory before outline):** Run `slides-grab list-styles`, analyze the topic/tone, and shortlist 2–3 bundled styles that fit. Present the shortlist with reasons. Optionally offer `slides-grab preview-styles` for visual preview. If none of the 35 bundled styles fit, propose a fully custom visual direction. **Get explicit style approval before writing the outline.**
22
+ 3. Create `slide-outline.md` with the chosen style ID in the meta section (`style: <id>`).
23
+ 4. Present outline to user.
24
+ 5. Revise until user explicitly approves.
24
25
 
25
- **Do not proceed to Stage 2 without approval.**
26
+ **Do not proceed to Stage 2 without approval of both style and outline.**
26
27
 
27
28
  ### Stage 2 — Design
28
29
 
29
30
  Use the installed **slides-grab-design** skill.
30
31
 
31
- 1. Read approved `slide-outline.md`.
32
- 2. Generate `slide-*.html` files in the slides workspace (default: `slides/`).
33
- 3. Run validation: `slides-grab validate --slides-dir <path>`
34
- 4. If validation fails, automatically fix the slide HTML/CSS until validation passes.
35
- 5. For bespoke slide imagery, use `slides-grab image --prompt "<prompt>" --slides-dir <path>` so Nano Banana Pro saves a local asset under `<slides-dir>/assets/`.
36
- 6. For complex diagrams (architecture, workflows, relationship maps, multi-node concepts), prefer `tldraw` over hand-built HTML/CSS diagrams. Render the asset with `slides-grab tldraw`, store it under `<slides-dir>/assets/`, and place it in the slide with a normal `<img>`.
37
- 7. Keep local videos under `<slides-dir>/assets/`, prefer `poster="./assets/<file>"` thumbnails, and use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly) when the source starts on a supported web page.
38
- 8. If `GOOGLE_API_KEY` (or `GEMINI_API_KEY`) is unavailable or Nano Banana is down, ask the user for a Google API key or fall back to web search/download into `<slides-dir>/assets/`.
39
- 9. Launch the interactive editor for review: `slides-grab edit --slides-dir <path>`
40
- 10. Revise slides based on user feedback via the editor, then re-run validation after each edit round.
41
- 11. When the user confirms editing is complete, suggest next steps: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final preview, or proceed directly to Stage 3 for PDF/PPTX export.
32
+ 1. Read approved `slide-outline.md` and apply the style specified in its meta section (`style: <id>`). Do not re-open style selection — the style was already approved in Stage 1.
33
+ 3. Generate `slide-*.html` files in the slides workspace (default: `slides/`).
34
+ 4. Run validation: `slides-grab validate --slides-dir <path>`
35
+ 5. If validation fails, automatically fix the slide HTML/CSS until validation passes.
36
+ 6. For bespoke slide imagery, use `slides-grab image --prompt "<prompt>" --slides-dir <path>` so Nano Banana Pro saves a local asset under `<slides-dir>/assets/`.
37
+ 7. For complex diagrams (architecture, workflows, relationship maps, multi-node concepts), prefer `tldraw` over hand-built HTML/CSS diagrams. Render the asset with `slides-grab tldraw`, store it under `<slides-dir>/assets/`, and place it in the slide with a normal `<img>`.
38
+ 8. Keep local videos under `<slides-dir>/assets/`, prefer `poster="./assets/<file>"` thumbnails, and use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly) when the source starts on a supported web page.
39
+ 9. If `GOOGLE_API_KEY` (or `GEMINI_API_KEY`) is unavailable or Nano Banana is down, ask the user for a Google API key or fall back to web search/download into `<slides-dir>/assets/`.
40
+ 10. Launch the interactive editor for review: `slides-grab edit --slides-dir <path>`
41
+ 11. Revise slides based on user feedback via the editor, then re-run validation after each edit round.
42
+ 12. When the user confirms editing is complete, suggest next steps: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final preview, or proceed directly to Stage 3 for PDF/PPTX export.
42
43
 
43
44
  **Do not proceed to Stage 3 without approval.**
44
45
 
@@ -47,9 +48,13 @@ Use the installed **slides-grab-design** skill.
47
48
  Use the installed **slides-grab-export** skill.
48
49
 
49
50
  1. Confirm user wants conversion.
50
- 2. Export to PPTX: `slides-grab convert --slides-dir <path> --output <name>.pptx` (**experimental / unstable**)
51
- 3. Export to PDF (if requested): `slides-grab pdf --slides-dir <path> --output <name>.pdf`
52
- 4. Report results.
51
+ 2. Pick the primary target:
52
+ - Card-news / Instagram-style decks `slides-grab png --slides-dir <path> --slide-mode card-news --resolution 2160p` (see `slides-grab-card-news`).
53
+ - Widescreen decks → `slides-grab pdf --slides-dir <path> --output <name>.pdf`.
54
+ 3. Per-slide PNG (any mode): `slides-grab png --slides-dir <path> --output-dir <path>/out-png --resolution 2160p`.
55
+ 4. PPTX (optional, **experimental / unstable**): `slides-grab convert --slides-dir <path> --output <name>.pptx`.
56
+ 5. Figma-importable PPTX (optional, **experimental / unstable**): `slides-grab figma --slides-dir <path> --output <name>-figma.pptx`.
57
+ 6. Report results.
53
58
 
54
59
  ---
55
60
 
@@ -22,17 +22,18 @@ Use the installed **slides-grab-plan** skill.
22
22
  Use the installed **slides-grab-design** skill.
23
23
 
24
24
  1. Read approved `slide-outline.md`.
25
- 2. Generate `slide-*.html` files in the slides workspace (default: `slides/`).
26
- 3. Run validation: `slides-grab validate --slides-dir <path>`
27
- 4. If validation fails, automatically fix the slide HTML/CSS until validation passes.
28
- 5. Build the viewer: `slides-grab build-viewer --slides-dir <path>`
29
- 6. When a slide calls for bespoke imagery, prefer `slides-grab image --prompt "<prompt>" --slides-dir <path>` so Nano Banana Pro saves a local asset under `<slides-dir>/assets/`.
30
- 7. For complex diagrams (architecture, workflows, relationship maps, multi-node concepts), prefer `tldraw`. Render a local diagram asset with `slides-grab tldraw`, store it under `<slides-dir>/assets/`, and place it into the slide with a normal `<img>`.
31
- 8. Keep local videos under `<slides-dir>/assets/`, prefer `poster="./assets/<file>"` thumbnails, and use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly) when the source starts on a supported web page.
32
- 9. If `GOOGLE_API_KEY` or `GEMINI_API_KEY` is unavailable, or the Nano Banana API fails, ask the user for a Google API key or fall back to web search + download into `<slides-dir>/assets/`.
33
- 10. Present viewer to user for review.
34
- 11. Revise individual slides based on feedback, then re-run validation and rebuild the viewer.
35
- 12. Optionally launch the visual editor: `slides-grab edit --slides-dir <path>`
25
+ 2. If the user has not approved a visual direction yet, use `slides-grab list-styles` to shortlist bundled styles, optionally `slides-grab preview-styles` to open the visual gallery in browser, and agree on a direction with the user. If none of the 35 bundled styles fit, design a fully custom visual direction.
26
+ 3. Generate `slide-*.html` files in the slides workspace (default: `slides/`).
27
+ 4. Run validation: `slides-grab validate --slides-dir <path>`
28
+ 5. If validation fails, automatically fix the slide HTML/CSS until validation passes.
29
+ 6. Build the viewer: `slides-grab build-viewer --slides-dir <path>`
30
+ 7. When a slide calls for bespoke imagery, prefer `slides-grab image --prompt "<prompt>" --slides-dir <path>` so Nano Banana Pro saves a local asset under `<slides-dir>/assets/`.
31
+ 8. For complex diagrams (architecture, workflows, relationship maps, multi-node concepts), prefer `tldraw`. Render a local diagram asset with `slides-grab tldraw`, store it under `<slides-dir>/assets/`, and place it into the slide with a normal `<img>`.
32
+ 9. Keep local videos under `<slides-dir>/assets/`, prefer `poster="./assets/<file>"` thumbnails, and use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly) when the source starts on a supported web page.
33
+ 10. If `GOOGLE_API_KEY` or `GEMINI_API_KEY` is unavailable, or the Nano Banana API fails, ask the user for a Google API key or fall back to web search + download into `<slides-dir>/assets/`.
34
+ 11. Present viewer to user for review.
35
+ 12. Revise individual slides based on feedback, then re-run validation and rebuild the viewer.
36
+ 13. Optionally launch the visual editor: `slides-grab edit --slides-dir <path>`
36
37
 
37
38
  **Do not proceed to Stage 3 without approval.**
38
39
 
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: slides-grab-card-news
3
+ description: Generate square Instagram-style card news by reusing the slides-grab workflow with card-news mode enabled. Defaults to per-slide PNG export.
4
+ metadata:
5
+ short-description: Square card-news workflow on top of slides-grab (PNG by default)
6
+ ---
7
+
8
+ # slides-grab Card News Skill (Codex)
9
+
10
+ Use this when the user wants card news instead of a widescreen presentation.
11
+
12
+ ## Goal
13
+ Reuse the existing slides-grab plan/design/export workflow, but generate **square** outputs optimized for Instagram posts. Per-slide PNG is the default export since Instagram and most card-news distribution channels consume images, not PDFs.
14
+
15
+ ## Workflow
16
+ 1. Reuse the normal outline process from `slides-grab-plan`.
17
+ 2. During design and review, keep every card at **720pt x 720pt** and run:
18
+ - `slides-grab validate --slides-dir <path> --mode card-news`
19
+ - `slides-grab build-viewer --slides-dir <path> --mode card-news`
20
+ - `slides-grab edit --slides-dir <path> --mode card-news`
21
+ 3. During export, **default to per-slide PNG** for Instagram-ready output:
22
+ - `slides-grab png --slides-dir <path> --slide-mode card-news --resolution 2160p`
23
+ - Optional `--output-dir <path>/out-png` to choose the output folder (defaults to `<slides-dir>/out-png`).
24
+ 4. Only produce PDF/PPTX/Figma when the user explicitly asks for it:
25
+ - `slides-grab pdf --slides-dir <path> --slide-mode card-news --output <name>.pdf`
26
+ - `slides-grab convert --slides-dir <path> --mode card-news --output <name>.pptx` (**experimental / unstable**)
27
+ - `slides-grab figma --slides-dir <path> --mode card-news --output <name>-figma.pptx` (**experimental / unstable**)
28
+ 5. Remind the user that PPTX/Figma exports remain experimental / unstable.
29
+
30
+ ## Rules
31
+ - Optimize layouts for square Instagram-style card news, not 16:9 slides.
32
+ - Default the export to `slides-grab png --slide-mode card-news`; only switch to PDF/PPTX/Figma when the user explicitly requests it.
33
+ - Reuse existing design, viewer, editor, and export policy wherever possible.
34
+ - Do **not** implement SNS/Instagram publishing automation.
35
+ - Use the packaged CLI and bundled skills only.
@@ -13,8 +13,7 @@ Use this after `slide-outline.md` is approved.
13
13
  Generate high-quality `slide-XX.html` files in the selected slides workspace (`slides/` by default) and support revision loops.
14
14
 
15
15
  ## Inputs
16
- - Approved `slide-outline.md`
17
- - Theme/layout preferences
16
+ - Approved `slide-outline.md` (must contain `style: <id>` in meta section — style was approved in Stage 1)
18
17
  - Requested edits per slide
19
18
 
20
19
  ## Outputs
@@ -22,20 +21,23 @@ Generate high-quality `slide-XX.html` files in the selected slides workspace (`s
22
21
  - Updated `<slides-dir>/viewer.html` via build script
23
22
 
24
23
  ## Workflow
25
- 1. Read approved `slide-outline.md`.
26
- 2. Before generating slides, write a quick **visual thesis** (mood/material/energy), a **content plan** (opener support/proof detail/story close/CTA), and the core design tokens (background, surface, text, muted, accent + display/headline/body/caption roles).
27
- 3. Generate slide HTML files with 2-digit numbering in selected `--slides-dir`.
28
- 4. When a slide explicitly needs bespoke imagery, when the user asks for an image, or when stronger imagery would materially improve the slide, prefer `slides-grab image --prompt "<prompt>" --slides-dir <path>` to generate a local asset with Nano Banana Pro and save it under `<slides-dir>/assets/`.
29
- 5. If the deck needs a complex diagram (architecture, workflows, relationship maps, multi-node concepts), create the diagram in `tldraw`, export it with `slides-grab tldraw`, and treat the result as a local slide asset under `<slides-dir>/assets/`.
30
- 6. If the slide needs a local video, store the video under `<slides-dir>/assets/`, reference it as `./assets/<file>`, and prefer a `poster="./assets/<file>"` thumbnail so PDF export uses a stable still image.
31
- 7. If the source video starts on YouTube or another supported page, use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly if needed) to download it into `<slides-dir>/assets/` before saving the slide HTML.
32
- 8. Run `slides-grab validate --slides-dir <path>` after generation or edits.
33
- 9. If validation fails, automatically fix the source slide HTML/CSS and re-run validation until it passes.
34
- 10. Run the slide litmus check from `references/beautiful-slide-defaults.md` before presenting the deck for review.
35
- 11. Launch the interactive editor for visual review: `slides-grab edit --slides-dir <path>`
36
- 12. Iterate on user feedback by editing only requested slide files, then re-run validation after each edit round.
37
- 13. When the user confirms editing is complete, suggest: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final read-only preview, or proceed to export (PDF/PPTX).
38
- 14. Keep revising until user approves conversion stage.
24
+ 1. Read approved `slide-outline.md` and extract the `style` field from its meta section.
25
+ 2. Load the chosen style's full spec from `src/design-styles-data.js` colors, fonts, layout, signature elements, and things to avoid. If the meta specifies a custom direction instead of a bundled ID, use that custom direction as the design basis.
26
+ 3. Before generating slides, write a quick **visual thesis** (mood/material/energy), a **content plan** (opener → support/proof → detail/story → close/CTA), and the core design tokens (background, surface, text, muted, accent + display/headline/body/caption roles). Ground these tokens in the chosen style's spec.
27
+ 4. If you need to confirm or revisit the approved bundled style before designing, re-run `slides-grab list-styles` and open the gallery from `slides-grab preview-styles` so the Stage 2 deck stays aligned with the Stage 1 direction.
28
+ 5. Generate slide HTML files with 2-digit numbering in selected `--slides-dir`.
29
+ 6. When a slide needs iconography, prefer Lucide as the default icon library. Use clean Lucide icons before falling back to emoji, and only use emoji when the brief explicitly calls for them.
30
+ 7. When a slide explicitly needs bespoke imagery, when the user asks for an image, or when stronger imagery would materially improve the slide, prefer `slides-grab image --prompt "<prompt>" --slides-dir <path>` to generate a local asset with Nano Banana Pro and save it under `<slides-dir>/assets/`.
31
+ 8. If the deck needs a complex diagram (architecture, workflows, relationship maps, multi-node concepts), create the diagram in `tldraw`, export it with `slides-grab tldraw`, and treat the result as a local slide asset under `<slides-dir>/assets/`.
32
+ 9. If the slide needs a local video, store the video under `<slides-dir>/assets/`, reference it as `./assets/<file>`, and prefer a `poster="./assets/<file>"` thumbnail so PDF export uses a stable still image.
33
+ 10. If the source video starts on YouTube or another supported page, use `slides-grab fetch-video --url <youtube-url> --slides-dir <path>` (or `yt-dlp` directly if needed) to download it into `<slides-dir>/assets/` before saving the slide HTML.
34
+ 11. Run `slides-grab validate --slides-dir <path>` after generation or edits.
35
+ 12. If validation fails, automatically fix the source slide HTML/CSS and re-run validation until it passes.
36
+ 13. Run the slide litmus check from `references/beautiful-slide-defaults.md` before presenting the deck for review.
37
+ 14. Launch the interactive editor for visual review: `slides-grab edit --slides-dir <path>`
38
+ 15. Iterate on user feedback by editing only requested slide files, then re-run validation after each edit round.
39
+ 16. When the user confirms editing is complete, suggest: build the viewer (`slides-grab build-viewer --slides-dir <path>`) for a final read-only preview, or proceed to export (PDF/PPTX).
40
+ 17. Keep revising until user approves conversion stage.
39
41
 
40
42
  ## Rules
41
43
  - Keep slide size 720pt x 405pt.
@@ -43,6 +45,7 @@ Generate high-quality `slide-XX.html` files in the selected slides workspace (`s
43
45
  - Put local images and videos under `<slides-dir>/assets/` and reference them as `./assets/<file>`.
44
46
  - Allow `data:` URLs when the slide must be fully self-contained.
45
47
  - Do not leave remote `http(s)://` image URLs in saved slide HTML; download source images into `<slides-dir>/assets/` and reference them as `./assets/<file>`.
48
+ - Prefer Lucide for default slide iconography. Avoid emoji as the default icon treatment unless the brief explicitly asks for emoji.
46
49
  - Prefer `slides-grab image` with Nano Banana Pro for bespoke slide imagery before reaching for remote URLs.
47
50
  - If `GOOGLE_API_KEY` (or `GEMINI_API_KEY`) is unavailable or the Nano Banana API fails, ask the user for a Google API key or fall back to web search + download into `<slides-dir>/assets/`.
48
51
  - Prefer local videos with a `poster="./assets/<file>"` thumbnail so PDF export uses the still image.
@@ -9,6 +9,8 @@ These are the packaged design rules for installable `slides-grab` skills.
9
9
  - Generate a bespoke image asset: `slides-grab image --prompt "<prompt>" --slides-dir <path>`
10
10
  - Download a web video into slide assets: `slides-grab fetch-video --url <youtube-url> --slides-dir <path>`
11
11
  - Render `tldraw` diagrams: `slides-grab tldraw --input <path> --output <path>`
12
+ - List bundled design collections: `slides-grab list-styles`
13
+ - Open the visual style gallery in browser: `slides-grab preview-styles`
12
14
 
13
15
  ## Slide spec
14
16
  - Slide size: `720pt x 405pt` (16:9)
@@ -17,6 +19,11 @@ These are the packaged design rules for installable `slides-grab` skills.
17
19
  - CSS colors must include `#`
18
20
  - Avoid CSS gradients for PPTX-targeted decks
19
21
 
22
+ ## Icon guidance
23
+ - Prefer Lucide as the default icon library when a slide needs iconography.
24
+ - Avoid emoji as the default icon treatment; only use emoji when the brief explicitly calls for them.
25
+ - Keep icons visually consistent within a deck (stroke weight, size, and color should follow the slide's design tokens).
26
+
20
27
  ## Asset rules
21
28
  - Store deck-local assets in `<slides-dir>/assets/`
22
29
  - Reference deck-local assets as `./assets/<file>`
@@ -30,13 +37,6 @@ These are the packaged design rules for installable `slides-grab` skills.
30
37
  - Do not leave remote `http(s)://` image URLs in saved slide HTML
31
38
  - Never use absolute filesystem paths
32
39
 
33
- ## Package-published theme references
34
- - `themes/executive.css`
35
- - `themes/sage.css`
36
- - `themes/modern-dark.css`
37
- - `themes/corporate.css`
38
- - `themes/warm.css`
39
-
40
40
  ## Package-published template references
41
41
  - `templates/cover.html`
42
42
  - `templates/contents.html`
@@ -52,8 +52,12 @@ These are the packaged design rules for installable `slides-grab` skills.
52
52
  - `templates/diagram.html`
53
53
  - `templates/diagram-tldraw.html`
54
54
  - `templates/custom/`
55
+ - `templates/design-styles/README.md` — bundled design collection reference derived from `corazzon/pptx-design-styles`
56
+ - `templates/design-styles/preview.html` — visual gallery of all 35 styles (open with `slides-grab preview-styles`)
57
+ - `src/design-styles-data.js` — full style specs (colors, fonts, layout, signature elements, things to avoid) for all 35 bundled styles; read this after the user picks a style to ground your design tokens
55
58
 
56
59
  ## Review loop
60
+ - The design style is chosen in Stage 1 (Plan) and recorded in `slide-outline.md`'s meta section (`style: <id>`). Do not re-open style selection in Stage 2 — read and apply the already-approved style.
57
61
  - Generate or edit only the needed slide files.
58
62
  - Prefer `slides-grab image` before remote image sourcing when the slide needs bespoke imagery.
59
63
  - Prefer `tldraw` for complex diagrams instead of hand-building dense diagram geometry in HTML/CSS.
@@ -97,27 +97,15 @@ line-height: 1;
97
97
 
98
98
  ## Color Palette System
99
99
 
100
- ### 1. Executive Minimal (Recommended Default)
101
- Refined business presentation look
102
- - File: `themes/executive.css`
100
+ All color palettes are now bundled as design styles accessible via `slides-grab list-styles`. The five original palettes are styles 31–35:
103
101
 
104
- ### 2. Sage Professional
105
- Calm and trustworthy tone
106
- - File: `themes/sage.css`
102
+ - **executive-minimal** Refined business (warm white + black accent)
103
+ - **sage-professional** — Calm and trustworthy (sage green tones)
104
+ - **modern-dark** — High-impact dark (pure dark + white text)
105
+ - **corporate-blue** — Traditional business (white + blue accent)
106
+ - **warm-neutral** — Warm and approachable (cream + terracotta)
107
107
 
108
- ### 3. Modern Dark
109
- High-impact dark theme
110
- - File: `themes/modern-dark.css`
111
-
112
- ### 4. Corporate Blue
113
- Traditional business tone
114
- - File: `themes/corporate.css`
115
-
116
- ### 5. Warm Neutral
117
- Warm and approachable tone
118
- - File: `themes/warm.css`
119
-
120
- Theme files use shared CSS variables (`:root`). Copy a theme file to create a custom theme.
108
+ Run `slides-grab list-styles` to browse all 35 bundled styles, or design a fully custom palette when none fit.
121
109
 
122
110
  ---
123
111
 
@@ -24,6 +24,11 @@
24
24
  - All text must be inside `<p>`, `<h1>`-`<h6>`, `<ul>`, `<ol>`, or `<li>`.
25
25
  - Never place text directly in `<div>` or `<span>`.
26
26
 
27
+ ## Icon Usage Rules
28
+ - Prefer Lucide as the default icon library for slide UI elements, callouts, and supporting visuals.
29
+ - Do not default to emoji for iconography; reserve emoji for cases where the brief explicitly wants a playful or native-emoji tone.
30
+ - Keep icon sizing, stroke weight, and color aligned with the deck's approved design tokens.
31
+
27
32
  ## Workflow (Stage 2: Design + Human Review)
28
33
  - After slide generation or edits, run `slides-grab validate --slides-dir <path>`.
29
34
  - After validation passes, run `slides-grab build-viewer --slides-dir <path>`.
@@ -36,7 +41,7 @@
36
41
  - Do not persist runtime-only editor/viewer injections in saved slide HTML.
37
42
 
38
43
  ## Important Notes
39
- - CSS gradients are not supported in PowerPoint conversion; replace them with background images.
44
+ - CSS gradients may not export cleanly to all formats; prefer solid colors or background images when possible.
40
45
  - Always include the Pretendard CDN link.
41
46
  - Use `./assets/<file>` from each `slide-XX.html` for local images and videos, and avoid absolute filesystem paths.
42
47
  - Always include `#` prefix in CSS colors.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: slides-grab-export
3
- description: Stage 3 conversion skill for Codex. Convert approved HTML slides to PDF and to experimental / unstable PPTX/Figma outputs, then validate artifacts.
3
+ description: Stage 3 conversion skill for Codex. Convert approved HTML slides to PDF or per-slide PNG reliably, and to experimental / unstable PPTX/Figma outputs on a best-effort basis.
4
4
  metadata:
5
5
  short-description: Convert slides and run conversion checks
6
6
  ---
@@ -10,24 +10,31 @@ metadata:
10
10
  Use this only after the user approves design output.
11
11
 
12
12
  ## Goal
13
- Convert reviewed slide HTML into PDF reliably, and into experimental / unstable PPTX/Figma outputs on a best-effort basis.
13
+ Convert reviewed slide HTML into PDF or per-slide PNG reliably, and into experimental / unstable PPTX/Figma outputs on a best-effort basis.
14
14
 
15
15
  ## Inputs
16
16
  - Approved `<slides-dir>/slide-*.html`
17
17
  - Optional output path settings
18
18
 
19
19
  ## Outputs
20
- - Presentation artifact (`.pptx` or `.pdf`)
20
+ - Presentation artifact (`.pdf`, `.png` per slide, or `.pptx`)
21
21
 
22
22
  ## Workflow
23
23
  1. Confirm user approval for conversion.
24
- 2. Run conversion command:
25
- - `slides-grab convert --slides-dir <path> --output <name>.pptx` (**experimental / unstable**)
26
- 3. If requested, run PDF conversion:
24
+ 2. Pick the right primary target:
25
+ - Card-news / Instagram-style decks → `slides-grab png --slides-dir <path> --slide-mode card-news --resolution 2160p` (see `slides-grab-card-news`).
26
+ - Widescreen slide decks `slides-grab pdf --slides-dir <path> --output <name>.pdf`.
27
+ 3. When per-slide raster output is needed (card news, social posts, thumbnails):
28
+ - `slides-grab png --slides-dir <path> --output-dir <path>/out-png --resolution 2160p`
29
+ - Add `--slide-mode card-news` for 1:1 cards.
30
+ 4. If the user also wants a PDF deck:
27
31
  - `slides-grab pdf --slides-dir <path> --output <name>.pdf`
28
- 4. If requested, run Figma export:
32
+ - Add `--slide-mode card-news` when the deck is square.
33
+ 5. If the user wants PPTX (experimental / unstable):
34
+ - `slides-grab convert --slides-dir <path> --output <name>.pptx`
35
+ 6. If the user wants Figma-importable PPTX (experimental / unstable):
29
36
  - `slides-grab figma --slides-dir <path> --output <name>-figma.pptx`
30
- 5. Report success/failure with actionable errors.
37
+ 7. Report success/failure with actionable errors.
31
38
 
32
39
  ## Rules
33
40
  - Do not modify slide content during conversion stage unless explicitly requested.
@@ -84,7 +84,7 @@ Every HTML slide must include proper body dimensions:
84
84
  - **CRITICAL: Never use CSS gradients (`linear-gradient`, `radial-gradient`)** - They don't convert to PowerPoint
85
85
  - **ALWAYS create gradient/icon PNGs FIRST using Sharp, then reference in HTML**
86
86
  - For gradients: Rasterize SVG to PNG background images
87
- - For icons: Rasterize react-icons SVG to PNG images
87
+ - For icons: Rasterize Lucide SVG to PNG images
88
88
  - All visual effects must be pre-rendered as raster images before HTML rendering
89
89
 
90
90
  **Rasterizing Icons with Sharp:**
@@ -93,11 +93,11 @@ Every HTML slide must include proper body dimensions:
93
93
  const React = require('react');
94
94
  const ReactDOMServer = require('react-dom/server');
95
95
  const sharp = require('sharp');
96
- const { FaHome } = require('react-icons/fa');
96
+ const { House } = require('lucide-react');
97
97
 
98
98
  async function rasterizeIconPng(IconComponent, color, size = "256", filename) {
99
99
  const svgString = ReactDOMServer.renderToStaticMarkup(
100
- React.createElement(IconComponent, { color: `#${color}`, size: size })
100
+ React.createElement(IconComponent, { color: `#${color}`, size: size, strokeWidth: 1.75 })
101
101
  );
102
102
 
103
103
  // Convert SVG to PNG using Sharp
@@ -109,7 +109,7 @@ async function rasterizeIconPng(IconComponent, color, size = "256", filename) {
109
109
  }
110
110
 
111
111
  // Usage: Rasterize icon before using in HTML
112
- const iconPath = await rasterizeIconPng(FaHome, "4472c4", "256", "home-icon.png");
112
+ const iconPath = await rasterizeIconPng(House, "4472c4", "256", "home-icon.png");
113
113
  // Then reference in HTML: <img src="home-icon.png" style="width: 40pt; height: 40pt;">
114
114
  ```
115
115
 
@@ -19,17 +19,19 @@ Produce an approved `slide-outline.md` before any slide HTML generation.
19
19
  - Optional research findings
20
20
 
21
21
  ## Output
22
- - `slide-outline.md`
22
+ - `slide-outline.md` (must include `style: <id>` in meta section)
23
23
 
24
24
  ## Workflow
25
25
  1. Analyze user goal and audience.
26
- 2. Create or revise `slide-outline.md` with ordered slides and key messages.
27
- 3. Present a concise summary to user.
28
- 4. Repeat revisions until explicit approval.
26
+ 2. **Style selection (mandatory, before outline):** Run `slides-grab list-styles`, shortlist 2–3 styles that match the topic/tone, present the shortlist with reasons, and get explicit user approval. Optionally offer `slides-grab preview-styles` for visual preview. If no bundled style fits, propose a custom direction and get approval.
27
+ 3. Create or revise `slide-outline.md` with ordered slides and key messages. Record the approved style ID in the meta section (`style: <id>`).
28
+ 4. Present a concise summary to user.
29
+ 5. Repeat revisions until explicit approval.
29
30
 
30
31
  ## Rules
32
+ - **Do not write the outline before the user approves a style.** Style selection comes first.
31
33
  - Do not generate slide HTML (`<slides-dir>/slide-*.html`) in this stage.
32
- - Keep scope to structure and narrative.
34
+ - Keep scope to structure, narrative, and style selection.
33
35
  - Ask for approval before moving to design.
34
36
  - Assume later stages run through the packaged `slides-grab` CLI.
35
37
  - Use the packaged CLI and bundled references only; do not depend on unpublished agent-specific files.