用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/noahlz/claude-plugins --skill run-tests命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | run-tests |
| description | Runs the project test suite, analyzes failures, and proposes fixes via sub-agents. |
| model | sonnet |
| allowed-tools | ["Bash(node *)","Bash(git *)","AskUserQuestion","Read","Grep","Task"] |
Activate this skill when:
IMPORTANT: Follow the workflow steps EXACTLY as written.
SKILL_BASE_DIR: ${CLAUDE_SKILL_DIR}
⛔ VERSION CHECK: If SKILL_BASE_DIR above shows literal ${CLAUDE_SKILL_DIR} instead of a real path, halt: "This skill requires Claude Code 2.1.69 or higher."
Node.js Check: !node "${CLAUDE_SKILL_DIR}/../../lib/check-node-version.js"
⛔ HALT if Node.js Check shows ERROR.
MANDATORY:
run-command.js for ALL executionCheck memory, CLAUDE.md, and project files (package.json, pom.xml, go.mod, Cargo.toml, Makefile, etc.) to determine:
Quiet/silent flags: Use --silent, --quiet, or equivalent when the build tool writes structured results to files (e.g., Maven surefire XML reports, TAP reporters, Jest JSON output). Omit quiet flags when the tool's console output is the only source of test results.
If uncertain: Use AskUserQuestion. Save the answer to memory.
Most projects don't need a separate build step. Skip this step unless you have determined one is required.
Run build command:
node "<SKILL_BASE_DIR>/scripts/run-command.js" --cmd "<build command>" --out dist/build.log
Parse the JSON output. If exitCode is non-zero:
→ DELEGATE_TO: references/extract-build-errors.md
⛔ READ FILE AND FOLLOW INSTRUCTIONS, THEN RETURN HERE
→ Show analysis, ask user: "Enter plan mode to implement fixes?"
STEP_DESCRIPTION: "Running tests"
Run the test command using run-command.js — NEVER run it directly:
node "<SKILL_BASE_DIR>/scripts/run-command.js" --cmd "<test command>" --out dist/test-results.log
Parse the JSON output. Store the outputFile path and exitCode.
If exitCode = 0: Display "All tests passed." and exit workflow.
If exitCode ≠ 0: Proceed to step 4.
STEP_DESCRIPTION: "Analyzing test failures"
Check CLAUDE.md and memory for a project-specific structured results file (e.g., dist/test-results.tap, target/surefire-reports/, test-results.json).
dist/test-results.log).Determine:
⛔ Do NOT skip this step. Do NOT re-run the test command.
If compilation/module errors or crashes (e.g., MODULE_NOT_FOUND, SyntaxError, segfault, OOM):
→ DELEGATE_TO: references/extract-build-errors.md
⛔ READ FILE AND FOLLOW INSTRUCTIONS, THEN RETURN HERE
If test failures (assertions, expected vs actual, test names visible): → Run the failure parser:
node "<SKILL_BASE_DIR>/scripts/parse-test-failures.js" --file dist/test-results.log --format <format>
(Use --pattern "<regex>" instead of --format if the built-in formats don't match.)
→ If parser returns 0 failures: Fall back to the output file read in 4a — extract failure details manually.
→ DELEGATE_TO: references/extract-test-failures.md
⛔ READ FILE AND FOLLOW INSTRUCTIONS, THEN RETURN HERE
Display the sub-agent analysis to the user.
If the analysis has a root cause and/or proposed fixes: → Ask user: "Enter plan mode to implement fixes?"
If the analysis has no proposed fixes → exit workflow.