agentsclimarketplace

Cli snapshot tester

Skill a5c-ai/babysitter/library/specializations/cli-mcp-development/skills/cli-snapshot-tester

Set up snapshot testing for CLI output with update workflows and diff reporting.From its SKILL.md

Install
npx -y skills add a5c-ai/babysitter --skill cli-snapshot-tester

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.2 KB, 171 tokens by cl100k_base, as published. Nobody here has run it

CLI Snapshot Tester

Set up snapshot testing for CLI output.

Generated Patterns

import { 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);
}

Target Processes

  • cli-unit-integration-testing
  • cli-documentation-generation

What ships with it: 1 file

144 B alongside SKILL.md

Keep looking

Skills are one crate of 326,059. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.