Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create mock stdin utilities for interactive CLI testing.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -73% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -35% | 0% |
| case-24 | ✗→✓ | ▲ Improved | -37% | 0% |
Create mock stdin utilities for testing.
typescriptimport { Readable } from 'stream'; export function mockStdin(inputs: string[]): Readable { let index = 0; return new Readable({ read() { if (index < inputs.length) { setTimeout(() => { this.push(inputs[index++] + '\n'); }, 10); } else { this.push(null); } }, }); } export async function runWithStdin( cmd: () => Promise<void>, inputs: string[] ): Promise<void> { const originalStdin = process.stdin; Object.defineProperty(process, 'stdin', { value: mockStdin(inputs) }); try { await cmd(); } finally { Object.defineProperty(process, 'stdin', { value: originalStdin }); } }
Other measured skills in the registry, with their headline benchmark lift.