Slide Generation
by @hh23333
Generate Marp teaching slides from source content for teachers. Use when: (1) Generating Marp-compatible markdown slides from a .md file or folder for teachi...
clawhub install slide-generationš About This Skill
name: slide-generation description: >- Generate Marp teaching slides from source content for teachers. Use when: (1) Generating Marp-compatible markdown slides from a .md file or folder for teaching/presentations, (2) Creating course slides with specific themes (am_blue_course), headers (logo), footers (ę¬äøä¹ē¾¤), and presenter info, (3) Converting educational content (chapters, notes, multiple sources) into slide format, (4) Synthesizing multiple sources into a unified slide deck. NOT for: general document editing, non-Marp presentations.
Slide Generation Skill
Generate Marp slides from source content following the AM Blue Course theme and workflow rules.
Quick Start
1. Identify sources: Read all source .md files (or all .md files in a folder)
2. Read references: Load references/rules.md and references/marp-guide.md before generating
3. Design structure: Plan slide sections from source content
4. Generate: Output .md file with Marp format
Input Modes
Single File
User: ēęå
³äŗ"č®°åæäøę£ē“¢"ēå¹»ēÆēļ¼åŗäŗē¬¬å
«ē« .md
ā Read 第å
«ē« .md, generate slides
Multiple Files / Folder
User: ęčæäøŖę件夹éēå
容ę“åęäøē»ęå¦å¹»ēÆē
ā Read all .md files in the folder, merge by topic/chapter, generate unified slides
When multiple sources are provided:
Output Target
When user specifies an output path (e.g. chapter8/memory-slide.md):
1. Create the output folder (e.g. chapter8/)
2. Copy all used images to chapter8/images/
3. Write the slide markdown to chapter8/memory-slide.md
Image path mapping:
../images/xxx.png ā Output path: ./images/xxx.pngimages/ folder alongside the slide fileMarp YAML Header (Required)
Always use this exact header:
---
marp: true
size: 16:9
theme: am_blue_course
paginate: true
headingDivider: [2,3]
footer: '*ę¬äøä¹ē¾¤*'
Required Slide Structure
1. Cover Page (First Slide)
###### [Subtitle]
[Main Title]
@PresenterName
Subtitle format: use ###### (level 6 heading)
Main title: use # (level 1 heading)
2. Table of Contents (Second Slide)
## ę¬čå
容
Topic 1
Topic 2
...
3. Content Slides
Use ## (level 2 heading) for main section titles. The headingDivider: [2,3] setting automatically splits pages at ## and ### headings.
For content-heavy pages, apply text-size classes:
ā 0.9x font size ā 0.8x font sizeFor narrow/wide images, avoid left-right layouts; use full-width instead.
Core Rules
Must Follow
images/ folderlogo.png as header image (path: images/logo.png in output) or for dense content$...$ (e.g. $f(x) = y$)2.2 not 10.2.2; omit chapter prefixMust NOT
)--- for manual page breaks (headingDivider already handles this)10.2.2 ā use 2.2 insteadLayout Decision Rules
Based on image/table shape:
| Content Shape | Recommended Layout |
|---|---|
| Wide image (aspect < 1:1) | Full-width, no columns |
| Tall image (aspect > 1:1) | Left-right columns possible |
| Square image | Flexible, consider columns |
| Tables | Full-width or right-aligned; avoid narrow columns |
| Code blocks | Full-width, consider tinytext |
| Mixed text + image | Use cols-2 (äŗäŗå) or cols-2-64 (å
åå) |
Image scaling: use !#c w:700 or !#c h:300 to adjust size dynamically.
Column Layout Examples
Two columns (äŗäŗå):
Left column content
Right column content
Two columns (å åå, image on left):
!#c
Right column text
fig-top layout (image on top):
Content text
Available Classes
Reference: assets/example_file/AwesomeMarp_blue.md and assets/example_file/slide.md
Page layout: cols-2, cols-2-64, cols-2-73, cols-2-46, cols-2-37, cols-3, rows-2, pin-3
Text size: tinytext, smalltext, largetext, hugetext
Special: toc_a, cover_c, fig-top, fglass, caption, fixedtitleA, fixedtitleB
Callouts: bq-purple, bq-blue, bq-green, bq-red, bq-black
Image Handling
1. Scan source for ![]() image syntax
2. Copy each image file to output images/ folder
3. In slide markdown, reference images relative to output location: 
4. Map original paths (e.g. ../images/8-figures/8-1.png) to new paths (images/8-1.png)
For logos and theme images, use: images/logo.png (copied from assets/images/logo.png)
Multi-Source Synthesis
When synthesizing from multiple sources:
1. Read all sources first ā get full picture of content 2. Identify overlap ā note repeated topics across files 3. Deduplicate ā consolidate overlapping content 4. Merge by structure: - If sources are chapters of the same book ā follow chapter order - If sources are different perspectives ā create unified section structure - If sources have conflicting info ā prefer user's stated preference or most recent 5. Generate one coherent slide deck ā unified structure, consistent style
Quality Checklist
Before finishing, verify:
images/ folder--- page breaks (headingDivider handles it)$...$ syntax10.2.2 ā use 2.2images/logo.pngš” Examples
1. Identify sources: Read all source .md files (or all .md files in a folder)
2. Read references: Load references/rules.md and references/marp-guide.md before generating
3. Design structure: Plan slide sections from source content
4. Generate: Output .md file with Marp format