Skip to content
Back to skills

Flaky Test Triage

ASecurity

Flaky 测试分诊:复现、隔离、归因、修复与证据保留

  • 39 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 12, 2026
ai-agents

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add oschina/mothx --skill flaky-test-triage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flaky Test Triage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Flaky Test Triage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/oschina-flaky-test-triage/badge)](https://www.skillsdirectory.com/skills/oschina-flaky-test-triage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: flaky-test-triage
description: Flaky 测试分诊:复现、隔离、归因、修复与证据保留
---

# Flaky 测试分诊

## 何时使用

当测试间歇失败、重跑才通过,或 CI 与本地结果不一致时使用。

## 检查清单

### 复现

- 记录失败命令、环境、提交与失败频率;
- 用固定种子、单线程/重复运行尝试稳定复现;
- 不用“重跑通过”作为修复。

### 隔离

- 检查共享可变数据、执行顺序、时钟、随机数、网络与文件系统;
- 检查异步等待是否使用可观察状态,而不是固定 sleep;
- 检查资源泄漏与未清理的全局状态。

### 归因

- 区分产品缺陷、测试缺陷、环境缺陷与基础设施抖动;
- 找到最小失败用例,而不是保留大范围集成测试;
- 记录修复前的失败证据与修复后的复测结果。

### 处理

- 无法立即修复时隔离并标注 owner、原因与期限;
- 不用全局重试掩盖不稳定;
- 修复后删除临时隔离标记。

## 输出格式

- 失败签名与复现命令;
- 归因分类与证据;
- 修复/隔离决定;
- 复测结果与剩余风险。

## 反模式

- 把 `sleep` 调大当作修复;
- 用重试成功证明稳定;
- 删除失败测试而不记录原因。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.