A Slidev addon for embedding interactive Archify diagrams, click-driven stories, and explainers in your slides.
Open the live showcase: Inside an AI Agent Turn
From an existing Slidev project's directory, install the addon.
pnpm add -D slidev-addon-archifyAdd it to the first frontmatter block in slides.md. Slidev will discover the components automatically; no imports are needed.
---
addons:
- slidev-addon-archify
---The slidev-archify skill helps a coding agent create or update Slidev decks with Archify. It's separate from the npm addon and isn't needed to build or present a deck that already has generated HTML.
Required for agent-assisted authoring: Install both upstream skills for the same agent before using slidev-archify. Skip any skill already installed.
Install the Archify skill for authoring the diagram source (IR), validating it, and generating HTML:
npx skills add tt-a1i/archify --skill archifyInstall the Slidev skill for slide syntax, layouts, and click navigation:
npx skills add slidevjs/slidev --skill slidevFrom your deck's project directory, run the following and select your coding agent when prompted. Add --global to make the skill available across projects.
npx skills add ksachdeva/slidev-addon-archify --skill slidev-archifyThen ask your agent, for example: “Use slidev-archify to add a click-through architecture walkthrough to this deck.”
Put your generated Archify HTML in public/diagrams/ in your deck. The components embed those files from the same site as the slides. The name prop is the filename without the suffix shown below. You only need the Archify CLI to generate the HTML, not to build or present the deck once the files exist.
| Component | Use it for | File in public/diagrams/ |
|---|---|---|
ArchifyViewer |
An interactive diagram or architecture comparison | <name>.html |
ArchifyStory |
A story that advances with Slidev clicks | <name>.stage.html |
ArchifyExplainer |
A scrollable explainer with embedded diagrams | <name>.explainer.html |
StorySidePanel |
Optional captions and jump buttons alongside a story | None; pass a beats array |
Download the generated diagram as public/diagrams/agent-turn-optimized.html, then add this slide. See it live in the showcase.
---
layout: full
---
<ArchifyViewer
name="agent-turn-optimized"
title="AI Agent Runtime — Optimized"
@next="$nav.next()"
@previous="$nav.prev()"
/>The event handlers keep the left and right arrow keys working when the viewer has focus.
Download the generated story stage as public/diagrams/agent-turn-fanout.stage.html. In the live example, use the arrow keys or click a numbered tab to jump to a beat. The story source has three beats, including the opening view at click 0, so set clicks: 2 and pass one panel entry per beat.
---
layout: full
clicks: 2
---
<div class="absolute inset-0 flex">
<div class="h-full min-w-0 flex-1">
<ArchifyStory
name="agent-turn-fanout"
title="From fan-out to grounded answer"
:step="$clicks"
:active="$page === $nav.currentPage"
fill
hide-loop
/>
</div>
<StorySidePanel
topic="Agent turn fan-out"
:step="$clicks"
:beats="[
{ tag: '01', title: 'See the whole turn', summary: 'Use the tabs or Right Arrow to follow the request.' },
{ tag: '02', title: 'Start three branches', summary: 'Memory, retrieval, and tool execution start together.' },
{ tag: '03', title: 'Join before synthesis', summary: 'The context builder merges the three results.' },
]"
@select="(index) => $nav.go($page, index)"
@prev="$nav.prev()"
@next="$nav.next()"
/>
</div>For a story without a side panel, remove both layout <div>s and StorySidePanel, then replace fill with full-bleed on ArchifyStory.
Download the generated explainer as public/diagrams/agent-turn-latency.explainer.html, then embed it as shown below. In the live example, scroll to the diagram and select Step through. See the explainer source to adapt it.
---
layout: full
---
<ArchifyExplainer
name="agent-turn-latency"
title="What holds up the agent's answer?"
@next="$nav.next()"
@previous="$nav.prev()"
/>Use Node.js 22.22.0 or newer and pnpm.
pnpm install
pnpm devThe preview deck, showcase/slides.md, loads the addon from the repository root. Run pnpm build to build the preview into showcase/dist/.
The showcase keeps its diagram and story JSON and explainer Markdown in showcase/diagrams/. After editing them, run pnpm diagrams and commit the sources together with the regenerated HTML in showcase/public/diagrams/. The script uses the Archify skill installed in .agents/skills/archify by default; set ARCHIFY_CLI to use another installation.
Archify runs a browser check when generating diagrams. The dev container includes Chromium, and pnpm diagrams disables Chromium's sandbox for that command so it works under Docker. Run it only with trusted inputs. To keep the browser sandbox enabled, run node showcase/generate-diagrams.mjs from a host terminal with Chrome or Chromium installed.
Neither pnpm dev nor the GitHub Pages build runs Archify; both use the checked-in HTML.



