Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Set up snapshot testing for CLI output with update workflows and diff reporting.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 6% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -21% | 0% |
| case-04 | ✓→✓ | = Same ✓ | -46% | 0% |
Set up snapshot testing for CLI output.
typescriptimport { execSync } from 'child_process'; import fs from 'fs'; import path from 'path'; export function runCliSnapshot(cmd: string, name: string): void { const output = execSync(cmd, { encoding: 'utf-8' }); const snapshotPath = path.join('__snapshots__', `${name}.txt`); if (process.env.UPDATE_SNAPSHOTS) { fs.mkdirSync(path.dirname(snapshotPath), { recursive: true }); fs.writeFileSync(snapshotPath, output); return; } const expected = fs.readFileSync(snapshotPath, 'utf-8'); expect(output).toBe(expected); }
Other measured skills in the registry, with their headline benchmark lift.