assets/skills/slidev/SKILL.md
Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.
npx skillsauth add Rory-X/slidev-ppt-agent slidevInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Web-based slides maker built on Vite, Vue, and Markdown.
Compatible with @slidev/cli ^52.0.0
npx create-slidev # Create project
npx slidev # Start dev server (opens http://localhost:3030)
npx slidev build # Build static SPA
npx slidev export # Export to PDF (requires playwright-chromium)
Verify: After npx slidev, confirm slides load at http://localhost:3030. After npx slidev export, check the output PDF exists in the project root.
This skill is the Slidev syntax and quality reference. It does NOT orchestrate the pipeline -- that is handled by .cursor/rules/ppt-harness-commands.mdc and the phase-specific skills (ppt-slide-composer, ppt-outline-architect, etc.).
When composing slides, the ppt-slide-composer skill references this file for:
---
theme: default
title: My Presentation
---
# First Slide
Content here
---
# Second Slide
More content
<!--
Presenter notes go here
-->
--- separates slides| Topic | Description | Reference | |-------|-------------|-----------| | Markdown Syntax | Slide separators, frontmatter, notes, code blocks | core-syntax | | Animations | v-click, v-clicks, motion, transitions | core-animations | | Headmatter | Deck-wide configuration options | core-headmatter | | Frontmatter | Per-slide configuration options | core-frontmatter | | CLI Commands | Dev, build, export, theme commands | core-cli | | Components | Built-in Vue components | core-components | | Layouts | Built-in slide layouts | core-layouts | | Exporting | PDF, PPTX, PNG export options | core-exporting | | Hosting | Build and deploy to various platforms | core-hosting | | Global Context | $nav, $slidev, composables API | core-global-context |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Line highlighting | ```ts {2,3} | code-line-highlighting |
| Click-based highlighting | ```ts {1\|2-3\|all} | code-line-highlighting |
| Line numbers | lineNumbers: true or {lines:true} | code-line-numbers |
| Scrollable code | {maxHeight:'100px'} | code-max-height |
| Code tabs | ::code-group (requires comark: true) | code-groups |
| Monaco editor | ```ts {monaco} | editor-monaco |
| Run code | ```ts {monaco-run} | editor-monaco-run |
| Edit files | <<< ./file.ts {monaco-write} | editor-monaco-write |
| Code animations | ````md magic-move | code-magic-move |
| TypeScript types | ```ts twoslash | code-twoslash |
| Import code | <<< @/snippets/file.js | code-import-snippet |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Mermaid diagrams | ```mermaid | diagram-mermaid |
| PlantUML diagrams | ```plantuml | diagram-plantuml |
| LaTeX math | $inline$ or $$block$$ | diagram-latex |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Canvas size | canvasWidth, aspectRatio | layout-canvas-size |
| Zoom slide | zoom: 0.8 | layout-zoom |
| Scale elements | <Transform :scale="0.5"> | layout-transform |
| Layout slots | ::right::, ::default:: | layout-slots |
| Scoped CSS | <style> in slide | style-scoped |
| Global layers | global-top.vue, global-bottom.vue | layout-global-layers |
| Draggable elements | v-drag, <v-drag> | layout-draggable |
| Overflow prevention | Hard limits, fix techniques | content-overflow-prevention |
| Icons | <mdi-icon-name /> | style-icons |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Click animations | v-click, <v-clicks> | core-animations |
| Rough markers | v-mark.underline, v-mark.circle | animation-rough-marker |
| Drawing mode | Press C or config drawings: | animation-drawing |
| Direction styles | forward:delay-300 | style-direction |
| Note highlighting | [click] in notes | animation-click-marker |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Comark syntax | comark: true + {style="color:red"} | syntax-comark |
| Block frontmatter | ```yaml instead of --- | syntax-block-frontmatter |
| Import slides | src: ./other.md | syntax-importing-slides |
| Merge frontmatter | Main entry wins | syntax-frontmatter-merging |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Recording | Press G for camera | presenter-recording |
| Timer | duration: 30min, timer: countdown | presenter-timer |
| Remote control | slidev --remote | presenter-remote |
| Ruby text | notesAutoRuby: | presenter-notes-ruby |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Export options | slidev export | core-exporting |
| Build & deploy | slidev build | core-hosting |
| Build with PDF | download: true | build-pdf |
| Cache images | Automatic for remote URLs | build-remote-assets |
| OG image | seoMeta.ogImage or og-image.png | build-og-image |
| SEO tags | seoMeta: | build-seo-meta |
Export prerequisite: npm install -D playwright-chromium is required for PDF/PPTX/PNG export. If export fails with a browser error, install this dependency first.
| Feature | Usage | Reference |
|---------|-------|-----------|
| Side editor | Click edit icon | editor-side |
| VS Code extension | Install antfu.slidev | editor-vscode |
| Prettier | prettier-plugin-slidev | editor-prettier |
| Eject theme | slidev theme eject | tool-eject-theme |
| Feature | Usage | Reference |
|---------|-------|-----------|
| Slide hooks | onSlideEnter(), onSlideLeave() | api-slide-hooks |
| Navigation API | $nav, useNav() | core-global-context |
Slidev 默认画布是 980×552px。超出该区域的内容会被裁切,导致页面不可用。生成每一页时都必须遵守下方边界。
好的幻灯片也要避免意外空泛。普通内容页应该有意识地使用画布,用足够的证据、解读、对比或视觉结构支撑核心观点。不要为了防溢出而过度拆分或简化,导致内容页只占半屏。
| 密度 | 目标 | 最低内容量 | 常见用途 |
|------|------|------------|----------|
| light | 刻意聚焦,使用 35-55% 画布 | 1 个强主张 + 英雄视觉/引用/CTA | cover、section、quote、end、hero metric |
| standard | 信息均衡,使用 60-80% 画布 | 3 个有效信息块,或 1 个视觉 + 2 个支撑块 | 默认内容页、对比页、流程页 |
| dense | 丰富但可读,使用 75-90% 画布 | 4 个以上信息块,或数据/代码/图表 + 明确解读 | dashboard、architecture、evidence page |
| 元素 | 安全上限 | 溢出处理 |
|------|----------|----------|
| Bullet points | standard:4-6 条;dense:6-8 条并分组 | 转为卡片/分栏;超过预算才拆页 |
| Code block lines | 可见 10-12 行;12-18 行需要容器控制 | 使用 {maxHeight:'200px'}、减少可见行数,或拆页 |
| Mermaid diagram nodes | 8-10 个节点 | 使用 {scale: 0.45} 或简化;超过 8 个节点通常独立成页,除非非常紧凑 |
| Table rows | 5-6 行 | 增加 key takeaway、转置、卡片化,或拆页 |
| Two-col layout | 每栏约 250px 高 | 每栏不超过 6 条短内容 |
| Grid cards | standard:3-4 张;dense:4-6 张紧凑卡 | 使用 2x2、hero-top + mini cards 或 L-shape |
| Sequence diagram actors | 4-5 个参与者 | 简化或缩写名称 |
{maxHeight:'200px'}、减少可见行数,或拆成多页{scale: ...},不要使用默认缩放
{scale: 0.45} 到 {scale: 0.6}{scale: 0.3} 到 {scale: 0.4}(可用宽度减半)<div style="max-height:250px;overflow:hidden"> 包裹zoom: 0.8,在不损害可读性的前提下多容纳约 20% 内容# 标题(不要用 ##),减少垂直空间占用<Toc> 组件,容易溢出;改用手工摘要maxHeight/zoom: 0.8;仍超预算才拆页{maxHeight:'200px'} 滚动{scale: 0.45} 或简化节点zoom: 0.7 作为最后手段生成所有页面后,逐页检查:
{scale: 0.35} 左右?See content-overflow-prevention for detailed examples.
| Layout | Purpose |
|--------|---------|
| cover | Title/cover slide |
| center | Centered content |
| default | Standard slide |
| two-cols | Two columns (use ::right::) |
| two-cols-header | Header + two columns |
| image / image-left / image-right | Image layouts |
| iframe / iframe-left / iframe-right | Embed URLs |
| quote | Quotation |
| section | Section divider |
| fact / statement | Data/statement display |
| intro / end | Intro/end slides |
development
Compose high-quality Slidev slides from outline and style plan. Use after outline is approved to write the final slides markdown.
development
Review a generated Slidev deck for visual, structural, and interaction issues. Use when user triggers /ppt-review or when completing the ppt-creator pipeline.
content-media
Deep multi-dimensional research for PPT topic. Use when preparing factual basis before designing a presentation.
devops
Publish built PPT to static hosting (Vercel or GitHub Pages). Use when user requests deployment.