跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

tdd

Use red-green-refactor when the user explicitly asks for test-driven development or the project specifies it for the current change.

chipfighter · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add chipfighter/coding-discipline --skill tdd

技能说明


name: tdd description: Use red-green-refactor when the user explicitly asks for test-driven development or the project specifies it for the current change. disable-model-invocation: true license: MIT

  1. Add or adapt the smallest test that expresses the expected behavior. Run it against the baseline and establish that it fails for the intended reason. For a regression, use the actual failing scenario when practical.
  2. Make the smallest implementation change that satisfies the behavior. Rerun the test and the relevant existing checks.
  3. Refactor if it improves the result, then rerun the relevant checks on the final change.

If implementation already exists, preserve it and use a safe baseline or an isolated comparison to check that the test distinguishes the behavior. When the baseline cannot be run, report what was verified.