Help us improve
Share bugs, ideas, or general feedback.
From playwright-recast
Generates a polished demo video from a Playwright trace recording by parsing actions, writing voiceover scripts, and producing SRT subtitles.
npx claudepluginhub thepatriczek/playwright-recast --plugin playwright-recastHow this skill is triggered — by the user, by Claude, or both
Slash command
/playwright-recast:studio-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a demo video from a raw Playwright trace recorded by `recast-studio`.
Converts Playwright test traces into polished demo videos with voiceover, subtitles, speed control, and narration using the playwright-recast library.
Records polished UI demo videos of web apps using Playwright. Triggers for demo, walkthrough, screen recording, or tutorial requests. Uses discover-rehearse-record process with cursor overlay and WebM output.
Generates MP4 walkthrough videos from app screenshots or live sites using Remotion. Adds smooth transitions, zoom effects, text overlays, progress bars, optional voiceover narration for demos, showcases, docs.
Share bugs, ideas, or general feedback.
Generate a demo video from a raw Playwright trace recorded by recast-studio.
recast-studio and wants to generate a videotrace.zip and .webm filesA directory path containing:
trace.zip — Playwright trace*.webm — screen recordingProduced by: npx recast-studio <url>
Execute these steps in order. Each step produces artifacts the next step needs.
Read the trace directory and parse trace.zip to extract all actions. Use the playwright-recast parseTrace function:
const { parseTrace } = await import('<recast-root>/src/parse/trace-parser.js')
const trace = await parseTrace('<input-dir>/trace.zip')
List all actions with their index, method, selector/URL, value, and timestamp. Mask any values from password-like selectors (containing "password", "passwd", "pwd", "secret").
Present the action list to yourself for analysis.
Group the actions into logical steps. For each step, decide:
Hidden steps — setup that should not appear in the video:
goto)Visible steps — the actual demo content:
Track which action indices belong to each step and whether it's hidden.
For each visible step, write 1-2 sentences of voiceover text. Follow the script-writer skill guidelines:
Create an SRT file mapping voiceover text to trace timestamps.
Timing rules:
startTime in that stepHH:MM:SS,mmm --> HH:MM:SS,mmmSRT numbering: sequential starting from 1, only visible steps with voiceover.
Write the SRT to <input-dir>/subtitles.srt.
Create a TypeScript script that runs the recast pipeline. Key decisions:
hideSteps predicate: Build a Set<number> of hidden action indices. The predicate matches actions by their timestamp against the original trace actions.
Speed: duringIdle: 3.0, duringUserAction: 1.0, duringNetworkWait: 2.0
Visual effects: autoZoom (inputLevel: 1.2), cursorOverlay, clickEffect with sound.
Voiceover: ElevenLabsProvider with eleven_multilingual_v2 model. Language code from the voiceover text language. Requires ELEVENLABS_API_KEY.
Subtitles: burn into video with styled ASS subtitles (Arial, bold, white background).
Intro/outro: if user provides paths, add .intro() and .outro() to the pipeline.
Output: <input-dir>/demo.mp4 (or user-specified path).
import { Recast, ElevenLabsProvider } from 'playwright-recast'
const hiddenActionIndices = new Set([/* from step 2 */])
let pipeline = Recast.from('<input-dir>')
.parse()
.hideSteps((action) => {
// Match hidden actions by timestamp
const idx = traceActions.findIndex(
a => a.startTime === action.startTime && a.endTime === action.endTime
)
return hiddenActionIndices.has(idx)
})
.speedUp({ duringIdle: 3.0, duringUserAction: 1.0, duringNetworkWait: 2.0 })
.subtitlesFromSrt('<input-dir>/subtitles.srt')
.textProcessing({ builtins: true })
.autoZoom({ inputLevel: 1.2, clickLevel: 1.0, centerBias: 0.3 })
.cursorOverlay()
.clickEffect({ sound: true })
.voiceover(ElevenLabsProvider({
modelId: 'eleven_multilingual_v2',
languageCode: '<detected-language>',
}))
.render({
format: 'mp4',
resolution: '4k',
fps: 120,
burnSubtitles: true,
subtitleStyle: {
fontFamily: 'Arial',
fontSize: 96,
primaryColor: '#1a1a1a',
backgroundColor: '#FFFFFF',
backgroundOpacity: 0.75,
padding: 40,
bold: true,
position: 'bottom',
marginVertical: 100,
marginHorizontal: 200,
chunkOptions: { maxCharsPerLine: 55 },
},
})
await pipeline.toFile('<input-dir>/demo.mp4')
After the pipeline completes, report:
--no-voiceover — skip TTS, keep subtitles onlyELEVENLABS_API_KEY is not set, inform user and suggest subtitle-only modeUser: /studio-workflow .recast-studio/
Agent: Reading trace from .recast-studio/trace.zip...
Found 9 actions:
0: goto https://app.codexis.cz
1: click "Přihlásit se"
2: fill #username → "jana@..."
3: fill #password → "***"
4: click "Přihlásit"
5: click .search-input
6: fill .search-input → "pracovní právo"
7: click .result-item
8: click "Stáhnout"
Grouping into steps:
[hidden] Actions 0-4: Login and navigation
[visible] Actions 5-6: "Do vyhledávače zadáme klíčový pojem z oblasti pracovního práva."
[visible] Action 7: "Z výsledků vybereme nejrelevantnější dokument."
[visible] Action 8: "Jedním kliknutím dokument stáhneme pro offline práci."
Writing SRT to .recast-studio/subtitles.srt...
Running recast pipeline...
✔ Speed processing (38s → 18s)
✔ Voiceover (ElevenLabs, 3 segments)
✔ Click effects + cursor + auto-zoom
✔ Rendering 4K
✅ .recast-studio/demo.mp4 (8.2 MB)