跳到正文
cccskills
免费在 GitHub 公开

cli-mock-stdin

Create mock standard input streams for testing interactive command line tools. The skill provides patterns for supplying scripted answers to a command, running it with temporary mocked input, and restoring the original input afterward.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Create mock stdin utilities for interactive CLI testing.

实测评分 未实测

查看安装方法

适用场景

  • Test a CLI command that asks interactive questions
  • Provide scripted answers through mocked standard input
  • Build unit or integration tests for prompt flows

包含的文件(2)

  • SKILL.md1.3 KB
  • README.md155 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

CLI Mock Stdin

Create mock stdin utilities for testing.

Generated Patterns

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

Target Processes

  • cli-unit-integration-testing
  • interactive-prompt-system

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Get implementations and guidance for advanced data structures used in competitive programming and complex algorithm problems. The skill covers balanced trees, persistent structures, tree decompositions, and range-query tools, with usage notes and complexity information.

中文简介正在准备中。当前显示英语简介。

  • Implementing a treap or splay tree
  • Answering range queries with a wavelet tree
  • Handling dynamic tree operations
a5c-ai/babysitter18712026年9月17日 更新

Use this skill for an independent, evidence-based code review focused on whether an implementation meets its specification. It returns a clear PASS or FAIL verdict with file and line references, using a fresh reviewer for each re-review.

中文简介正在准备中。当前显示英语简介。

  • Checking whether code meets a specification
  • Running a final cross-unit code review
  • Re-reviewing a change after it failed
a5c-ai/babysitter18712026年9月17日 更新

Apply supported repetitive code edits with WebAssembly (WASM), a portable runtime, when a code pattern matches. Transforms include modernizing variable declarations, adding types or error handling, and converting Promise chains; unmatched patterns go to a coder fallback.

中文简介正在准备中。当前显示英语简介。

  • Modernizing repeated variable declarations
  • Adding TypeScript annotations to matching functions
  • Wrapping simple calls in error handling
a5c-ai/babysitter18712026年9月17日 更新

Coordinates long-lived Crew agents and transient Polecat workers by assigning work through hooks, handing tasks between agents, and nudging stalled sessions. It also explains a three-level hook hierarchy and provides commands for listing, feeding, and reviving agents.

中文简介正在准备中。当前显示英语简介。

  • Assign work to persistent and short-lived agents
  • Hand off tasks between agents and prompt stalled workers
  • Set up shared, role-specific, and rig-specific hooks
a5c-ai/babysitter18712026年9月17日 更新

Turn algorithm execution into visual steps, showing how arrays, trees, graphs, and dynamic programming tables change. Generate formats such as ASCII, SVG, GIF, or HTML to explain concepts, inspect behavior, or support debugging.

中文简介正在准备中。当前显示英语简介。

  • Explaining sorting or search step by step
  • Showing graph traversal or shortest-path execution
  • Visualizing dynamic programming table changes
a5c-ai/babysitter18712026年9月17日 更新

Coordinate multi-agent work with short task cycles and regular checkpoints. The skill checks whether agents share consistent state and stay within assigned roles, then scores drift and guides corrections or human escalation when needed.

中文简介正在准备中。当前显示英语简介。

  • Coordinating agents on related subtasks
  • Keeping high-risk work aligned with its scope
  • Checking shared memory consistency
a5c-ai/babysitter18712026年9月17日 更新

查看 a5c-ai 的全部技能

报告此技能的问题