К основному содержанию
скилл CX Codex

guided-demo — скилл для Claude Code: что делает и как установить

Скилл guided-demo добавляет в веб-приложения и HTML-страницы интерактивные демо с пошаговой подсветкой элементов и печатью текста.

Apache-2.0 ★ 173 обновлён 2026-10-24

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add sammcj/agentic-coding --skill guided-demo -a claude-code
Открыть на GitHub

Что делает guided-demo

Скилл внедряет в проект компактный движок автопрезентации: около ста строк JavaScript и тридцать строк CSS. Логика строится на массиве шагов и цикле setTimeout. Движок по очереди подсвечивает нужные блоки через CSS-свойство outline, переключает секции страницы и побуквенно выводит пояснения в фиксированной плашке, не меняя исходный код вёрстки.

В сценарий можно заложить переходы между вкладками, клики по элементам и озвучку через встроенный в браузер Web Speech API. Синтез речи остаётся выключенным, пока пользователь сам не нажмёт клавишу M или кнопку со звуком на панели управления.

Динамические хэши в классах современных фреймворков сломают поиск селекторов после пересборки. Поэтому для разметки шагов требуются постоянные id или data-* атрибуты.

Какие задачи решает

  • создать автоэкскурсию по дашборду для клиентов
  • показать работу прототипа веб-сервиса без ручного кликанья
  • озвучить шаги интерактивной презентации через браузерный Web Speech API
  • настроить демо-режим для стенда или питча без переписывания вёрстки

Примеры запросов агенту

  • Добавь пошаговое guided demo в наш HTML-дашборд с подсветкой графиков
  • Настрой guided-demo для React-страницы с переключением табов и печатью подсказок
  • Собери сценарий guided-demo на 10 шагов для показа формы заказа

Как установить guided-demo

1Через Skills CLI (Vercel)

npx skills add sammcj/agentic-coding --skill guided-demo -a claude-code

2Вручную: положить файлы

~/.claude/skills/guided-demo/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/guided-demo/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о guided-demo

Как установить guided-demo в Claude Code?

Выполните команду npx skills add sammcj/agentic-coding --skill guided-demo -a claude-code или добавьте файл по пути ~/.claude/skills/guided-demo/SKILL.md.

Что делает скилл guided-demo?

Он помогает сгенерировать скрипт пошаговой демонстрации интерфейса с эффектом пишущей машинки, индикатором обратного отсчёта и кнопками навигации.

Почему для подсветки блоков используется outline, а не border?

Свойство border меняет размеры блока и сдвигает соседнюю вёрстку, тогда как outline рисуется поверх и не вызывает layout shift.

Исходный текст

SKILL.md · Apache-2.0
---
name: guided-demo
description: >
  A pattern for adding a self-narrating (typed out) guided walkthrough to any HTML/web application.
  Use this skill whenever the user wants to add a guided demo, auto-narration, self-running presentation,
  or step-by-step tour to an HTML page, web app, prototype, HTML slide deck, dashboard, or data story.
disable-model-invocation: true
argument-hint: "Thing you want to add a demo to"
---

# Guided Demo Pattern

Add a self-narrating walkthrough to any HTML/web application. A declarative step array drives a `setTimeout` loop that toggles CSS classes on DOM elements and writes text character-by-character into a fixed panel. The engine overlays the existing page without modifying its code. When the demo stops, all state resets.

About 100 lines of JS and 30 lines of CSS for the core. Interstitials, speed controls, keyboard shortcuts, and progress bar are optional layering.

## Before implementing

Ask the user these questions (skip any already answered in conversation):

1. **What are the sections?** Tabs, routes, scroll positions, slide indices? Determines how section switching works.
2. **Framework?** Vanilla HTML works directly. React/Vue/Svelte need the engine as a conditional overlay component, and `querySelector` must run after render.
3. **Presenter talking over it, or self-narrating?** Talking over: shorter text, longer pauses. Self-narrating: detailed text, moderate pauses.
4. **Interactive elements to trigger?** Map to step actions. Confirm CSS selectors are stable (not framework-generated hashes).
5. **Offline requirement?** Keep everything in one file if so. No CDN dependencies without fallbacks.
6. **How many steps?** Under 15 for a pitch, 20-30 for a detailed walkthrough. Over 40 loses attention.
7. **Touch device support needed?** Most guided demos target desktop/laptop presentation contexts. The narrator panel has on-screen prev/play/next buttons that work on touch, but swipe gestures or mobile-specific layout are rarely needed.

## Implementation

