approval-tests

Compare complex outputs against pre-approved golden master files across multiple languages.

3|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/scute-sh/scute --skill approval-tests-scute-sh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: approval-tests
Source: https://github.com/scute-sh/scute/tree/main/.claude/skills/approval-tests
Command: npx skills add https://github.com/scute-sh/scute --skill approval-tests-scute-sh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of verifying complex outputs in your code by comparing them against pre-approved "golden master" files, eliminating the need for tedious, brittle individual assertions.

Core Features & Use Cases

  • Snapshot Testing: Captures complex output once, approves it, and compares future runs against the approved snapshot.
  • Characterization Testing: Safely refactor legacy code by snapshotting its current behavior.
  • Supports Multiple Languages: Includes specific guides for Python, JavaScript/TypeScript, Java, and Rust.
  • Use Case: When testing an API endpoint that returns a large, complex JSON object, instead of writing dozens of assertions, use approval tests to capture the entire output in one go and verify changes visually.

Quick Start

Use the approval-tests skill to verify the output of your Python function generate_report().

Frequently Asked Questions about approval-tests

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

FAQPage Schema
How do I use snapshot testing to verify complex JSON API outputs?

Snapshot testing verifies complex JSON API outputs by capturing the entire output once into an approved golden master file, then automatically comparing future runs against this snapshot to detect regressions without writing individual assertions.

What is golden master testing and when should I use it for characterization?

Golden master testing is a characterization technique that captures the current behavior of legacy code into an approved file. You should use it to safely refactor legacy code by comparing future outputs against this pre-approved snapshot to detect unintended changes.

Can I use approval tests with JavaScript, Python, Java, and Rust?

Yes, approval tests support multiple programming languages including JavaScript, TypeScript, Python, Java, and Rust, integrating directly with their standard testing frameworks to facilitate regression detection and combination testing.

What is the best way to test legacy code without writing brittle assertions?

The best way to test legacy code without brittle assertions is using characterization testing. This approach snapshots the current behavior of your code into golden master files, allowing you to verify complex outputs visually and detect regressions during refactoring.

Does approval testing support data scrubbing for dynamic outputs?

Yes, approval testing supports data scrubbing to handle dynamic outputs. This feature allows you to normalize volatile data before comparing it against the approved snapshot, ensuring stable regression detection for complex outputs.