ac-tdd-runner
RED-GREEN-REFACTORのサイクルで機能実装を支援し、テスト駆動開発(TDD)の自動化やテストファースト開発を確実にするための、TDDワークフローを効率的に実行するSkill。
📜 元の英語説明(参考)
Run TDD cycle for feature implementation. Use when implementing features with RED-GREEN-REFACTOR, running test-driven development, automating TDD workflow, or ensuring test-first development.
🇯🇵 日本人クリエイター向け解説
RED-GREEN-REFACTORのサイクルで機能実装を支援し、テスト駆動開発(TDD)の自動化やテストファースト開発を確実にするための、TDDワークフローを効率的に実行するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o ac-tdd-runner.zip https://jpskill.com/download/9344.zip && unzip -o ac-tdd-runner.zip && rm ac-tdd-runner.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/9344.zip -OutFile "$d\ac-tdd-runner.zip"; Expand-Archive "$d\ac-tdd-runner.zip" -DestinationPath $d -Force; ri "$d\ac-tdd-runner.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
ac-tdd-runner.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
ac-tdd-runnerフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
AC TDD Runner
機能実装のためのテスト駆動開発サイクルを自動化します。
目的
RED-GREEN-REFACTOR サイクルを強制し、すべての機能が品質と保守性のためにテストファーストの手法で実装されるようにします。
クイックスタート
from scripts.tdd_runner import TDDRunner
runner = TDDRunner(project_dir)
result = await runner.run_cycle(feature)
TDDサイクル
REDフェーズ
最初に失敗するテストを記述します。
red_result = await runner.red_phase(feature)
# 失敗するテストを含むテストファイルを作成します
# テストが実際に失敗することを確認します
GREENフェーズ
合格するために最小限のコードを実装します。
green_result = await runner.green_phase(feature)
# コードを実装します
# すべてのテストが合格するまでテストを実行します
# 最小限必要な実装
REFACTORフェーズ
テストが合格する間にクリーンアップします。
refactor_result = await runner.refactor_phase(feature)
# コード構造を改善します
# テストがまだ合格することを確認します
# コーディング標準を適用します
サイクル結果
{
"feature_id": "auth-001",
"cycle_complete": true,
"phases": {
"red": {
"success": true,
"tests_created": 5,
"all_tests_fail": true
},
"green": {
"success": true,
"iterations": 3,
"all_tests_pass": true
},
"refactor": {
"success": true,
"changes_made": ["extracted_helper", "renamed_variable"],
"tests_still_pass": true
}
},
"coverage": 92.5,
"duration_ms": 120000
}
REDフェーズの詳細
- 機能の
test_casesからテストファイルを生成します - 適切な構造でテスト関数を記述します
- テストを実行して、テストが失敗することを確認します
- テストが予期せず合格する場合は、より具体的なアサーションを追加します
GREENフェーズの詳細
- 失敗するテストを分析します
- 最小限の実装を記述します
- テストを実行します
- テストが失敗する場合は、実装を繰り返します
- すべてのテストが合格したら停止します
REFACTORフェーズの詳細
- コードの臭いを特定します
- リファクタリングパターンを適用します
- 各変更後にテストを実行します
- テストが失敗した場合は元に戻します
- コードがきれいになるまで続行します
設定
{
"max_green_iterations": 10,
"coverage_threshold": 80,
"refactoring_patterns": [
"extract_method",
"rename_for_clarity",
"remove_duplication"
],
"test_framework": "pytest"
}
統合
- 使用: REDフェーズに
ac-test-generatorを使用 - 使用: GREEN検証に
ac-criteria-validatorを使用 - レポート先:
ac-task-executor
APIリファレンス
完全な実装については、scripts/tdd_runner.py を参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
AC TDD Runner
Automate the Test-Driven Development cycle for feature implementation.
Purpose
Enforces the RED-GREEN-REFACTOR cycle, ensuring all features are implemented with test-first methodology for quality and maintainability.
Quick Start
from scripts.tdd_runner import TDDRunner
runner = TDDRunner(project_dir)
result = await runner.run_cycle(feature)
TDD Cycle
RED Phase
Write failing tests first:
red_result = await runner.red_phase(feature)
# Creates test file with failing tests
# Verifies tests actually fail
GREEN Phase
Implement minimum code to pass:
green_result = await runner.green_phase(feature)
# Implements code
# Runs tests until all pass
# Minimum necessary implementation
REFACTOR Phase
Clean up while tests pass:
refactor_result = await runner.refactor_phase(feature)
# Improve code structure
# Ensure tests still pass
# Apply coding standards
Cycle Result
{
"feature_id": "auth-001",
"cycle_complete": true,
"phases": {
"red": {
"success": true,
"tests_created": 5,
"all_tests_fail": true
},
"green": {
"success": true,
"iterations": 3,
"all_tests_pass": true
},
"refactor": {
"success": true,
"changes_made": ["extracted_helper", "renamed_variable"],
"tests_still_pass": true
}
},
"coverage": 92.5,
"duration_ms": 120000
}
RED Phase Details
- Generate test file from feature test_cases
- Write test functions with proper structure
- Run tests to verify they fail
- If tests pass unexpectedly, add more specific assertions
GREEN Phase Details
- Analyze failing tests
- Write minimum implementation
- Run tests
- If tests fail, iterate on implementation
- Stop when all tests pass
REFACTOR Phase Details
- Identify code smells
- Apply refactoring patterns
- Run tests after each change
- Revert if tests fail
- Continue until code is clean
Configuration
{
"max_green_iterations": 10,
"coverage_threshold": 80,
"refactoring_patterns": [
"extract_method",
"rename_for_clarity",
"remove_duplication"
],
"test_framework": "pytest"
}
Integration
- Uses:
ac-test-generatorfor RED phase - Uses:
ac-criteria-validatorfor GREEN verification - Reports to:
ac-task-executor
API Reference
See scripts/tdd_runner.py for full implementation.