SKILL

red-green-proof

将疑似缺陷转化为已证实的缺陷。在声称原因之前对照现实验证原因,编写一个在当前代码上 FAILS 的测试,应用修复,观察其通过——然后回退修复并确认测试再次变红,因为双向都通过的测试证明不了任何东西。在调试对话后单独调用时,它从上下文获取目标而非询问。在修复缺陷、调查事件、加固不稳定区域,或被要求“添加能揭示缺陷的测试”时使用。触发词为“/red-green-proof”“证明缺陷”“红绿”“先让测试失败”“那个测试是否承重”“用测试揭示缺陷”。

机器翻译
查看英文原文

Turns a suspected bug into a proven one. Verify the cause against reality before claiming it, write a test that FAILS on the current code, apply the fix, watch it pass — then revert the fix and confirm the test goes red again, because a test that passes both ways proves nothing. Invoked bare after a debugging conversation, it takes the target from context rather than asking. Use when fixing a bug, investigating an incident, hardening a flaky area, or when asked to "add tests that reveal the bug". Triggers on "/red-green-proof", "prove the bug", "red-green", "make the test fail first", "is that test load-bearing", "reveal the bug with a test".

适用对象:软件开发与测试。自动收录 · 待核查。

原作者说明节选

从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。

查看英文原文

原文涵盖的主题

  • Red-Green-Proof
  • Overview
  • Workflow
  • Proactive Triggers
  • Output Format
  • Picking the target
  • The loop
  • 1. Verify the cause. Do not infer it.

A bug is not fixed because the tests pass. A bug is fixed when a test fails without your fix and passes with it, and you have watched it do both. Use this skill when a bug, incident, flaky test, or unproven regression test is under investigation. It applies a strict red-green-red loop: establish the cause, observe a focused test fail, make the smallest fix, then remove the fix and observe the test fail again. The final revert is the proof that the test is actually coupled to the defect. Keep evidence for each phase separate. A test command that exits zero is not evidence that it exercised the defect; record the assertion and the observed failure or success. Do not proceed when the current phase is unobserved. Before changing code, identify the exact test command and expected red signal. After the fix, run that same command without changing its assertions. During the revert, use the same command again and preserve the failure output. Restore the fix before running the broader suite. A pull request adds a regression test but no pre-fix failure is recorded → ask for the red run before calling it coverage. A bug fix changes production code and tests in one step → verify the test fails

这里只展示节选,请以完整原文和当前要求为准。

来源仓库
alirezarezvani/claude-skills
源文件
engineering-team/skills/red-green-proof/SKILL.md
固定版本
8f082544116fc0d014188e521ca40304cdfc86b0
阅读完整原作者说明 ↗

准备条件

  • 本条仅收录原作者的技能元数据;请阅读完整说明,确认依赖、许可与使用条件。

第一件可以尝试的小事

先阅读原作者说明,再决定是否在自己的 AI 工具中使用。

对应 AI 工具说明

作者有说明不等于本站实机验证。没有证据时,不自动标为兼容、安全或免费。

来源与内容状态

本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。

原作者:alirezarezvani/claude-skills · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:46.452Z。

分类由名称、说明与路径规则生成,分类不代表已核实适配。

许可与权利归属

MIT。第三方内容及版权归原作者,使用条件以原文为准。

许可原文 ↗

本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。

限制与注意事项

  • 元数据收录不代表本站已经安装、适配、实测或进行安全审查。