tdd-wada-style — tdd-wada-style for AI agents tdd-wada-style, ImageScraper, community, tdd-wada-style for AI agents, ide skills, tdd-wada-style install, tdd-wada-style example, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Code Development Agents needing structured TDD workflows based on t.wada's philosophy. tdd-wada-style is a test-driven development approach based on t.wada's philosophy, emphasizing testing as a means to detect mistakes, not just prove functionality.

Features

Implements the Red-Green-Refactor cycle for efficient testing
Applies the principle that tests are a design action, driving API design
Treats test code as the most accurate documentation, serving as a specification
Emphasizes small, rapid cycles of testing and refactoring
Breaks down requirements into behavioral components for testing

# Core Topics

YunosukeYoshino YunosukeYoshino
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The tdd-wada-style skill by YunosukeYoshino is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for tdd-wada-style for AI agents, tdd-wada-style install, tdd-wada-style example.

Ideal Agent Persona

Perfect for Code Development Agents needing structured TDD workflows based on t.wada's philosophy.

Core Value

Enables agents to implement Red-Green-Refactor cycles systematically, decomposing requirements into behavioral specifications before coding. Provides structured test-driven development with minimal implementation steps and continuous design improvement.

Capabilities Granted for tdd-wada-style

Decomposing requirements into 'when-then' behavioral specifications
Implementing failing tests first (RED phase)
Writing minimal code to pass tests (GREEN phase)
Refactoring code while maintaining test passes (REFACTOR phase)

! Prerequisites & Limits

  • Requires understanding of t.wada's specific TDD philosophy
  • Focuses on behavioral decomposition rather than implementation-first approach
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

tdd-wada-style

Install tdd-wada-style, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

t.wada流 TDD(テスト駆動開発)

和田卓人氏のTDD哲学に基づき、高品質なテスト駆動開発を実践する。

Core Philosophy(中核思想)

「テストとは、動くことを証明するものではない。間違いを見つけるためのものだ。」 — t.wada

3つの原則

  1. テストは設計行為 — テストを書くことで、使いやすいAPIを設計する
  2. テストは仕様書 — テストコードが最も正確なドキュメントである
  3. 小さく回す — Red → Green → Refactor を短いサイクルで繰り返す

TDD Cycle(Red-Green-Refactor)

🔴 RED      → 失敗するテストを先に書く
     ↓
🟢 GREEN    → 最小限のコードでテストを通す
     ↓
🔵 REFACTOR → テストが通ったまま設計を改善
     ↓
   (繰り返し)

Instructions

Step 1: 要件を振る舞いで分解

実装前に「〜したとき、〜となる」形式でテストケースをリストアップする。

markdown
1テストケースリスト: 2□ 空のリストを渡すと空のリストを返す 3□ 1要素のリストはそのまま返す 4□ 複数要素は昇順でソートされる 5□ 負の数を含んでも正しくソートされる

最も単純なケースから始める。

Step 2: テスト構造(AAA パターン)

すべてのテストは Arrange-Act-Assert の3フェーズで構成する。

python
1def test_振る舞いを日本語で記述(): 2 # Arrange(準備) 3 sut = TargetClass() 4 input_data = create_test_data() 5 6 # Act(実行) 7 result = sut.target_method(input_data) 8 9 # Assert(検証) 10 assert result == expected_value

ポイント:

  • テスト名は日本語で振る舞いを明確に記述
  • 1テスト1アサーション(原則)
  • 3つのブロックを空行で明確に分離

Step 3: 境界値と異常系

必ず以下をカバーする:

python
1# 境界値テスト 2def test_空入力(): 3 assert func([]) == [] 4 5def test_単一要素(): 6 assert func([1]) == [1] 7 8def test_最大値(): 9 assert func([MAX_VALUE]) == expected 10 11def test_最大値プラス1で例外(): 12 with pytest.raises(ValueError): 13 func([MAX_VALUE + 1]) 14 15# 異常系テスト 16def test_None入力で例外(): 17 with pytest.raises(TypeError): 18 func(None) 19 20def test_不正な型で例外(): 21 with pytest.raises(TypeError): 22 func("not a list")

Step 4: Refactor(リファクタリング)

テストがグリーンの状態を維持しながら:

  • 重複の除去
  • 命名の改善
  • 責務の分離

ルール: 振る舞いを変えずに構造を改善する

Anti-Patterns(避けるべきパターン)

❌ 実装詳細のテスト

