# Vibe golden file testing

> Vibe golden file testing is an open-source agent skill for developer tools. Makes golden file tests stable by normalizing dates, IDs, paths and durations. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/ash1794/vibe-engineering/tree/master/plugins/vibe-engineering/skills/vibe-golden-file-testing
- **Repository:** https://github.com/ash1794/vibe-engineering
- **GitHub stars:** 163
- **License:** MIT
- **Skill name:** vibe-golden-file-testing
- **Collection:** https://github.com/ash1794/vibe-engineering
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill guides an agent through writing snapshot or golden file tests that stay stable when output contains values that change between runs. It walks through identifying dynamic fields in the tested output, building a normalizer that replaces dates, timestamps, UUIDs, durations, hostnames, ports and absolute paths with fixed placeholders, and applying that normalizer to both the live output and the saved golden file.

The workflow also covers generating golden files behind an environment flag so they can be refreshed on demand, and documenting the update command for the project. A table of common regex patterns and replacement tokens is included as a reference. The examples use Go, but the approach applies to other languages.

The skill expects a project with existing or planned output comparison tests and access to the test runner. It also specifies a short summary format to report the dynamic fields found, the normalizations applied, the golden file path and the update command.

## When your agent uses it

> Implements snapshot/golden file tests with temporal normalization so tests don't break daily. Use when implementing tests that compare output against expected snapshots.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/ash1794/vibe-engineering/tree/HEAD/plugins/vibe-engineering/skills/vibe-golden-file-testing)
- [License: MIT](https://github.com/ash1794/vibe-engineering/tree/HEAD/plugins/vibe-engineering/skills/vibe-golden-file-testing)

## Features

- **Dynamic field identification:** Helps locate values such as dates, IDs and durations that would make snapshot comparisons fail.
- **Normalizer function pattern:** Provides a template for replacing volatile values with fixed placeholder tokens before comparison.
- **Golden file update flag:** Shows how to regenerate expected snapshot files behind an environment variable.
- **Common regex reference:** Lists regex patterns and replacements for dates, UUIDs, timestamps, durations, paths and ports.
- **Setup summary format:** Defines a short report listing dynamic fields, normalizations, golden file path and update command.

## Good for

- Make an existing snapshot test stop failing when dates change
- Add golden file tests for a CLI tool's output
- Normalize UUIDs and timestamps in API response snapshots
- Set up a command to regenerate golden files after intended changes

## Install

### Claude Code

This skill ships in the `vibe-engineering` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add ash1794/vibe-engineering
/plugin install vibe-engineering@vibe-plugins
```

Or copy only this skill to `~/.claude/skills/vibe-golden-file-testing`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ash1794/vibe-engineering.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/vibe-golden-file-testing &&
cp -R "$tmp/plugins/vibe-engineering/skills/vibe-golden-file-testing" ~/.claude/skills/vibe-golden-file-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/vibe-golden-file-testing` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/vibe-golden-file-testing` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ash1794/vibe-engineering.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/vibe-golden-file-testing &&
cp -R "$tmp/plugins/vibe-engineering/skills/vibe-golden-file-testing" ~/.agents/skills/vibe-golden-file-testing &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/vibe-golden-file-testing` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/vibe-golden-file-testing` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ash1794/vibe-engineering.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/vibe-golden-file-testing &&
cp -R "$tmp/plugins/vibe-engineering/skills/vibe-golden-file-testing" ~/.cursor/skills/vibe-golden-file-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/vibe-golden-file-testing` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/ash1794/vibe-engineering.git --path plugins/vibe-engineering/skills/vibe-golden-file-testing
```

Or copy the folder to `~/.gemini/skills/vibe-golden-file-testing` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/vibe-golden-file-testing`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/ash1794/vibe-engineering.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/vibe-golden-file-testing &&
cp -R "$tmp/plugins/vibe-engineering/skills/vibe-golden-file-testing" ~/.copilot/skills/vibe-golden-file-testing &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/vibe-golden-file-testing` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/ash1794/vibe-engineering.git
```

Then copy `vibe-engineering/plugins/vibe-engineering/skills/vibe-golden-file-testing` into your agent's skills folder as `vibe-golden-file-testing`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When should Vibe golden file testing not be used?

The skill says not to use it for simple unit tests with static assertions, for tests where exact byte-for-byte output is the requirement, or for performance benchmarks.

### What does the skill change in a test suite?

It guides adding a normalizer applied to both actual and golden output, a flag-controlled golden file write, and documentation of the update command.

### What kinds of values does Vibe golden file testing normalize?

Dates, ISO datetimes, UUIDs, Unix timestamps, durations, absolute file paths and port numbers, using the regex table in the skill.

### How do I install Vibe golden file testing in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/vibe-golden-file-testing to use it in all your projects, or to .claude/skills/vibe-golden-file-testing in one project. Or install the vibe-engineering plugin, which includes it: /plugin marketplace add ash1794/vibe-engineering, then /plugin install vibe-engineering@vibe-plugins.

### Does Vibe golden file testing run scripts?

No. It is instructions only, with no 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 Vibe golden file testing?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Vibe golden file testing?

The closest alternatives to Vibe golden file testing are Golden and snapshot tests, Vibe adversarial test generation, Vibe concurrent test safety, Go test quality and Vibe anti rationalization check.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Golden and snapshot tests](https://ai-powered.com/skills/golden-and-snapshot-tests): Golden and snapshot tests is an open-source agent skill for developer tools.
- [Vibe adversarial test generation](https://ai-powered.com/skills/vibe-adversarial-test-generation): Vibe adversarial test generation is an open-source agent skill for developer tools.
- [Vibe concurrent test safety](https://ai-powered.com/skills/vibe-concurrent-test-safety): Vibe concurrent test safety is an open-source agent skill for developer tools.
- [Go test quality](https://ai-powered.com/skills/go-test-quality): Go test quality is an open-source agent skill for developer tools.
- [Vibe anti rationalization check](https://ai-powered.com/skills/vibe-anti-rationalization-check): Vibe anti rationalization check is an open-source agent skill for developer tools.
- [Flutter testing skill](https://ai-powered.com/skills/flutter-testing-skill): Flutter testing skill is an open-source agent skill for developer tools.
- [Vitest skill](https://ai-powered.com/skills/vitest-skill): Vitest skill is an open-source agent skill for developer tools.
- [Vibe production mindset](https://ai-powered.com/skills/vibe-production-mindset): Vibe production mindset is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/vibe-golden-file-testing
