원클릭으로
vs-tdd
Use when the user says tdd, test first, red green refactor, or wants a bug fix proven by a failing test first.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when the user says tdd, test first, red green refactor, or wants a bug fix proven by a failing test first.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyze Codex, Claude Code, or Cursor threads, transcripts, and transcriptions. Use for thread analysis, transcript review, conversation audits, agent-performance diagnosis, comparing sessions, finding loops or corrections, and extracting decisions, outcomes, evidence, and actionable improvements.
Internal reference for vs shared conventions: artifact paths, project ID resolution, storage preference, and skill taxonomy.
Use when asked to scan a named external repo for ideas worth porting. Produces a cited, ranked steals report.
Use when asked to QA, test this site or app, find bugs, or test and fix a user-facing interface. Runs harness-aware browser or computer-use QA, fixes issues, and re-verifies.
Use when the user wants to create/open a pull request, submit changes for review, send changes to dev, or otherwise ship local Git changes. Also use for explicit commit and push or push to main/master or the current branch requests. Requires affirmative publish intent; do not use for review/readiness-only requests. Creates and verifies a GitHub PR by default; honors explicit direct pushes and babysits only when requested.
Use when asked to watch a PR, fix CI, address review comments, or keep a branch merge-ready in a loop.
| name | vs-tdd |
| description | Use when the user says tdd, test first, red green refactor, or wants a bug fix proven by a failing test first. |
| disable-model-invocation | true |
Red → Green → Refactor. No exceptions.
Read the code that needs to change. Before writing anything:
Find existing test files for the module. Match the project's test patterns:
# Find test files near the target
find . -path '*/node_modules' -prune -o -name '*.test.*' -print -o -name '*.spec.*' -print | head -20
Read 1-2 existing test files to learn:
__tests__/ vs test/)Identify the test command from CLAUDE.md, package.json, or Makefile.
Do not invent a new test style. Match what exists.
Write the test FIRST. The test describes the expected behavior — it is the spec.
The test must reproduce the bug:
Test: "should return user score as number, not NaN"
Expected: fail (because the bug produces NaN)
Actual: FAIL ✓ — test correctly catches the bug
The test describes the desired behavior:
Do not write all tests first and then all implementation. That is specification-by-test, not TDD. TDD alternates red → green for each behavior slice.
"returns empty array when no matches found" not "test filterResults method"Write the minimum code to make the test pass. Nothing more.
Test: "should return user score as number, not NaN"
Expected: pass (bug is fixed)
Actual: PASS ✓
Full suite: 142 passed, 0 failed ✓
Distinguish between:
Tests are green. Now clean up — but only if needed:
After every refactor step, re-run tests. If anything breaks, revert that refactor.
Do NOT refactor:
Two commits (or one if the change is small):
test: add failing test for [description] — the test alone, before the fix
(optional, skip if the test and fix are trivially small)fix: [description] or feat: [description] — the implementation that makes it passStage specific files. Never git add ..
When build-it invokes TDD for an execution step:
Autopilot passes: the step description, affected files, and test command. TDD returns: test file path, implementation file paths, guardrail results.
Direct: emit Next only. Composed: return to caller.
Prev: /vs-debug-mode | /vs-build-it
Next: /vs-roast-review
Relevant: /vs-verify