スキル 開発

先にテストを書く

先に失敗、次に成功、それから整理

Test-Driven Development

赤、緑、リファクタの順で、先に失敗するテストを書き、次にちょうど通る最小のコードを書きます。

ClaudeCursorCodexGrok TDDtestsred-green-refactor

これは何か

Test-Driven Development from Superpowers makes the agent write the test before the implementation. It keeps scope small, prefers one failing assertion at a time, and refuses large untested dumps of code.

例のプロンプト

先にテストを書く

TDD でレート制限を追加してください。先に失敗するテストを示し、その後に実装を書いてください。

出典: Superpowers

インストール手順を読む

近いスキル