record-golden-test

Record deterministic play sessions and capture timestamped keyframe screenshots for golden replay visual regression testing.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/punkfuncgames/tetris-clone --skill record-golden-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: record-golden-test
Source: https://github.com/punkfuncgames/tetris-clone/tree/main/.claude/skills/record-golden-test
Command: npx skills add https://github.com/punkfuncgames/tetris-clone --skill record-golden-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates reproducible, time-stamped play-session replays and keyframe screenshots to serve as golden references for automated visual regression testing, removing guesswork from UI and gameplay visual checks after code changes.

Core Features & Use Cases

  • Deterministic Replay Recording: Capture all input events and periodic keyframe screenshots while a user plays a session to produce a JSON replay with referenced PNG keyframes.
  • Golden Replay Validation: Replay saved sessions by injecting recorded inputs, recapture screenshots at keyframe timestamps, and compare semantically using AI vision to detect visual regressions.
  • Use Case: Record a 30–60 second reference playthrough of a Unity scene, annotate semantic keyframes, and validate builds on CI to catch broken UI, missing entities, or layout regressions.

Quick Start

Start a recording of the playable scene at 1920x1080 with a 5 second keyframe interval, save the output to Tests/GoldenReplays, and run validate_golden_replay on the saved JSON.

Frequently Asked Questions about record-golden-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up visual regression testing for a Unity game?

Golden replay visual regression records a deterministic play session to capture input events and timestamped keyframe screenshots. This creates a JSON replay file with PNG references that serves as a baseline to validate UI and gameplay visuals after code changes.

How do I capture keyframe screenshots during a Unity play session?

You capture keyframe screenshots by starting a recording session at a target resolution like 1920x1080 with a specified keyframe interval, such as 5 seconds. The recording automatically saves periodic timestamped screenshots alongside the input event data into a JSON replay file.

Can I automate UI visual regression checks in a Unity CI pipeline?

Yes, you can automate UI visual regression checks in a Unity CI pipeline. By injecting recorded input events from a saved JSON replay, the pipeline recaptures screenshots at keyframe timestamps and uses semantic AI vision comparisons to generate automated pass or fail reports for build validation.

Does Unity visual regression testing work across different platforms and commits?

Unity visual regression testing works across different platforms and commits by using recorded input injection to reproduce exact gameplay sessions. This deterministic replay mechanism ensures that the same sequence of events is executed to capture comparable keyframe screenshots regardless of environment changes.

How does AI vision comparison detect gameplay visual regressions?

AI vision comparison detects gameplay visual regressions by semantically analyzing newly captured keyframe screenshots against saved golden reference PNGs. Instead of strict pixel matching, it evaluates visual differences to identify broken UI, missing entities, or layout shifts for pass or fail reporting.

What is the best way to catch broken UI or missing entities after Unity code changes?

The best way to catch broken UI or missing entities after Unity code changes is to record a 30 to 60 second reference playthrough, annotate semantic keyframes, and validate subsequent builds by replaying the inputs. AI vision comparisons then automatically detect layout regressions and missing visual elements.