Read `references/implementation.md` for all code snippets (vanilla JS / static HTML). If the target application uses React with React Router, also read `references/react-integration.md` for React-specific patterns covering stale closures, route navigation timing, and component architecture. For other SPA frameworks (Vue, Svelte, etc.), the same concepts apply (poll for elements after route change, store timer-relevant state outside the reactivity system) but the implementation details differ.

The four required pieces are:

1. **Narrator panel** - fixed-position bar with text container and progress bar
2. **Highlight class** - `outline` (not `border`) with animated glow, no layout shift
3. **Typewriter function** - recursive `setTimeout`, narration text set via `textContent` (never set user-authored narration via `innerHTML`), blinking cursor via CSS. The `innerHTML = ''` clearing before each tick is intentional and safe (no user content involved)
4. **Playback loop** - `playStep(idx)` that switches sections, runs actions, highlights, types, and auto-advances

### Step array

The single source of truth. Each step is a plain object:

```javascript
const DEMO_SCRIPT = [
  { section: 0, target: '.card', text: "Narration text." },
  { section: 1, target: null, text: "Transition.", transition: true },
  { section: 1, target: '#el', text: "Detail.", action: 'open', actionTarget: 'panel-id' },
];
```

Properties: `section` (which view), `target` (CSS selector or null), `text` (narrator copy), `transition` (show interstitial), `action`/`actionTarget` (trigger UI change), `delay` (optional per-step pause override in ms, defaults to `PAUSE_MS`).

### Timing defaults

| Constant | Default | When to adjust |
| --- | --- | --- |
| TYPE_SPEED | 5ms/char | 3ms for long text, 15ms for dramatic short statements |
| PAUSE_MS | 3000ms | 4-5s if audience reads rather than listens |
| Speed range | 0.5x-2x | Both constants divided by multiplier |

### Writing narrator copy

The typewriter effect means each word lands individually, so writing style matters:

- Short declarative sentences. Each step should make exactly one point.
- Conversational tone, present tense. Address the audience directly.
- Describe what the element means, not what the UI shows: "This column quantifies the cost impact" not "The cost is shown in this column".
- No jargon the audience wouldn't know. Match terminology to the domain, not the implementation.
- Under 30 words per step for presenter-led demos, up to 50 for self-narrating.

### Keyboard controls

Gate all keyboard capture behind an `isActive` flag so it does not interfere with normal page interaction. Space = play/pause, arrows = step, M = toggle TTS narration, Escape = exit and reset.

### Text-to-speech narration

Browser-native TTS via the `speechSynthesis` Web Speech API reads each step's narration aloud alongside the typewriter. Include it in every demo but keep it **off by default** - never speak without explicit user action. The user toggles it with a speaker icon in the control bar and the `M` key. See `references/implementation.md` (Text-to-speech narration) for voice selection, the single call site, and cancellation.

### Step countdown indicator

A thin bar below the step progress bar fills during the pause after the typewriter finishes, showing time until auto-advance. Include it in every demo. See `references/implementation.md` (Step countdown indicator) for the CSS-animation approach, placement, and reset via `clearAllTimers()`.

### Optional: transition interstitials

Full-screen overlay with cycling status messages between sections. Simulates processing time. Define messages per section in a 2D array. Fade each message, then dismiss overlay via callback.

### Optional: step actions

String-matched in `executeStep()`. Actions run before highlighting because elements inside collapsed panels can't be found by `querySelector` until the panel is open. Adding a new action is one `if` block. Keep it simple. Common patterns beyond expand/collapse: `expandOne` (open one panel, close all siblings - accordion style), `call` (trigger a named function like `requestBriefing()`), `addClass`/`removeClass` (toggle a CSS class on `document.body` for global state changes).

## Gotchas

These are the failure points that come up repeatedly:

- **Layout shift**: Use `outline` not `border` for highlighting. Outline does not affect box model.
- **Hidden elements**: If target is inside a collapsed container, the action must open it first. This is why actions execute before highlighting.
- **Dynamic selectors**: Framework-generated class names (`.css-1a2b3c`) break between builds. Use `data-*` attributes or IDs.
- **Scroll conflicts**: `scrollIntoView({ block: 'center' })` conflicts with fixed headers/panels. Set `scroll-padding-bottom` on the scroll container to account for the narrator panel height.
- **Z-index**: Narrator panel at 500+, interstitials at 490, highlighted elements at 2+. Check for conflicts with existing modals or dropdowns.
- **Cleanup on exit**: Reset every piece of state the demo touched: close opened panels, remove highlights, clear timers. Missing cleanup leaves confusing UI state.
- **Form inputs**: If the page has text inputs, textareas, or selects, the keyboard handler must skip them. Otherwise pressing Space in a text field triggers play/pause instead of typing. Check `e.target.tagName` and bail out for `INPUT`, `TEXTAREA`, `SELECT`.
- **ES modules**: If using `<script type="module">`, all demo functions called from `onclick` must be on `window.*`.
- **Print**: Hide demo panel and interstitial in `@media print`.
- **Accessibility**: Narrator panel should have `role="status"` and `aria-live="polite"`. Highlight outlines must meet contrast requirements.

