vibe-golden-file-testing

vibe-golden-file-testing is a skill for Claude Code from ash1794/vibe-engineering. It costs 34 tokens per session (765 once invoked), scanned A, original, MIT.

A testing helper for golden-file tests, which compare a program's output with a saved expected-output file. It adds normalization so changing values such as dates, IDs, paths, hostnames, ports, and durations do not cause false failures.

In plain words
What is it for?
Use it for API responses, command-line output, or other saved snapshots containing changing values. It is not for tests where the exact byte-for-byte output is the requirement.
Why use it?
It keeps output-comparison tests stable when parts of the result change between runs, machines, or environments.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the vibe-engineering plugin — 38 skills shipped together

Good fit Use it for API responses, command-line output, or other saved snapshots containing changing values. It is not for tests where the exact byte-for-byte output is the requirement.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ash1794/vibe-engineering/golden-file-testing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ash1794/vibe-engineering --skill golden-file-testing
Clone the repo
git clone --depth 1 https://github.com/ash1794/vibe-engineering

Made for: Claude Code.

Or install vibe-engineering, the plugin that ships this one along with the rest of its 38 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vibe-golden-file-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/ash1794/vibe-engineering/golden-file-testing/github.svg)](https://agentmods.dev/skills/ash1794/vibe-engineering/golden-file-testing)
Your own site
<a href="https://agentmods.dev/skills/ash1794/vibe-engineering/golden-file-testing"><img src="https://agentmods.dev/badge/skills/ash1794/vibe-engineering/golden-file-testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vibe-golden-file-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/ash1794/vibe-engineering/golden-file-testing"><img src="https://agentmods.dev/badge/skills/ash1794/vibe-engineering/golden-file-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 765 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00765
Opus 5 $0.00017 $0.00382
Sonnet 5 $0.00007 $0.00153
Haiku 4.5 $0.00003 $0.00076

Measured 8d ago against content hash b21e0bd54c4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

vibe-golden-file-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/vibe-engineering/skills/golden-file-testing/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

vibe-golden-file-testing

Golden file tests are powerful but brittle. This skill makes them robust.

When to Use This Skill

  • Implementing tests that compare output against saved expected output
  • Tests that currently break because dates, timestamps, or IDs change
  • API response testing with dynamic fields
  • CLI output testing

When NOT to Use This Skill

  • Simple unit tests with static assertions
  • Tests where the exact output IS the requirement (byte-for-byte)
  • Performance benchmarks

The Problem

Golden tests break when they contain:

  • Dates/timestamps (2026-02-28 → different tomorrow)
  • UUIDs/IDs (random each run)
  • Hostnames/ports (different per environment)
  • File paths (absolute paths differ per machine)
  • Durations (took 1.23s → varies by machine)

Steps

  1. Identify dynamic fields in the output being tested

  2. Create normalizer function:

    func normalizeOutput(s string) string {
        // Dates: 2026-02-28 → REDACTED_DATE
        s = dateRegex.ReplaceAll(s, "REDACTED_DATE")
        // UUIDs: 550e8400-... → REDACTED_UUID
        s = uuidRegex.ReplaceAll(s, "REDACTED_UUID")
        // Timestamps: 1709136000 → REDACTED_TS
        s = tsRegex.ReplaceAll(s, "REDACTED_TS")
        // Durations: 1.23s → REDACTED_DURATION
        s = durationRegex.ReplaceAll(s, "REDACTED_DURATION")
        return s
    }
    
  3. Apply normalization to BOTH:

    • The actual output (at test time)
    • The golden file (at generation time)
  4. Generate golden file with update flag:

    if os.Getenv("UPDATE_GOLDEN") == "1" {
        os.WriteFile(goldenPath, normalized, 0644)
    }
    
  5. Document update command:

    # To update golden files:
    UPDATE_GOLDEN=1 go test ./...
    

Common Normalizations

Pattern Regex Replacement
ISO Date \d{4}-\d{2}-\d{2} REDACTED_DATE
ISO DateTime \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2} REDACTED_DATETIME
UUID [0-9a-f]{8}-[0-9a-f]{4}-... REDACTED_UUID
Unix timestamp \b1[6-9]\d{8}\b REDACTED_TS
Duration \d+\.?\d*[µnm]?s REDACTED_DURATION
Absolute path /home/\w+/ or C:\\Users\\ REDACTED_PATH
Port :\d{4,5}\b :REDACTED_PORT

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 89 lines · 34 tokens per session scan A b21e0bd54c4a

Subscribe to this mod's changes

vibe-golden-file-testing is a skill published in the GitHub repository ash1794/vibe-engineering (10 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 765 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

verify

Runs this project's check chain through scripts/verify.py and reads the receipt it writes. Fires when tracked changes are finished, when the user asks whether work passes, before a commit, and before reporting a task done. Stays dormant in repositories with no detectable check chain, during read-only audits, and for…

cwinvestments/memstack · 71 tokens

create-test-plan

Analyze what changed and generate a structured test plan at .turbo/test-plans/ .md covering four escalating levels: basic functionality, complex operations, adversarial testing, and cross-cutting scenarios. Use when the user asks to "create a test plan", "plan tests", "what should I test", "generate test scenarios"…

tobihagemann/turbo · 87 tokens

memstack-development-webapp-testing

Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.

cwinvestments/memstack · 75 tokens

feature-verify

Feature verification (READ-ONLY, P0-P5). Use when: verifying feature behavior after deployment, validating API responses, diagnosing production issues, post-deploy smoke test. Not for: modifying data (use feature-dev), code review (use codex-review-fast), writing tests (use codex-test-gen), security audit (use…

sd0xdev/sd0x-harness · 75 tokens

test-review

Test coverage review via Codex exec. Use when: reviewing test sufficiency, identifying coverage gaps, test quality audit. Not for: generating tests (use codex-test-gen), code review (use codex-code-review). Output: coverage analysis + gap report.

sd0xdev/sd0x-harness · 56 tokens

pre-pr-audit

Pre-PR confidence audit with 5-dimension scoring. Use when: final check before commit/push/PR, evaluating PR readiness, assessing test quality + risk + coverage holistically. Triggers: pre-pr, readiness check, confidence audit, final verification, ready to PR, how confident. Not for: code review (use…

sd0xdev/sd0x-harness · 95 tokens