AgentSkillsCN

test-failure-investigator

通过分类信号、实现可复现的调试过程,并逐步缩小问题根源,诊断失败或不稳定测试的原因。适用于 CI 测试报红、测试结果不稳定,或本地测试出现回归现象时使用。

SKILL.md
--- frontmatter
name: test-failure-investigator
description: Diagnose failing or flaky tests by classifying signal, reproducing deterministically, and narrowing to root cause. Use for red CI, unstable tests, or local test regressions.
metadata: {"keygate":{"requires":{"anyBins":["pnpm","npm","yarn"]}}}

Treat failing tests as evidence, not noise.

  1. Reproduce failures with minimal scope.
  2. Separate deterministic failures from flakes.
  3. Inspect fixture state, timing assumptions, and environment coupling.
  4. Identify smallest code path that explains failure.
  5. Validate fix with targeted reruns before broad suite reruns.