ワンクリックで
tdd
Red→green→refactor discipline for new behavior — forces a failing test before implementation and a passing test before any claim of done.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Red→green→refactor discipline for new behavior — forces a failing test before implementation and a passing test before any claim of done.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Write a structured handoff at session end. Preserves context so the next agent can resume without human briefing. Invoke before ending any feature session longer than 30 minutes.
Multi-perspective code review against project standards with P1/P2/P3 severity classification. Works in Claude Code (Agent + optional GitHub MCP) and Cursor (Task subagents + gh/git). Use when the user invokes /review, asks for a PR or diff review, or wants a standards-aligned review with severity tags.
Multi-perspective code review (P1/P2/P3) for Cursor: inline checklists plus three parallel Task subagents (perf-auditor, security-reviewer, simplicity-reviewer with combined data-integrity prompt). Use when the user invokes /review, asks for a PR review, or wants repo-standard findings with severity.
Create well-formatted git commits following conventional commit standards.
Create or manage a git worktree for isolated parallel development — lets multiple agents work in the repo simultaneously without branch collisions.
Create a token-efficient state snapshot for context preservation during long sessions.
| name | tdd |
| description | Red→green→refactor discipline for new behavior — forces a failing test before implementation and a passing test before any claim of done. |
Red→green→refactor for new behavior. This skill exists to fix one specific, observable agent failure mode: writing a lot of code, visually checking it, and claiming success without running the tests. Capturing a failing test before the implementation, then the same test passing after, makes that failure mode impossible to sustain.
/tdd <description of the new behavior>
Invoke when the work adds new observable behavior with a testable contract:
TDD hurts when no meaningful test can be written first. Skip it — with a documented reason — for:
/refactor — it writes characterization tests first, then refactors.For any of these, state explicitly: "Deferring TDD because <reason>. Will verify by <what you'll do instead>." Do not silently skip.
Agents consistently exhibit this pattern:
Visual inspection is not proof. A test that was never observed to fail cannot prove the implementation made it pass — maybe it was always green, maybe it never actually ran against the new code. The red→green transition is the proof.
Before writing any implementation:
{test_command} tests/unit/test_<feature>::<specific_test_name>
If the test doesn't fail, the test is wrong. The behavior already exists, or the assertion is tautological, or you're asserting against a mock that isn't exercised.
Write the minimum implementation that makes the failing test pass. Not "the ideal implementation." Not "handle all the edge cases." The smallest change that turns the assertion from fail to pass.
Run the same test again. Capture the output. Confirm it passes.
If other tests break, stop. You introduced a regression. Fix or revert before continuing.
With tests passing, improve the implementation:
After each change, re-run the test suite. If green stays green, keep the refactor. If something breaks, revert the refactor — never the green test.
When you report a TDD cycle complete, you MUST include:
1 failed / N passed)N+1 passed)"I wrote the test and the implementation and it works" is not acceptable evidence. Report with actual run output.
For new behavior with multiple cases (happy path + 2 error paths + edge case), loop the cycle once per case:
Do not write all the tests first, then all the implementation. That breaks the red→green observation — you can't tell which implementation change made which test go green, and "I wrote them all, they all pass" reintroduces the exact failure mode this skill prevents.
If the work genuinely can't be TDD'd (see "When NOT to Use"), write a two-line note in the PR description or commit body:
TDD deferred. Reason: <why>
Verification plan: <what will verify the behavior instead>
Deferral without a note is the same as skipping — and skipping is exactly what this skill exists to prevent.
.claude/rules/testing.md — project-level test coverage minimums and organization/refactor — refactor with a test-first safety net when tests already exist/debug — systematic debugging when a test is already failing and you need to find out why