guided-demo
БесплатноБез исполняемых скриптовНе проверен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…
от sammcj★ 175 звёзд на GitHubОб этом скилле
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):
- What are the sections? Tabs, routes, scroll positions, slide indices? Determines how section switching works.
- Framework? Vanilla HTML works directly. React/Vue/Svelte need the engine as a conditional overlay component, and
querySelectormust run after render. - Presenter talking over it, or self-narrating? Talking over: shorter text, longer pauses. Self-narrating: detailed text, moderate pauses.
- Interactive elements to trigger? Map to step actions. Confirm CSS selectors are stable (not framework-generated hashes).
- Offline requirement? Keep everything in one file if so. No CDN dependencies without fallbacks.
- How many steps? Under 15 for a pitch, 20-30 for a detailed walkthrough. Over 40 loses attention.
- 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:
- Narrator panel - fixed-position bar with text container and progress bar
- Highlight class -
outline(notborder) with animated glow, no layout shift - Typewriter function - recursive
setTimeout, narration text set viatextContent(never set user-authored narration viainnerHTML), blinking cursor via CSS. TheinnerHTML = ''clearing before each tick is intentional and safe (no user content involved) - 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:
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/i
Установить guided-demo в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл guided-demo?
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.
Как установить скилл guided-demo?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл guided-demo запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic