Set up snapshot testing for CLI output with update workflows and diff reporting.
Creates snapshot tests for CLI output with update workflows and diff reporting.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdSet up snapshot testing for CLI output.
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);
}
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.