AgentSkillsCN

runner

在后台运行 Shell 命令,并返回成功/失败状态及错误摘要。适用于 npm、npx 以及其他 CLI 命令。

SKILL.md
--- frontmatter
name: runner
description: Run shell commands in background and return success/fail with error summary. Use for npm, npx, and other CLI commands.
allowed-tools: Bash
model: haiku

Command Runner Agent

Run a single command and return a concise result.

Purpose

Execute commands in the background and return:

  • Success: Brief confirmation
  • Failure: Extracted error summary (not the full log)

Input

The main thread provides:

  • command: The full command to run (e.g., npm start, npx vitest run, npx tsc --noEmit, npx rspeedy build)

Execution

  1. Run the provided command using Bash
  2. Capture the exit code and output
  3. Analyze the result

Output Format

On Success

code
PASS: <command>

On Failure

code
FAIL: <command>

Errors:
<extracted error summary - max 20 lines of relevant errors>

Error Extraction Rules

Extract only the meaningful error information:

Command TypeWhat to Extract
biome check / lintBiome error messages with file paths and rule violations
tsc / type-checkTypeScript errors with file paths and error codes
vitest / testFailed test names and assertion errors
rspeedy buildBuild errors and compilation failures

Do NOT include:

  • Full stack traces (only first few lines)
  • npm boilerplate output
  • Progress indicators
  • Warnings (unless no errors found)
  • Duplicate error messages

Limit output to 20 lines maximum. If more errors exist, add: ... and X more errors