slidev
Use this skill when creating Slidev presentations. Provides comprehensive syntax reference, layouts, animations, code highlighting, diagrams, and best practices for developer education videos. Trigger phrases include "slidev", "slides", "presentation", "video slides", "create slides".
What this skill does
# Slidev - Presentation Framework Reference
Complete reference for creating developer education presentations with Slidev.
## Frontmatter Configuration
Every presentation starts with frontmatter in the first slide:
```yaml
---
theme: default
title: "Video Title Here"
info: |
## Module Description
Brief description for metadata
author: Course Name
transition: slide-left
highlighter: shiki
drawings:
persist: false
mdc: true
download: true
exportFilename: video-filename
aspectRatio: 16/9
canvasWidth: 980
fonts:
sans: Inter
mono: Fira Code
---
```
### Key Options
| Option | Purpose | Recommended |
|--------|---------|-------------|
| `theme` | Visual theme | `default`, `seriph` |
| `transition` | Slide animation | `slide-left`, `fade` |
| `highlighter` | Code syntax | `shiki` |
| `aspectRatio` | Slide ratio | `16/9` for video |
| `mdc` | MDC syntax | `true` |
---
## Slide Separators
```markdown
--- # New slide
--- # Another slide
```
Per-slide frontmatter:
```markdown
---
layout: center
class: text-center
transition: fade
---
```
---
## Built-in Layouts
### default
Standard content layout.
```markdown
---
layout: default
---
# Title
Content here
```
### center
Centered content for impact statements.
```markdown
---
layout: center
class: text-center
---
# Big Statement
```
### section
Major topic dividers.
```markdown
---
layout: section
---
# Part 1: Topic Name
```
### two-cols
Side-by-side content (code + explanation).
```markdown
---
layout: two-cols
layoutClass: gap-16
---
# Left Content
Explanation here
::right::
## Right Content
```code
example
```
```
### two-cols-header
Header spanning both columns.
```markdown
---
layout: two-cols-header
---
# Header Spans Both
::left::
Left content
::right::
Right content
```
### image-right / image-left
Image with content.
```markdown
---
layout: image-right
image: /path/to/image.jpg
backgroundSize: cover
---
# Content Side
Explanation here
```
### fact
Emphasize statistics.
```markdown
---
layout: fact
---
# 100%
Of modern C++ should use smart pointers
```
### quote
Attribution quotes.
```markdown
---
layout: quote
---
# "Quote text here"
Author Name
```
### intro
Speaker/topic introduction.
```markdown
---
layout: intro
---
# Topic Name
Introduction content
```
### end
Closing slide.
```markdown
---
layout: end
---
# Thank You
Call to action
```
---
## Code Blocks
### Basic Syntax Highlighting
````markdown
```python
def greet(name):
return f"Hello, {name}!"
```
````
### Line Highlighting
````markdown
```python {2,4}
def calculate(x, y):
result = x + y # Highlighted
print(result)
return result # Highlighted
```
````
### Click-Based Progressive Reveal
````markdown
```python {1|2-3|4-5|all}
def process(items):
valid = [x for x in items if x > 0]
sorted_items = sorted(valid)
total = sum(sorted_items)
return total
```
````
Pattern: `{step1|step2|step3|all}` - each `|` is a click.
### Line Numbers
````markdown
```python {lines:true}
def factorial(n):
if n <= 1:
return 1
return n * factorial(n - 1)
```
````
### Custom Start Line
````markdown
```python {lines:true,startLine:42}
# Code starting at line 42
```
````
### Max Height (Scrollable)
````markdown
```python {maxHeight:'200px'}
# Long code that scrolls
```
````
### Monaco Editor (Interactive)
````markdown
```typescript {monaco}
// Editable code
const x = 5;
```
````
### Monaco Runner (Execute)
````markdown
```typescript {monaco-run}
console.log("Runs live!");
```
````
### Monaco Diff
````markdown
```typescript {monaco-diff}
// Before
function add(a, b) { return a + b; }
~~~
// After
function add(a: number, b: number): number { return a + b; }
```
````
---
## Animations & Clicks
### v-click (Single Element)
```markdown
<v-click>
This appears on click
</v-click>
```
### v-clicks (Multiple Elements)
```markdown
<v-clicks>
- First item
- Second item
- Third item
</v-clicks>
```
### Nested v-clicks
```markdown
<v-clicks depth="2">
- Parent
- Child 1
- Child 2
- Parent 2
</v-clicks>
```
### Click Positioning
```markdown
<div v-click="3">Appears at click 3</div>
<div v-click="1">Appears at click 1</div>
<div v-click="2">Appears at click 2</div>
```
### Hide on Click
```markdown
<div v-click.hide="3">Disappears at click 3</div>
<div v-click="[1, 3]">Visible only clicks 1-2</div>
```
### v-after (Same Click)
```markdown
<v-click>Main content</v-click>
<v-after>Appears with main content</v-after>
```
### Slide Transitions
```yaml
---
transition: slide-left # Global default
---
---
transition: fade # Per-slide override
---
```
Available: `slide-left`, `slide-right`, `slide-up`, `slide-down`, `fade`, `fade-out`
---
## Mermaid Diagrams
### Flowchart
````markdown
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Action 1]
B -->|No| D[Action 2]
C --> E[End]
D --> E
```
````
### Sequence Diagram
````markdown
```mermaid {scale: 0.8}
sequenceDiagram
participant C as Client
participant S as Server
C->>S: Request
S-->>C: Response
```
````
### Class Diagram
````markdown
```mermaid {scale: 0.7}
classDiagram
class Animal {
+String name
+makeSound()
}
class Dog {
+bark()
}
Animal <|-- Dog
```
````
### Themes
````markdown
```mermaid {theme: 'neutral', scale: 0.8}
graph LR
A --> B --> C
```
````
Themes: `default`, `neutral`, `dark`, `forest`, `base`
---
## LaTeX Math
### Inline Math
```markdown
The formula is $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$
```
### Block Math
```markdown
$$
\sum_{i=1}^{n} i = \frac{n(n+1)}{2}
$$
```
### In Tables
```markdown
| Algorithm | Complexity |
|-----------|------------|
| Binary Search | $O(\log n)$ |
| Quick Sort | $O(n \log n)$ |
```
---
## Styling
### UnoCSS Utility Classes
**Layout:**
- `grid`, `flex`, `grid-cols-2`, `grid-cols-3`
- `gap-4`, `gap-8`
**Spacing:**
- `p-4`, `m-4`, `mt-8`, `px-2`, `py-1`
**Typography:**
- `text-sm`, `text-xl`, `text-2xl`
- `font-bold`, `font-mono`
- `text-center`, `text-left`
**Colors:**
- `text-blue-500`, `text-red-500`
- `bg-blue-500`, `bg-green-100`
- `bg-opacity-20`, `opacity-50`
**Borders:**
- `rounded`, `rounded-lg`
- `border`, `border-blue-500`
### Absolute Positioning
```html
<div class="abs-tr m-4">Top Right</div>
<div class="abs-tl m-4">Top Left</div>
<div class="abs-br m-4">Bottom Right</div>
<div class="abs-bl m-4">Bottom Left</div>
```
### Card Pattern
```html
<div class="p-4 rounded-lg bg-blue-500 bg-opacity-20 border border-blue-500">
Card content
</div>
```
### Scoped Styles
```markdown
<style>
h1 {
background: linear-gradient(90deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
```
---
## Presenter Notes
Notes go in HTML comments at slide end:
```markdown
# Slide Title
Content here
<!--
Main talking points:
- First point to cover
- Second important concept
[click] Animation appears - explain this
[click] Next animation - elaborate
[PAUSE] Give viewers time to absorb
[TRANSITION] Lead into next topic...
-->
```
### Click Markers in Notes
```markdown
<!--
Introduction to the concept...
[click] First item appears - discuss the basics
[click] Second item - dive deeper
[click:2] Skip ahead two clicks
Final summary...
-->
```
---
## Code Groups
Show same concept in multiple languages:
````markdown
::code-group
```python [Python]
def greet(name):
return f"Hello, {name}!"
```
```javascript [JavaScript]
function greet(name) {
return `Hello, ${name}!`;
}
```
```rust [Rust]
fn greet(name: &str) -> String {
format!("Hello, {}!", name)
}
```
::
````
---
## MDC Syntax
Enable with `mdc: true` in frontmatter.
### Inline Attributes
```markdown
This is [red text]{style="color:red"} inline
```
### Block Attributes
```markdown
::div{.p-4 .bg-blue-500 .bg-opacity-20 .rounded}
Block with classes
::
```
---
## Global Context
Access slide metadata:
```vue
{{ $sRelated in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.