Bug recording

From diegopacheco/ai-playground · View interactive version

Bug recording is an AI agent skill from the GitHub repository diegopacheco/ai-playground. Detect whether a target web project is a React app on Node or Bun, run it, hunt for CSS / functional / render bugs with Playwright, and record an optimized video of each bug. Use when the user runs /bug-recording or asks to find and record UI bugs in an app.

How to use this skill

Skill file

bug-recording

Find bugs in a running React app and record a Playwright video of each one.

Inputs

Preconditions

Verify these are on PATH and stop loudly if any is missing:

skill directory, run npm install here, then npx playwright install chromium.

Run

From the skill directory:

node record.mjs <target-app-dir> [output-dir]

The script:

  1. Detects the stack from package.json and lockfiles (React + Node/Bun, the

package manager, the dev script).

  1. Starts the dev server and waits until it reports a URL and is reachable.
  2. Discovers routes by crawling in-app links from the root page.
  3. Per route, captures console errors and runs three detectors:

the wrong way.

  1. Records a narrated Playwright walkthrough per confirmed bug: starts on the

home page, moves a visible cursor to the matching nav link and clicks through

to the bug page, captions each reproduction step on screen, performs the

triggering click, and dwells on the result with the broken element

highlighted. Then converts it to H.264 .mp4, runs reduce-size.sh to shrink

it, and samples keyframes.

  1. Writes findings.json plus videos/, frames/, screenshots/.

After running

read the sampled frames/*.png to enrich each bug's reproduction steps before

handing off to /bug-report.

Honest limits

The detectors target broad bug classes, not every possible bug. Report the

captured evidence, not a verdict beyond it. The agent cannot watch the .mp4 as

motion; reproduction narrative comes from the action log and sampled frames.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.