## Applicability

Works for: prototypes, PoCs, HTML slide decks, data storytelling dashboards, product demos, workshop facilitation, investor pitches, onboarding walkthroughs.

Does not replace: user testing tools, screen recorders, production onboarding tours (use a tour library with persistence and analytics for those).

For framework apps, mount the demo engine as a conditional overlay component and pass the script array as a prop. For single-file demos, inline everything for offline/USB-stick distribution.

© sammcj · Apache-2.0 · sammcj/agentic-coding

Похожие скиллы

Все скиллы по теме «Фронтенд и UI» →
frontend-slides affaan-m Скилл frontend-slides для Claude Code собирает автономные HTML-презентации без зависимостей или переносит файлы PowerPoint в веб. Включается при подготовке докладов, питч-деков и разборе PPTX. CX Codex +1 7 300установок html-demo MengTo Скилл html-demo помогает воссоздать работу интерфейса на чистом HTML и React вместо записи тяжёлых видео или GIF. Окно поэтапно воспроизводит сценарий, оставаясь чётким на любой плотности пикселей. CX Codex +1 ★ 7 995звёзд репо revealjs ryanbbrown Собирает reveal.js презентации из HTML и CSS. Генерирует слайды по запросу без шага сборки, открывается прямо в браузере. CX Codex +1 756установок html-ppt-taste-brutalist nexu-io Скилл html-ppt-taste-brutalist для Claude Code задаёт оформление HTML-презентаций в стиле ЭЛТ-терминала. Он включается при создании докладов об инцидентах, проверках безопасности и разборе инфраструктуры. CX Codex +1 159установок frontend-slides-frontend-slides huytran1120 Скилл frontend-slides-frontend-slides для Claude Code создаёт анимированные HTML-презентации. Запускается при конвертации PPT/PPTX в веб-формат или при разработке слайдов с нуля. CX Codex +1 ★ 85звёзд репо keynot shawnzam Плагин keynot генерирует автономную HTML-презентацию в одном файле по текстовому описанию или прикреплённому брендбуку. ★ 15звёзд репо

Из того же набора73

Весь набор →
glean-cli Скилл glean-cli учит агента работать с CLI glean: искать по корпоративному индексу, спрашивать Glean Assistant, читать документы и карточки людей. CX Codex +1 ★ 173звёзд репо ai-changelog Скилл ai-changelog внедряет в репозиторий систему ведения CHANGELOG.md силами ИИ-агентов. Поддерживает SemVer, CalVer и датированные записи для проектов без сборщика. CX Codex +1 ★ 173звёзд репо rust-engineer Скилл rust-engineer на Claude Code настраивает помощника по Rust: от владения памятью и async-кода до тестов, Miri и оптимизации. Охватывает системные проекты. CX Codex +1 ★ 173звёзд репо software-research-assistant Субагент software-research-assistant для Claude Code исследует библиотеки, фреймворки и API по документации, примерам кода и актуальным рекомендациям из источников. Помогает внедрить инструмент или выбрать между вариантами. CX Codex ★ 173звёзд репо diagnose-hard-problem Скилл diagnose-hard-problem для Claude Code ведёт агента через диагностику сложных багов: строит проверяемый цикл воспроизведения, сужает сценарий и проверяет гипотезы. Разбирает регрессии и нестабильные ошибки. CX Codex +1 ★ 173звёзд репо yue2-music Скилл yue2-music для Claude, который ведёт генерацию песни в YuE2 от запроса до готового аудио: режимы full, melody и off, каверы с расшифровкой через SheetSage2 и локальный плеер для сравнения дублей. CX Codex +1 ★ 173звёзд репо swift-development Скилл swift-development внедряет правила многопоточности Swift 6, проверку изоляции акторов и шаблоны чистого API для проектов под iOS и macOS. CX Codex +1 ★ 173звёзд репо github-triage Скилл github-triage для Claude Code разбирает GitHub issues по меткам и состояниям и ведёт maintainer к решению. Разбирает баги и feature requests, готовит задачи агенту. CX Codex +1 ★ 173звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой