Purpose
Guide the agent to write production-ready Quarto Reveal.js slides in a single pass:
- Correct YAML configuration
- SCSS theme customization (variables + rules)
- Layout patterns (columns, absolute positioning, backgrounds)
- Extension usage (Font Awesome, embedio, editable)
- Accessibility and maintainability
When to Use This Skill
Use when:
- Creating new
.qmd presentation files
- Writing or modifying SCSS themes for Reveal.js
- Adding extensions (icons, embeds, interactive elements)
- Troubleshooting slide rendering issues
- Converting content into slide format
Do NOT use when:
- Working with Quarto documents that are NOT presentations
- The task involves only HTML/PDF/DOCX output formats
Inputs and Outputs
Inputs:
- User's content requirements (topic, structure, style preferences)
- Existing .qmd files or SCSS to modify
- Design constraints (colors, fonts, branding)
Outputs:
.qmd files with proper YAML frontmatter
- SCSS files with
/*-- scss:defaults --*/ and /*-- scss:rules --*/ sections
- Extension installation commands when needed
Behavior and Guidelines
YAML Configuration
- Theme layering: Use
theme: [default, styles/custom.scss] — later entries override earlier ones.
- Scroll View: Enable with
scroll-view: true for Reveal.js v5 (Quarto 1.6+).
- Title slide backgrounds: Use
title-slide-attributes: with data- prefixed keys.
SCSS Structure
- Two required sections:
/*-- scss:defaults --*/ for variables (colors, fonts, sizes)
/*-- scss:rules --*/ for CSS rules
- Override specificity: Prefix rules with
.reveal .slide to beat built-in styles.
- Background image paths: Use
url("../../../../../assets/...") from compiled CSS location (5 levels up).
Layout Patterns
- Columns: Use
:::: {.columns} with ::: {.column width="X%"} children.
- Fit text: Wrap with
::: r-fit-text for auto-sizing headlines.
- Stack: Use
.r-stack to overlay elements revealed sequentially.
- Absolute positioning: Add
{.absolute top="X" left="Y"} to images/divs.
- Vertical center: Use
.center class for vertical centering.
Advanced Features
- Fragments: 20+ animation effects (
fade-*, highlight-*, grow, etc.) with fragment-index ordering.
- Auto-animate: Automatic transitions between slides using
data-id matching.
- Vertical slides: Create slide stacks with navigation modes (linear/vertical/grid).
- Parallax backgrounds: Scrolling background images for depth effect.
- Presentation sizing: Control dimensions, margins, and scaling.
Extensions
- Font Awesome:
quarto add quarto-ext/fontawesome → {{< fa icon >}}
- embedio:
quarto add coatless-quarto/embedio → {{< revealjs file="..." >}}
- editable:
quarto add EmilHvitfeldt/quarto-revealjs-editable → drag/resize in preview
Accessibility
- Background images cannot have alt text — add visible text descriptions.
- Use
title="..." in Font Awesome shortcodes.
- Ensure color contrast (avoid pure black/white).
Step-by-Step Procedure
Clarify requirements: Ask about topic, slide count, style preferences, required extensions.
Set up YAML frontmatter:
- Define
format: revealjs with theme, transitions, slide-number
- Add
execute: echo: false for code-heavy slides
- Reference
reference.md § Minimal YAML Template
Create SCSS theme (if customizing):
- Define color palette in
scss:defaults ($body-bg, $body-color, $link-color)
- Add font family and size variables
- Write rules in
scss:rules with .reveal .slide prefix
Author slide content:
- Use
## for slide breaks (or --- for untitled slides)
- Apply layout patterns from reference
- Add speaker notes with
::: {.notes}
Install extensions (if needed):
- Provide
quarto add commands
- Show YAML activation (
revealjs-plugins, filters)
Validate:
- Check
quarto preview runs without errors
- Verify Scroll View (
R key) and Print View (?view=print)
Summarize what was created and any assumptions made.
Use of Reference Files
Load specific modules from resources/ based on task:
| Module |
When to Load |
resources/yaml-config.md |
YAML frontmatter, sizing, navigation |
resources/scss-theming.md |
Theme customization, variables |
resources/layout.md |
Column, stack, positioning patterns |
resources/animation.md |
Fragments, auto-animate effects |
resources/extensions.md |
FontAwesome, embedio, editable |
resources/advanced.md |
Parallax, vertical slides, templates |
resources/troubleshooting.md |
Debugging rendering issues |
Examples
Example 1 – New presentation with custom theme
- User goal: "Create slides for a tech talk with dark theme and code highlighting"
- Expected behavior:
- Generate YAML with
theme: [default, styles/dark.scss]
- Create SCSS with dark $body-bg, light $body-color
- Enable
code-line-numbers: true, code-overflow: wrap
- Provide slide structure with
## headers
Example 2 – Add icons and embeds
- User goal: "Add GitHub icon and embed another slide deck"
- Expected behavior:
- Provide
quarto add quarto-ext/fontawesome command
- Show
{{< fa brands github >}} syntax
- Provide
quarto add coatless-quarto/embedio command
- Show
{{< revealjs file="other.html" >}} syntax
Example 3 – Fix background image not showing
- User goal: "My SCSS background-image doesn't work"
- Expected behavior:
- Diagnose path issue (CSS compiles to deep directory)
- Suggest
url("../../../../../assets/images/bg.jpg") path
- Explain the 5-level depth from
_output/index_files/libs/revealjs/dist/theme/
1---2name: creating-revealjs-presentations3description: Creates, customizes, and troubleshoots Quarto Reveal.js presentations with proper SCSS theming, layout patterns, and extensions. Use when authoring .qmd slides or styling with SCSS.4---5
6## Purpose
7
8Guide the agent to write **production-ready Quarto Reveal.js slides** in a single pass:
9- Correct YAML configuration
10- SCSS theme customization (variables + rules)
11- Layout patterns (columns, absolute positioning, backgrounds)
12- Extension usage (Font Awesome, embedio, editable)
13- Accessibility and maintainability
14
15## When to Use This Skill
16
17Use when:
18- Creating new `.qmd` presentation files
19- Writing or modifying SCSS themes for Reveal.js
20- Adding extensions (icons, embeds, interactive elements)
21- Troubleshooting slide rendering issues
22- Converting content into slide format
23
24Do NOT use when:
25- Working with Quarto documents that are NOT presentations
26- The task involves only HTML/PDF/DOCX output formats
27
28## Inputs and Outputs
29
30**Inputs:**
31- User's content requirements (topic, structure, style preferences)
32- Existing .qmd files or SCSS to modify
33- Design constraints (colors, fonts, branding)
34
35**Outputs:**
36- `.qmd` files with proper YAML frontmatter
37- SCSS files with `/*-- scss:defaults --*/` and `/*-- scss:rules --*/` sections
38- Extension installation commands when needed
39
40## Behavior and Guidelines
41
42### YAML Configuration
43
441. **Theme layering**: Use `theme: [default, styles/custom.scss]` — later entries override earlier ones.
452. **Scroll View**: Enable with `scroll-view: true` for Reveal.js v5 (Quarto 1.6+).
463. **Title slide backgrounds**: Use `title-slide-attributes:` with `data-` prefixed keys.
47
48### SCSS Structure
49
501. **Two required sections**:
51 - `/*-- scss:defaults --*/` for variables (colors, fonts, sizes)
52 - `/*-- scss:rules --*/` for CSS rules
532. **Override specificity**: Prefix rules with `.reveal .slide` to beat built-in styles.
543. **Background image paths**: Use `url("../../../../../assets/...")` from compiled CSS location (5 levels up).
55
56### Layout Patterns
57
581. **Columns**: Use `:::: {.columns}` with `::: {.column width="X%"}` children.
592. **Fit text**: Wrap with `::: r-fit-text` for auto-sizing headlines.
603. **Stack**: Use `.r-stack` to overlay elements revealed sequentially.
614. **Absolute positioning**: Add `{.absolute top="X" left="Y"}` to images/divs.
625. **Vertical center**: Use `.center` class for vertical centering.
63
64### Advanced Features
65
661. **Fragments**: 20+ animation effects (`fade-*`, `highlight-*`, `grow`, etc.) with `fragment-index` ordering.
672. **Auto-animate**: Automatic transitions between slides using `data-id` matching.
683. **Vertical slides**: Create slide stacks with navigation modes (linear/vertical/grid).
694. **Parallax backgrounds**: Scrolling background images for depth effect.
705. **Presentation sizing**: Control dimensions, margins, and scaling.
71
72### Extensions
73
741. **Font Awesome**: `quarto add quarto-ext/fontawesome` → `{{< fa icon >}}`
752. **embedio**: `quarto add coatless-quarto/embedio` → `{{< revealjs file="..." >}}`
763. **editable**: `quarto add EmilHvitfeldt/quarto-revealjs-editable` → drag/resize in preview
77
78### Accessibility
79
801. Background images cannot have alt text — add visible text descriptions.
812. Use `title="..."` in Font Awesome shortcodes.
823. Ensure color contrast (avoid pure black/white).
83
84## Step-by-Step Procedure
85
861. **Clarify requirements**: Ask about topic, slide count, style preferences, required extensions.
87
882. **Set up YAML frontmatter**:
89 - Define `format: revealjs` with theme, transitions, slide-number
90 - Add `execute: echo: false` for code-heavy slides
91 - Reference `reference.md` § Minimal YAML Template
92
933. **Create SCSS theme** (if customizing):
94 - Define color palette in `scss:defaults` ($body-bg, $body-color, $link-color)
95 - Add font family and size variables
96 - Write rules in `scss:rules` with `.reveal .slide` prefix
97
984. **Author slide content**:
99 - Use `##` for slide breaks (or `---` for untitled slides)
100 - Apply layout patterns from reference
101 - Add speaker notes with `::: {.notes}`
102
1035. **Install extensions** (if needed):
104 - Provide `quarto add` commands
105 - Show YAML activation (`revealjs-plugins`, `filters`)
106
1076. **Validate**:
108 - Check `quarto preview` runs without errors
109 - Verify Scroll View (`R` key) and Print View (`?view=print`)
110
1117. **Summarize** what was created and any assumptions made.
112
113## Use of Reference Files
114
115Load specific modules from `resources/` based on task:
116
117| Module | When to Load |
118|--------|--------------|
119| `resources/yaml-config.md` | YAML frontmatter, sizing, navigation |
120| `resources/scss-theming.md` | Theme customization, variables |
121| `resources/layout.md` | Column, stack, positioning patterns |
122| `resources/animation.md` | Fragments, auto-animate effects |
123| `resources/extensions.md` | FontAwesome, embedio, editable |
124| `resources/advanced.md` | Parallax, vertical slides, templates |
125| `resources/troubleshooting.md` | Debugging rendering issues |
126
127## Examples
128
129**Example 1 – New presentation with custom theme**
130
131- **User goal:** "Create slides for a tech talk with dark theme and code highlighting"
132- **Expected behavior:**
133 1. Generate YAML with `theme: [default, styles/dark.scss]`
134 2. Create SCSS with dark $body-bg, light $body-color
135 3. Enable `code-line-numbers: true`, `code-overflow: wrap`
136 4. Provide slide structure with `##` headers
137
138**Example 2 – Add icons and embeds**
139
140- **User goal:** "Add GitHub icon and embed another slide deck"
141- **Expected behavior:**
142 1. Provide `quarto add quarto-ext/fontawesome` command
143 2. Show `{{< fa brands github >}}` syntax
144 3. Provide `quarto add coatless-quarto/embedio` command
145 4. Show `{{< revealjs file="other.html" >}}` syntax
146
147**Example 3 – Fix background image not showing**
148
149- **User goal:** "My SCSS background-image doesn't work"
150- **Expected behavior:**
151 1. Diagnose path issue (CSS compiles to deep directory)
152 2. Suggest `url("../../../../../assets/images/bg.jpg")` path
153 3. Explain the 5-level depth from `_output/index_files/libs/revealjs/dist/theme/`