Skip to content

About

Slidev addon to bring archify diagrams, explainers, & stories in your presentation

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

slidev-addon-archify

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

Installation

From an existing Slidev project's directory, install the addon.

pnpm add -D slidev-addon-archify

Add it to the first frontmatter block in slides.md. Slidev will discover the components automatically; no imports are needed.

---
addons:
  - slidev-addon-archify
---

Optional: Install the agent skill

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 archify

Install the Slidev skill for slide syntax, layouts, and click navigation:

npx skills add slidevjs/slidev --skill slidev

From 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-archify

Then ask your agent, for example: “Use slidev-archify to add a click-through architecture walkthrough to this deck.”

Use the components

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

Interactive diagram

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.

ArchifyViewer showing the optimized agent runtime architecture

ArchifyViewer showing a waterfall of the agent turn's latency

Click-driven story with an optional side panel

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.

ArchifyStory showing the parallel branches, with beat 2 selected in StorySidePanel

Scrollable explainer

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()"
/>

ArchifyExplainer stepping through the agent turn's critical path

Local development

Use Node.js 22.22.0 or newer and pnpm.

pnpm install
pnpm dev

The 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.

About

Slidev addon to bring archify diagrams, explainers, & stories in your presentation

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages