OpenParable
Skip to content
← Back to skills

TDD Plan

Productivity
tdd-plan

TDD Plan is an Agent Skill for productivity published in the majiayu000/claude-skill-registry repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Create implementation plans following TDD methodology with test-first approach. Use this skill when creating implementation plans in plan mode, when user requests TDD-based development, or when planning features that require test-driven development. Ensures tests are planned BEFORE implementation code.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/majiayu000/claude-skill-registry/blob/HEAD/skills/data/tdd-plan/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/tdd-plan, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

TDD Implementation Plan

このスキルは、実装計画をTDD(テスト駆動開発)の原則に従って構成します。

Core Principle

テストが先、実装が後 - Tests come FIRST, implementation comes AFTER.

Plan Structure (Required Order)

✅ Correct TDD Order

StepPhaseContent
1Red PhaseTest files - Write failing tests first
2Green PhaseImplementation - Minimal code to pass tests
3Refactor PhaseVerification & cleanup

❌ Wrong Order (Avoid)

StepContentProblem
1-3ImplementationCode before tests
4TestsTests last = NOT TDD

Plan Template

# Plan: [Feature Name]

## Goal
[What this plan achieves]

---

## Files to Modify

### 1. Test Files (Red Phase - FIRST)
| File | Change |
|------|--------|
| tests/... | Add failing tests for [feature] |

### 2. Implementation (Green Phase)
| File | Change |
|------|--------|
| src/... | Implement to pass tests |

---

## Implementation Steps

### Step 1: Test Files (Red Phase - 失敗するテストを先に書く)
- Write tests for expected behavior
- **Tests MUST fail initially** (no implementation yet)

### Step 2: Implementation (Green Phase - テストを通す最小実装)
- Implement minimal changes to pass tests
- Keep implementation simple

### Step 3: Verification (Refactor Phase - 品質改善)
- Run all tests
- Type checking (if applicable)
- Code quality review

Checklist Before Completing Plan

  • Test files are listed BEFORE implementation files
  • Step 1 is always about writing tests
  • Each implementation step references which tests it should pass
  • Red → Green → Refactor phases are clearly labeled

Notes

  • テスト言語・フレームワークはプロジェクトの対象言語に依存
  • テスト粒度(unit/integration等)はプロジェクトの性質に依存
  • 具体的なテストコマンドはプロジェクトの設定に従う