
Golden and snapshot tests
Lets an agent write and review frozen data and pixel golden tests for React Native apps
Golden and snapshot tests is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- JavaScript, TypeScript
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 16
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Golden and snapshot tests
This skill sets up and polices golden tests in a Jest golden project: readable text snapshots of pure logic, append-only contract entries for outputs that installed versions and saved files must reproduce, and pixel goldens for Skia drawing. It spells out when a golden may be rewritten, which is only by running jest -u on one named file after reading the diff, and forbids any script, hook or CI job from writing goldens automatically.
The workflow picks the right kind of golden, scaffolds missing helpers from bundled templates, and walks through creating goldens with --listTests before accepting them. Two bundled checker scripts inspect the working tree and the commit history, verifying that golden changes carry a Gate-Change trailer, that contract entries are never edited or deleted, and that pixel tolerances are never raised without approval.
It expects a Jest setup with a golden project, jest-expo for iOS snapshots, and Node for the checker scripts. Pixel goldens additionally need jest-image-snapshot pinned to a specific version and a CanvasKit-based Skia test environment.
When your agent uses it
Guards data and pixel goldens - *.golden.test.ts snapshots, append-only [contract] entries, Skia tolerance, jest -u rules. Use when adding a golden or snapshot test or a .snap diff appears. Not for device screenshots (e2e-maestro).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Runs JavaScript and TypeScript scripts(see the files on GitHub)
- No network calls found in its scripts(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 36 files (320 KB) on GitHub on 5 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the react-native plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add zakariaf/ReactNative-Skills
/plugin install react-native@react-native-skillsOr copy only this skill to ~/.claude/skills/golden-and-snapshot-tests:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/golden-and-snapshot-tests &&
cp -R "$tmp/skills/golden-and-snapshot-tests" ~/.claude/skills/golden-and-snapshot-tests &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/golden-and-snapshot-tests inside it instead.
Copy the skill folder to ~/.agents/skills/golden-and-snapshot-tests to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/golden-and-snapshot-tests &&
cp -R "$tmp/skills/golden-and-snapshot-tests" ~/.agents/skills/golden-and-snapshot-tests &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/golden-and-snapshot-tests inside it instead.
Copy the skill folder to ~/.cursor/skills/golden-and-snapshot-tests to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/golden-and-snapshot-tests &&
cp -R "$tmp/skills/golden-and-snapshot-tests" ~/.cursor/skills/golden-and-snapshot-tests &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/golden-and-snapshot-tests inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/zakariaf/ReactNative-Skills.git --path skills/golden-and-snapshot-testsOr copy the folder to ~/.gemini/skills/golden-and-snapshot-tests yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/golden-and-snapshot-tests:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/golden-and-snapshot-tests &&
cp -R "$tmp/skills/golden-and-snapshot-tests" ~/.copilot/skills/golden-and-snapshot-tests &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/golden-and-snapshot-tests inside it instead.
Get the folder:
git clone --depth 1 https://github.com/zakariaf/ReactNative-Skills.gitThen copy ReactNative-Skills/skills/golden-and-snapshot-tests into your agent's skills folder as golden-and-snapshot-tests. Agents that support SKILL.md read one folder per skill.
What it does
- Data golden pattern
- Readable text snapshots of pure units with fixed inputs and reviewable diffs.
- Append-only contract entries
- Protects outputs such as backup formats and derived identifiers from silent change across versions.
- Pixel golden matcher
- Renders Skia drawings at several canvas sizes and compares them with a fixed 0.1% tolerance.
- Snapshot update rules
- Forbids automated snapshot updates in scripts, hooks and CI and limits jest -u to one file by hand.
- Tree and history checkers
- Scripts that verify snapshot hygiene and Gate-Change trailers on commits.
- Commit trailer workflow
- Steps for recording why each golden changed in the commit message.
Good for
- Add a readable golden test for a pure scheduling or formatting function
- Pin a backup or export format so future versions keep producing the same output
- Create pixel goldens for a Skia chart at narrow, phone and tablet sizes
- Investigate a failing snapshot and decide whether it is a bug or an intended change
- Check that a branch's golden changes carry the required Gate-Change trailers
Golden and snapshot tests FAQ
What does the skill need to be installed?
It expects a Jest golden project, and pixel goldens also need jest-image-snapshot pinned at 6.5.2 with its types at 6.4.2. The checker scripts run with Node.
Can the agent update snapshots automatically?
Not in scripts, hooks or CI. Goldens change only by running jest -u on one named file by hand after reading its diff.
What is a contract entry?
A describe titled [contract] that pins output every installed version or saved file must reproduce. Existing entries are never edited, deleted or renamed.
Does Golden and snapshot tests handle device screenshots?
No. Device screenshots are covered by a separate e2e-maestro skill that uses a 0.2% tolerance.
How do I install Golden and snapshot tests in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/golden-and-snapshot-tests to use it in all your projects, or to .claude/skills/golden-and-snapshot-tests in one project. Or install the react-native plugin, which includes it: /plugin marketplace add zakariaf/ReactNative-Skills, then /plugin install react-native@react-native-skills.
Does Golden and snapshot tests run scripts?
Yes. It runs JavaScript and TypeScript scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Golden and snapshot tests?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Golden and snapshot tests?
The closest alternatives to Golden and snapshot tests are Vibe golden file testing, Design visual parity, Git commits and reporting, Jest skill and macOS golden gate design.
Where this comes from
- Description: from the skill's own SKILL.md.
More from zakariaf/ReactNative-Skills

Turns canvas taps, swipes and drags into typed intents hit-tested on the drawn layout
- Open source
- 16 GitHub stars
- Developer tools

Adds a gated debug menu, debug deep link and simulated clock and offline mode to React
- Open source
- 16 GitHub stars
- Developer tools

Checks React Native code for accessibility labels, touch targets, text scaling
- Open source
- 16 GitHub stars
- Developer tools

Sells a one-time Premium unlock through the App Store and Google Play
- Open source
- 16 GitHub stars
- Finance and payments

Walks an Expo app through an SDK, Xcode or Android toolchain upgrade in one commit
- Open source
- 16 GitHub stars
- Developer tools

Builds React Native forms with one valibot schema, catalog-key errors and keyboard-aware
- Open source
- 16 GitHub stars
- Developer tools



