Set up E2E test harness for CLI applications with process spawning and assertions.
Creates CLI E2E test harnesses with process spawning and assertions.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdSet up E2E test harness for CLI applications.
import { spawn, SpawnOptions } from 'child_process';
interface CLIResult {
stdout: string;
stderr: string;
exitCode: number | null;
}
export async function runCLI(args: string[], options?: SpawnOptions): Promise<CLIResult> {
return new Promise((resolve) => {
const proc = spawn('node', ['./dist/index.js', ...args], {
env: { ...process.env, NO_COLOR: '1' },
...options,
});
let stdout = '';
let stderr = '';
proc.stdout?.on('data', (data) => { stdout += data; });
proc.stderr?.on('data', (data) => { stderr += data; });
proc.on('close', (exitCode) => {
resolve({ stdout, stderr, exitCode });
});
});
}
export function expectOutput(result: CLIResult) {
return {
toContain: (text: string) => expect(result.stdout).toContain(text),
toMatchSnapshot: () => expect(result.stdout).toMatchSnapshot(),
toExitWith: (code: number) => expect(result.exitCode).toBe(code),
};
}
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 asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.