python
1# Bad: 内部状態に依存 2assert obj._internal_cache == {...} 3assert obj._call_count == 3 4 5# Good: 振る舞いをテスト 6assert obj.get_result() == expected

❌ テスト間の依存

python
1# Bad: 前のテストの状態に依存 2class TestCounter: 3 counter = Counter() # 共有状態 4 5 def test_1(self): 6 self.counter.increment() 7 8 def test_2(self): 9 assert self.counter.value == 1 # test_1に依存 10 11# Good: 各テストが独立 12def test_increment(): 13 counter = Counter() 14 counter.increment() 15 assert counter.value == 1

❌ 過度なモック

python
1# Bad: すべてをモック化(何もテストしていない) 2@patch('module.ClassA') 3@patch('module.ClassB') 4@patch('module.ClassC') 5def test_something(mock_a, mock_b, mock_c): 6 ... 7 8# Good: 外部境界のみモック化 9@patch('module.external_api_client') 10def test_something(mock_api): 11 ...

❌ 巨大なテスト

python
1# Bad: 1テストで複数の振る舞い 2def test_user_registration(): 3 # 50行のテストコード... 4 assert user.email == ... 5 assert user.created_at == ... 6 assert email_sent == True 7 assert db.users.count() == ... 8 9# Good: 1テスト1振る舞い 10def test_ユーザー登録でメールアドレスが保存される(): 11 ... 12 13def test_ユーザー登録で確認メールが送信される(): 14 ...

Test Template

新しいテストファイルを作成する際のテンプレート:

python
1""" 2{モジュール名}のテスト 3 4テスト対象: {クラス名/関数名} 5""" 6import pytest 7from src.module import TargetClass 8 9 10class Test{TargetClass}: 11 """TargetClassの振る舞いテスト""" 12 13 # ========== 正常系 ========== 14 15 def test_基本的な使用方法(self): 16 """最も一般的なユースケース""" 17 # Arrange 18 sut = TargetClass() 19 20 # Act 21 result = sut.do_something("input") 22 23 # Assert 24 assert result == "expected" 25 26 # ========== 境界値 ========== 27 28 def test_空入力(self): 29 """空の入力を処理できる""" 30 sut = TargetClass() 31 result = sut.do_something("") 32 assert result == "" 33 34 def test_最大長入力(self): 35 """最大長の入力を処理できる""" 36 sut = TargetClass() 37 result = sut.do_something("x" * MAX_LENGTH) 38 assert len(result) <= MAX_LENGTH 39 40 # ========== 異常系 ========== 41 42 def test_None入力で例外(self): 43 """Noneを渡すとTypeErrorが発生""" 44 sut = TargetClass() 45 with pytest.raises(TypeError): 46 sut.do_something(None) 47 48 def test_不正な入力でValueError(self): 49 """不正な入力はValueErrorを発生""" 50 sut = TargetClass() 51 with pytest.raises(ValueError) as exc_info: 52 sut.do_something("invalid") 53 assert "不正な入力" in str(exc_info.value)

Checklist

実装完了時の確認項目:

  • すべてのテストがパス
  • 各テストが独立して実行可能
  • テスト名から振る舞いが理解できる
  • AAA構造が明確
  • 境界値がカバーされている
  • 異常系がカバーされている
  • 実装詳細ではなく振る舞いをテスト
  • 過度なモックを使用していない

References

追加のガイダンスは以下を参照:

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is tdd-wada-style?

Perfect for Code Development Agents needing structured TDD workflows based on t.wada's philosophy. tdd-wada-style is a test-driven development approach based on t.wada's philosophy, emphasizing testing as a means to detect mistakes, not just prove functionality.

How do I install tdd-wada-style?

Run the command: npx killer-skills add YunosukeYoshino/ImageScraper/tdd-wada-style. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for tdd-wada-style?

Key use cases include: Decomposing requirements into 'when-then' behavioral specifications, Implementing failing tests first (RED phase), Writing minimal code to pass tests (GREEN phase), Refactoring code while maintaining test passes (REFACTOR phase).

Which IDEs are compatible with tdd-wada-style?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for tdd-wada-style?

Requires understanding of t.wada's specific TDD philosophy. Focuses on behavioral decomposition rather than implementation-first approach.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add YunosukeYoshino/ImageScraper/tdd-wada-style. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use tdd-wada-style immediately in the current project.

Related Skills

Looking for an alternative to tdd-wada-style or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI