Create Slidev decks through a staged decision process: analyze the content, classify the deck archetype, ask the user to choose a visual style, recommend conservative addons for that style and content, then generate a maintainable Slidev project where slides.md imports chapter files from pages/. Generated decks should have deliberate visual hierarchy, clearly marked key points, and restrained Slidev animations that support the talk rhythm without competing with the content.
This skill complements the official Slidev skill. The official skill is the syntax and capability reference; this skill is the production workflow for choosing a theme/addons, structuring a deck, scaffolding files, and keeping the result maintainable.
slides.md, and write slide bodies in pages/*.md imported with src.src: ./pages/01-opening.md inside the global headmatter. Otherwise Slidev treats the config-only first block as a blank first slide. Put later imports in tight three-line blocks: ---, then src: ./pages/file.md, then ---.@slidev/plugin-notes; that package is not published on npm.references/official-slidev-notes.md.references/theme-presets.md.references/addon-presets.md.references/project-workflow.md.references/deck-quality.md.references/animation-and-emphasis.md.references/showcase-writing-patterns.md.Accept either:
slides.mdAnalyze before asking questions:
technical-talk, architecture-review, product-demo, research-report, or course-workshopUse references/showcase-writing-patterns.md to map the content to an archetype before recommending style or addons. The archetype controls the default storyboard rhythm, page grouping, and validation expectations.
Then ask for style preference as Phase 1. If the user already gave a style, still show the nearest preset and one or two alternatives unless the user explicitly says not to ask.
Present 3-5 concrete style options from references/theme-presets.md. For each option include:
style_idassets/style-*.svg.Ask the user to choose one style before continuing. Keep this question focused on style only.
After the user picks a style, recommend addons from references/addon-presets.md based on:
Start with built-in Slidev capabilities, the chosen theme, local Markdown/HTML/UnoCSS, Iconify dependencies, and local Vue components. Recommend a Slidev addon only when it solves a visible presentation need.
Present:
Ask the user which addon set to use. Offer a recommended default so the user can accept it without knowing the ecosystem.
Inspect the current workspace or the directory requested by the user:
slides.md, package.json with @slidev/cli or slidev, pages/, components/, .slidev/slides.md, package.json, and relevant pages/*.md before editing.Use scripts/init-slidev-project.mjs when a deterministic scaffold is enough:
node path/to/slidev-generator/scripts/init-slidev-project.mjs --dir ./my-deck --title "Deck Title" --theme seriph --archetype technical-talk --addons "fancy-arrow"
If the chosen addon set is empty, omit --addons entirely instead of passing an empty string. Empty string arguments can be shell-dependent, especially in PowerShell.
The script creates or updates:
package.jsonslides.mdpages/01-opening.mdpages/02-context.mdpages/03-mechanism.mdpages/04-evidence.mdpages/99-closing.mdIt updates dependency declarations but does not install packages, run builds, export, or start a server.
Before writing files, create a concise storyboard. For each slide, decide:
pages/Keep the storyboard aligned to the selected archetype rhythm from references/showcase-writing-patterns.md. This prevents static walls of Markdown and avoids adding animation after the fact.
Generate files in this shape:
deck/
├── package.json
├── slides.md
├── pages/
│ ├── 01-opening.md
│ ├── 02-context.md
│ ├── 03-mechanism.md
│ ├── 04-evidence.md
│ └── 99-closing.md
├── components/
└── public/
Keep slides.md short:
---
theme: seriph
title: "Deck Title"
addons:
- fancy-arrow
transition: slide-left
clickAnimation: fade
mdc: true
src: ./pages/01-opening.md
---
---
src: ./pages/02-context.md
---
The import format is fragile. Slidev's first frontmatter block is also the first slide's configuration. If it contains only deck config and the first src appears in the next block, Slidev can render an empty first slide. If src: appears as plain body text, Slidev can display src: ./pages/... instead of importing. After any manual edit to slides.md, check that the first import is inside the global headmatter and later imports are exactly wrapped by their own --- delimiters.
Rules for page files:
v-clicks for bullet/list reveals, v-click and v-after for paired reveals, code-line click ranges for walkthroughs, and v-motion only where spatial movement clarifies the idea.clicks frontmatter only when Slidev's automatic click count is not enough.fade, up, or a single directional cue. Avoid stacked modifiers and novelty animation unless they directly explain movement, sequence, or contrast.components/ only when repeated structure justifies it.pages/assets/, and reference them with page-relative paths like ./assets/image.png. Avoid leading-slash asset paths in imported page files on Windows because Vite can resolve /image.png to the drive root., add the matching @iconify-json/ package dependency.Before validation, make a focused pass over generated pages/*.md:
fact, statement, quote, two-column contrast, callout, bold/large type, border accent, arrow annotation, or similar emphasis pattern.After generating, use targeted checks only:
node path/to/slidev-generator/scripts/validate-slidev-deck.mjs --dir ./my-deck
This checks the current deck structure, malformed src import blocks, and obvious maintainability issues. It is not a full build and does not start services.
If a broader check is needed, explain why, name the exact command, and wait for explicit user approval.
At the end, tell the user how to run it themselves:
npm install
npm run dev
or the detected package manager equivalent.
Do not start the server automatically. If the user asks for startup in a later message, check the port first.
When the user provides a topic or Markdown document, do not immediately generate the whole project. First analyze the content, classify the archetype, and ask Phase 1 style preference. After the user chooses a style, ask Phase 2 addon selection. Only then storyboard, scaffold or update the Slidev project, and write the split chapter files.
When the user explicitly says "use the recommended default" or "do not ask me", choose the closest style and addon preset, then proceed.
共 1 个版本