/playwright-recast:studio-workflowfrom playwright-recast
Generates polished demo videos from Playwright trace recordings. Parses actions, writes voiceover scripts, generates SRT subtitles, and runs the recast pipeline. Useful for turning browser recordings into narrated demos.
Ships in playwright-recast. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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)
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/recast-guideGuide for using playwright-recast to convert Playwright traces into demo videos. Use when the user asks to create product demos, generate videos from tests, add voiceover to traces, or process Playwright recordings./script-writerGenerate voiceover scripts and subtitles from technical video descriptions or Gherkin feature files. Transforms raw UI actions into benefit-driven marketing narration. Use when creating demo video scripts, voiceover text, SRT subtitles, or writing doc strings for playwright-bdd feature files.npx claudepluginhub thepatriczek/playwright-recast --plugin playwright-recastOther plugins' skills for the same job