UI Bug 检测与录制
bug-recording
检测目标 web 项目是否为运行在 Node 或 Bun 上的 React 应用,将其运行起来,使用 Playwright 搜寻 CSS/功能/渲染 bug,并为每个 bug 录制优化后的视频。当用户运行 `/bug-recording`,或要求在应用中查找并录制 UI bug 时使用。
- License 许可
- Unlicense
- 最近更新
- 2026-11-15
- Stars
- ★ 21
- Forks
- 9
01 前言 Front Matter
- name
- bug-recording
- description
- 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.
02 资源文件 6
- 参考文档package-lock.json1.7 KB
- 参考文档package.json172 B
- 脚本record.mjs14.9 KB
- 脚本reduce-size.sh506 B
- 参考文档references/SKILL.full.md14.4 KB
- 脚本scripts/setup-project.sh2.3 KB
03 SKILL.md 正文
bug-recording
Find bugs in a running React app and record a Playwright video of each one.
Inputs
- Target app directory. Default: current project root.
- Output directory. Default:
<target>/bug-recording-output.
Preconditions
Verify these are on PATH and stop loudly if any is missing:
node(orbun) to run the target app.ffmpegfor video encoding and the size-reduction pass.- This skill's own dependencies. If
node_modules/playwrightis absent in the skill directory, runnpm installhere, thennpx playwright install chromium.
Run
From the skill directory:
node record.mjs <target-app-dir> [output-dir]
The script:
- Detects the stack from
package.jsonand lockfiles (React + Node/Bun, the package manager, the dev script). - Starts the dev server and waits until it reports a URL and is reachable.
- Discovers routes by crawling in-app links from the root page.
- Per route, captures console errors and runs three detectors:
- render: a console/page error on load or an error-boundary fallback,
- css: text clipped under
overflow:hiddenwith no ellipsis, - functional: an "increase"/"+"/"add" control that moves a numeric readout the wrong way.
- 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, runsreduce-size.shto shrink it, and samples keyframes. - Writes
findings.jsonplusvideos/,frames/,screenshots/.
After running
- Report the bug count and where artifacts landed.
- The bugs, evidence, and per-step action logs are in
findings.json. You may read the sampledframes/*.pngto 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.
04 同仓库更多 Skills
word-count
Counts the words, lines and characters of a text or a file.
slugify
Turns a title or a sentence into a URL slug, lowercase words joined by hyphens with accents removed.
json-format
Validates a JSON file and pretty prints it with two space indentation, or reports where the JSON is invalid.
commit-message
Writes a conventional commit message for the staged git changes.
skills-gateway
Gateway and router to a catalog of skills that are not registered directly. Use it before any task a specialized skill could handle, such as text, JSON or git chores. It finds the right skill and loads its instructions.
decision-log
Record, list, show and supersede architecture decisions that persist across sessions in the shared agent infra state store. Use when the user says "record this decision", "log an ADR", "what did we decide about", "list decisions", or "supersede decision".