원클릭으로
tdd
Trigger: writing new production code, RED-GREEN-REFACTOR, failing test first. Enforces the Three Laws of TDD before any implementation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Trigger: writing new production code, RED-GREEN-REFACTOR, failing test first. Enforces the Three Laws of TDD before any implementation.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | tdd |
| description | Trigger: writing new production code, RED-GREEN-REFACTOR, failing test first. Enforces the Three Laws of TDD before any implementation. |
Load this skill before writing ANY production code change — new feature, bug fix, or refactor. If there is no failing test yet, write one first; do not skip straight to implementation.
Cycle: RED → GREEN → REFACTOR, always in that order, never skipped:
Sad-path scenarios (invalid input, boundary conditions, partial failures, contract violations) are first-class RED cases — not an afterthought once the happy path passes.
Adding input validation to a Withdraw(amount int) error method that must
reject a negative amount:
TestWithdraw_RejectsNegativeAmount asserting
Withdraw(-10) returns a non-nil error and the balance is unchanged.
Run it — it fails because Withdraw currently accepts any amount.if amount < 0 { return ErrNegativeAmount } — nothing else. Run the
test again — it passes.validateAmount helper if
a second validation rule is about to land, rename ErrNegativeAmount
for clarity if needed. Re-run the full test suite — still green.Only after this cycle completes does the next behavior (e.g. rejecting an amount above the available balance) get its own RED step.