screen-recorder
Skill13 starsChanged 2 months agoMITView on GitHub
Records short videos of specific page sections using Playwright's `recordVideo` API, plays scripted interactions (hover, click, focus, scroll, keypress), crops the output to a target element via `ffmpeg`, and saves a `.webm` (or `.mp4` / `.gif`) artifact to `.agent/recordings/`. Use when a still screenshot cannot prove the change — verifying a View Transition, a Motion `layout` morph, a hover stagger, a scroll-driven timeline, an `@starting-style` entry, or any multi-frame interaction. Called by the `animations` skill to validate a generated animation, by the `ux` skill to capture an interaction the `pr-reviewer` cannot read from code, and by the `pr-reviewer` agent to produce a local clip it can inspect on motion-heavy diffs. Triggers on "record this interaction", "capture this animation", "video of this section", "validate the transition visually", "screen recording", "/screen-recorder".
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- jqaisystems/jqai-ai-skillstheir own version, first seen May 30, 2026
- IvanCampos/agentstheir own version, first seen Feb 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- IvanCampos/agents★ 5same name
- jqaisystems/jqai-ai-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/workflow/autonomous-workflow/CLAUDE.mdCLAUDE.md
- holistic-analysisSkill
- ideateSkill
- interviewSkill
- playwright-trace-analyzerSkill
- profile-optimizerSkill
- rum-trackingSkill
- video-analyserSkill
- create-skillSkill
- docsSkill
- handoffSkill
- optimize-claude-mdSkill
- persistent-memorySkill
- changelogSkill
- ci-auto-fixSkill
- create-prSkill
- github-actions-authorSkill
- resolve-conflictsSkill
- animations-nativeSkill
- animationsSkill
- behavioral-designSkill
- chartingSkill
- storybookSkill
- uxSkill
- visual-designSkill
- ai-engineeringSkill
- code-qualitySkill
- confidenceSkill
- criticalSkill
- dxSkill
- eval-iterateSkill
- jev-assertSkill
- measurableSkill
- observe-runSkill
- optimize-approachSkill
- polishSkill
- pr-reviewSkill
- review-branchSkill
- review-loopSkill
- severitySkill
- tddSkill
- test-provenance-guardSkill
- verify-behaviorSkill
- e2e-pr-stabilizerSkill
- e2e-testing-mobileSkill
- e2e-testingSkill
- ui-verifySkill
- autonomous-workflowSkill
- aw-create-planSkill
- aw-create-walkthroughSkill
- fix-bugSkill
- implement-suggestionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Not a test suite, not a permanent fixture: every recording is a throwaway artifact written to .agent/recordings/ for one-shot visual review.
- Distinctive: line 69
Do not reach for this skill when:
- Distinctive: line 85
Before recording anything, verify the environment.
- Distinctive: line 88
Run these checks (read-only):
- Very specific: line 141
Write a single-purpose Node.js script to .agent/recordings/<slug>/record.mjs using the template at templates/record.mjs.template.
- Very specific: line 150
Use chromium.launch({ headless: true }) — never headed, never webkit, never firefox (recording fidelity differs between engines).
- Very specific: line 154
Always await context.close() before reading the video path — the file is finalised only on context close.
- Very specific: line 177
Use ffmpeg to crop the full-viewport .webm to the bounding box of the target element, then downscale to a max-width-px-wide output with a …
- Very specific: line 192
If ffmpeg is unavailable, skip cropping with a one-line note and deliver the uncropped .webm.
- Distinctive: line 213
If the caller is another skill (Phase 6 below), return the path only — no narration.
- Very specific: line 255
Add .agent/recordings/ to .gitignore if it is not already covered.
- Distinctive: line 258
If two animations need verifying, run twice.
- Very specific: line 267
If the user passes reduced-motion: true, the recording must show the reduced variant.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Screen Recorder
Produces a short .webm clip of a specific page section so an agent —
or a reviewer reading a PR — can see motion that a static screenshot
hides.
Not a test suite, not a permanent fixture: every recording is a
throwaway artifact written to .agent/recordings/ for one-shot visual
review.
This
SKILL.mdis a thin index. Detailed rules live inrules/*.mdand load on demand. Literal Playwright andffmpegboilerplate the skill emits lives intemplates/*.md. Do not preload everything — load only what the current phase asks for.
When to use
Reach for this skill when any of the following is true:
- A diff changes animation, transition, or interactive motion code
(
@keyframes,transition,View Transitions, Motionlayout,@starting-style, scroll-driven timelines). - A still screenshot would not falsify the bug or feature claim — the proof requires at least two frames.
- A reviewer asks "what does this look like?" on a PR whose answer is a moving image, not a description.
- The
animationsskill has produced an animation and wants visual evidence it hits 60 fps and respectsprefers-reduced-motion. - The
uxskill flagged a flow (drag, focus ring, hover reveal, expanding nav, modal entrance) where the asserted UX claim is about timing, not layout.
Do not reach for this skill when:
- A static screenshot is sufficient — capture a still directly (the
pr-revieweragent's visual pass reads stills locally; it never attaches them to the PR). - The task is to author a durable Playwright test — use the
e2e-testingskill. - The input is an existing
trace.zip— useplaywright-trace-analyzer. - The input is an existing screen recording (e.g., a user bug report) —
use
video-analyser.
Phase 0 — Preflight (mandatory gate)
Before recording anything, verify the environment. Halt and ask the user before installing tools.
Run these checks (read-only):
# 1. Playwright installed?
command -v npx >/dev/null && npx --no-install playwright --version 2>/dev/null
# 2. Chromium driver available?
npx --no-install playwright install --dry-run chromium 2>/dev/null
# 3. ffmpeg available (cropping + transcoding)?
command -v ffmpegDecision table:
| State | Action |
Playwright + Chromium + ffmpeg all present | Proceed to Phase 1. |
| Playwright missing | Halt. Print install plan, ask permission. See rules/preflight.md. |
| Playwright present, Chromium driver missing | Halt. Print npx playwright install chromium, ask first. |
ffmpeg missing | Halt. Print install plan (brew install ffmpeg), ask first. Cropping disabled until installed. |
Target URL is localhost:* and not reachable | Halt. Ask the user to start the dev server before recording. |
Print exact commands; do not run silently.
Full preflight rules: rules/preflight.md.
Phase 1 — Inputs
Collect, then confirm back to the user before running:
| Input | Required | Default | Notes |
url | Yes | — | Full URL or localhost:<port>/<path>. Auth handled in Phase 2. |
selector | Yes | — | CSS, data-testid="...", or role=button[name="..."]. The crop target. |
interaction | No | idle (record state only) | Named recipe or inline script. See rules/interactions.md. |
duration | No | 5000 ms | Total recording length. Cap 15 s. Default 5 s gives the video-analyser enough I-frames (≈ 10 at the 0.5 s GOP) for its 8-frame default. |
viewport | No | { width: 1280, height: 800 } | The recording canvas — kept large for layout fidelity (responsive breakpoints, container queries). Downscaling happens at the crop stage. |
output-name | No | <selector-slug>-<ts> | File slug. .webm is always produced; .mp4 / .gif opt-in. |
out-format | No | webm | One of webm, mp4, gif. Non-webm requires ffmpeg transcode. |
max-width | No | 768 px | Output downscale ceiling. 768 px is the video-analyser Pareto knee — UI text stays legible, image tokens stay cheap (~786 tokens/frame on Sonnet). Crops smaller than this are not upscaled. Set 0 to disable downscale. |
keyint | No | 15 frames | Forced GOP length. At 30 fps this places one I-frame every 0.5 s, so the video-analyser's select='eq(pict_type,I)' sampling always lands enough frames for short clips. |
reduced-motion | No | false | If true, emulate prefers-reduced-motion: reduce. |
Echo the resolved inputs back as a one-screen summary before Phase 2.
Caller-specific overrides. When caller: pr-reviewer and out-format is unspecified, default to mp4 (GitHub previews .mp4 inline). When caller: animations and the immediate next step is a Skill("video-analyser") invocation, keep max-width: 768 and keyint: 15 — they are already analyser-optimal. Pass max-width: 0 only when a human reviewer has reported text-still-unreadable at 768 px (rare).
Phase 2 — Generate the recording script
Write a single-purpose Node.js script to
.agent/recordings/<slug>/record.mjs using the template at
templates/record.mjs.template.
Substitution rules and the interaction recipe catalog are in
rules/recording-script.md and
rules/interactions.md.
Hard rules:
- Use
chromium.launch({ headless: true })— never headed, neverwebkit, neverfirefox(recording fidelity differs between engines). - Pass
recordVideo: { dir, size: viewport }on the context, not the browser. Playwright emits one.webmper page. - Always
await context.close()before reading the video path — the file is finalised only on context close. - Cap the script at one page, one context, one recording per run. Multiple recordings means multiple runs.
Phase 3 — Run the script
node .agent/recordings/<slug>/record.mjsCapture stdout / stderr. On non-zero exit, do not crop — surface the error and stop.
Resolve the produced .webm path from the script's stdout (the template
prints VIDEO=<absolute-path> as its last line).
Phase 4 — Crop and downscale for the analyser
Use ffmpeg to crop the full-viewport .webm to the bounding box of
the target element, then downscale to a max-width-px-wide output with
a fixed 0.5 s GOP. The script in Phase 2 captures the bbox via
locator.boundingBox() and writes it to a sibling bbox.json.
The defaults (max-width: 768, keyint: 15) are tuned for the
video-analyser skill's Pareto knee — see
the Analyser-optimised sizing
section for the numbers. Net effect: 768 px wide keeps UI text legible
at ~786 image tokens/frame on Sonnet, and the short GOP guarantees the
analyser's keyframe-first sampling (Step 5a) lands on signal-dense scene
transitions rather than falling back to uniform-time sampling.
Crop command, downscale filter, and format-conversion rules: rules/cropping.md.
If ffmpeg is unavailable, skip cropping with a one-line note and
deliver the uncropped .webm.
Phase 5 — Deliver
Print a delivery summary:
Recording: <absolute path>
Format: <webm | mp4 | gif>
Size: <KB>
Duration: <ms>
Viewport: <w>x<h>
Cropped: <yes (WxH at X,Y) | no — ffmpeg missing>
URL: <recorded URL>
Selector: <selector>
Interaction: <recipe or inline summary>If the caller is another skill (Phase 6 below), return the path only — no narration.
Phase 6 — Integration callers
This skill is called by four other consumers via Skill("screen-recorder").
Full handshake spec: rules/integrations.md.
| Caller | When | Required inputs |
animations | After Phase 7 ("Measure") to attach a clip to the delivery, or when the user asks "show me". | url, selector, animation name (becomes output-name). |
ux | When a finding is severity Critical / High and concerns timing, motion, focus order, or interaction feedback. | url, selector, the finding ID. |
pr-reviewer | In PR Mode when the diff matches animations / ux heuristics and the PR author has not attached a recording. | url, selector, PR number (slugs the local artifact — pr-reviewer never uploads it). |
storybook | When a scaffolded story includes motion or transitions that a still screenshot cannot prove (multi-frame interactions). | url (story permalink), selector, story name (becomes output-name). |
Callers pass inputs in their Skill() call body; this skill never asks
the calling skill questions — it falls back to defaults and proceeds, or
fails fast with one explanatory line.
Required Reading by Phase
Load on demand — do not preload.
| Phase | Files |
| 0 | rules/preflight.md |
| 1 | rules/interactions.md |
| 2 | rules/recording-script.md, templates/record.mjs.template |
| 2/3 | rules/interactions.md |
| 4 | rules/cropping.md |
| 6 | rules/integrations.md |
Core Principles
- Throwaway, not test.
Recordings live in
.agent/recordings/and are never checked into git. Add.agent/recordings/to.gitignoreif it is not already covered. - One concern per clip. One URL, one selector, one interaction. If two animations need verifying, run twice.
- Headless Chromium only.
Headed mode introduces window-chrome that ruins the crop; other
engines re-encode
transformandfilterdifferently. - Crop with
ffmpeg, not with viewport gymnastics. Resizing the viewport to the element bbox changes layout (responsive breakpoints, container queries) and lies about what the user sees. Record the real viewport, crop after. - Respect
prefers-reduced-motionexplicitly. If the user passesreduced-motion: true, the recording must show the reduced variant. Theanimationsskill calls this skill twice (default + reduced) to validate both paths. - No live URLs without consent. Recording staging or production captures real user data into a video file. Refuse unless the user has explicitly named the staging / production host.
Anti-patterns (one-liners — full lists in linked rules)
- Recording with
headed: trueand submitting the result as evidence (rules/recording-script.md). - Sizing the viewport to the element to "auto-crop" — distorts layout
(
rules/cropping.md). - Skipping
await context.close()and reading a half-written.webm(rules/recording-script.md). - Multiple
page.goto()calls in one recording — the second navigation appends to the same video and confuses the viewer. - Recording at
localhost:3000without checking the dev server is up (rules/preflight.md). - Hard-coding selectors that drift (
div > div:nth-child(3)) instead ofdata-testidor role (rules/interactions.md). - Transcoding to
.giffor anything over 4 s — the file balloons past 10 MB (rules/cropping.md). - Committing
.agent/recordings/into git.
Definition of Done
- Preflight passed — Playwright, Chromium, and (if cropping
requested)
ffmpegare present. - Inputs echoed back and confirmed.
record.mjswritten from the template, no manual edits to the Playwright API surface.- Script exited 0 and printed
VIDEO=<path>. .webmexists at the printed path and is> 0 bytes.- If cropping requested,
bbox.jsonis non-empty and the cropped output exists. - Delivery summary printed (or path-only return if called by another skill).
.agent/recordings/is in.gitignore(or covered by an existing pattern).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

