Slidev Mastery
This skill should be used when the user asks to "create slides with Slidev", "use Slidev syntax", "add Slidev components", "configure Slidev theme", "export Slidev presentation", or mentions Slidev-specific features like layouts, animations, Monaco editor, or code highlighting. Provides comprehensive Slidev expertise for markdown-based presentations.
What this skill does
# Slidev Mastery
Slidev is a presentation framework for developers that uses markdown with Vue components. Create beautiful, interactive slides using familiar syntax with powerful features like live coding, diagrams, and animations.
**Evidence-based design**: This skill incorporates research-based best practices for accessible, effective presentations. See `references/presentation-best-practices.md` for full guidelines.
## Core Concepts
### Slide Separation
Separate slides with `---` on its own line:
```markdown
# First Slide
Content here
---
# Second Slide
More content
```
### Importing Slides from External Files
You can split your presentation into multiple markdown files using the `src` frontmatter option. This allows for better organization and reusability:
```markdown
# Normal slide
---
src: ./slides/introduction.md
---
---
# Another normal slide
---
src: ./slides/conclusion.md
---
```
**Benefits of modular slide structure:**
- **Stable identity:** Use meaningful filenames (e.g., `microservices-benefits.md`) instead of numbers
- **Easy reordering:** Move `src` includes in master file without renaming files
- **Independent editing:** Edit individual slide files separately
- **Better collaboration:** Team members can work on different slides simultaneously
- **Version control:** Meaningful file names in git diffs
**Example structure:**
```
presentation/
├── slides.md # Master file with includes
├── slides/
│ ├── 01-title.md # Slide 1: Title
│ ├── 02-hook.md # Slide 2: Opening hook
│ ├── 03-problem-statement.md # Slide 3: Problem introduction
│ ├── 04-architecture-overview.md # Slide 4: Architecture slide
│ ├── 18-conclusion.md # Conclusion
│ └── 19-questions.md # Q&A
└── public/images/
```
**File naming:** Individual slides use numeric prefix (01-, 02-, etc.) plus descriptive name for easy ordering in directory listings while maintaining meaningful names.
**Master file example with slide number comments:**
```markdown
---
theme: default
title: My Presentation
---
---
src: ./slides/01-title.md
---
<!-- Slide 1: Title -->
---
src: ./slides/02-hook.md
---
<!-- Slide 2: Opening Hook -->
---
src: ./slides/03-problem-statement.md
---
<!-- Slide 3: Problem Statement -->
```
**Note:** Comments must come AFTER the closing `---` (not inside frontmatter block) per Slidev specs.
**Frontmatter merging:** You can override frontmatter from external files:
```markdown
---
src: ./slides/content.md
layout: two-cols # Overrides layout in content.md
---
```
### Frontmatter Configuration
Configure presentation globally in frontmatter at the top of `slides.md`:
```yaml
---
theme: default
background: https://source.unsplash.com/collection/94734566/1920x1080
class: text-center
highlighter: shiki
lineNumbers: false
drawings:
persist: false
transition: slide-left
title: Welcome to Slidev
---
```
**Key frontmatter fields:**
- `theme`: Visual theme (default, seriph, apple-basic, etc.)
- `background`: Global background image or color
- `highlighter`: Code highlighting engine (shiki or prism)
- `lineNumbers`: Show line numbers in code blocks
- `transition`: Slide transition effect
- `title`: Presentation title for metadata
### Per-Slide Frontmatter
Configure individual slides with frontmatter after `---`:
```markdown
---
layout: center
background: './images/background.jpg'
class: 'text-white'
---
# Centered Slide
With custom background
```
## Layouts
Slidev provides built-in layouts for different slide types:
### Common Layouts
**`default`** - Standard layout with title and content:
```markdown
# Title
Content here
```
**`center`** - Centered content:
```markdown
---
layout: center
---
# Centered Title
```
**`cover`** - Cover slide for presentation start:
```markdown
---
layout: cover
background: './bg.jpg'
---
# Presentation Title
Subtitle or author
```
**`intro`** - Introduction slide:
```markdown
---
layout: intro
---
# Topic
Brief description
```
**`image-right`** - Content on left, image on right:
```markdown
---
layout: image-right
image: './diagram.png'
---
# Content
Text goes here
```
**`image-left`** - Image on left, content on right:
```markdown
---
layout: image-left
image: './photo.jpg'
---
# Content
Text goes here
```
**`two-cols`** - Two column layout:
```markdown
---
layout: two-cols
---
# Left Column
Content for left
::right::
# Right Column
Content for right
```
**`quote`** - Large quote display:
```markdown
---
layout: quote
---
# "Innovation distinguishes between a leader and a follower."
Steve Jobs
```
**`fact`** - Emphasize key fact or statistic:
```markdown
---
layout: fact
---
# 95%
User satisfaction rate
```
## Code Highlighting
### Basic Code Blocks
```markdown
\```python
def hello():
print("Hello, World!")
\```
```
### Line Highlighting
Highlight specific lines with `{line-numbers}`:
```markdown
\```python {2-3}
def process():
important_line()
another_important()
return result
\```
```
### Line Numbers
Enable line numbers for a code block:
```markdown
\```python {1|2|3} {lines:true}
first_line()
second_line()
third_line()
\```
```
### Monaco Editor
Enable live code editing with Monaco:
```markdown
\```python {monaco}
def editable():
return "Users can edit this code"
\```
```
## Animations and Clicks
### Click Animations
Reveal content incrementally with `v-click`:
```markdown
- First point
- <v-click>Second point (appears on click)</v-click>
- <v-click>Third point (appears on next click)</v-click>
```
### After Clicks
Show content after specific click:
```markdown
<div v-after="2">
Appears after 2 clicks
</div>
```
### Click Counting
Use click counters for complex animations:
```markdown
<div v-click="1">First</div>
<div v-click="2">Second</div>
<div v-click="3">Third</div>
```
## Mermaid Diagrams
Embed mermaid diagrams directly:
```markdown
\```mermaid
graph LR
A[Start] --> B[Process]
B --> C[End]
\```
```
**Supported diagram types:**
- Flowchart: `graph LR`, `graph TD`
- Sequence: `sequenceDiagram`
- Class: `classDiagram`
- State: `stateDiagram-v2`
- ER: `erDiagram`
- Gantt: `gantt`
### Custom Theme
Apply custom colors to mermaid diagrams:
```markdown
\```mermaid
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#3b82f6'}}}%%
graph TD
A[Blue themed]
\```
```
## Images and Media
### Images
```markdown

```
With custom size:
```markdown
<img src="./image.jpg" class="w-50 mx-auto" />
```
### Background Images
Per-slide background:
```markdown
---
background: './images/slide-bg.jpg'
---
```
## Presenter Notes
Add notes visible only in presenter mode:
```markdown
# Slide Title
Content visible to audience
<!--
These are presenter notes
Only visible in presenter mode
Press 'p' to toggle presenter view
-->
```
## Components
### Built-in Components
**Arrows**:
```markdown
<Arrow x1="100" y1="100" x2="200" y2="200" />
```
**YouTube**:
```markdown
<Youtube id="video-id" width="500" height="300" />
```
**Tweet**:
```markdown
<Tweet id="tweet-id" />
```
### Custom Components
Create reusable Vue components in `components/` directory:
```vue
<!-- components/CustomButton.vue -->
<template>
<button class="custom-btn">
<slot />
</button>
</template>
<style scoped>
.custom-btn {
background: #3b82f6;
color: white;
padding: 1rem 2rem;
border-radius: 0.5rem;
}
</style>
```
Use in slides:
```markdown
<CustomButton>Click me</CustomButton>
```
## Themes
### Using Themes
Set in frontmatter:
```yaml
---
theme: seriph
---
```
**Popular themes:**
- `default` - Clean, minimal
- `seriph` - Elegant serif fonts
- `apple-basic` - Apple keynote style
- `shibainu` - Playful, colorful
- `bricks` - Modern, structured
### Custom Styling
Add custom CSS in frontmatter or separate `style.css`:
```markdown
---
---
<style>
h1 {
color: #3b82f6;
}
.custom-class {
background: lineaRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.