测试驱动开发

原名:test-driven-development

以测试驱动开发。实现逻辑、修复bug或修改行为时使用,用于验证代码正确性或应对现有功能变更。

分类
开发提效
版本
v1.0.0
作者
王涵(@usernl6ubq)
下载
3
收藏
0
发布
2026-08-08
更新
2026-08-14
TRACE 评分
4 / 5

内容概览

Write a failing test before writing the code that makes it pass. For bug fixes, reproduce the bug with a test before attempting a fix. Tests are proof — "seems right" is not done. A codebase with good tests is an AI agent's superpower; a codebase without tests is a liability. - Implementing any new logic or behavior - Fixing any bug (the Prove-It Pattern) - Modifying existing functionality - Adding edge case handling - Any change that could break existing behavior When NOT to use: Pure configuration changes, documentation updates, or static content changes that have no behavioral impact. Related: For browser-based changes, combine TDD with runtime verification using Chrome DevTools MCP — see the Browser Testing section below. The TDD cycle is universal; the commands are not. Before writing the first test, discover how this repository tests, and use its commands for every RED, GREEN, and …

查看 SKILL 详情