tdd

Execute a Swift TDD workflow from feature description to committed implementation.

Updated May 6, 2026
One-click install
npx skills add https://github.com/Roy-wonji/claude-config --skill tdd-roy-wonji
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Roy-wonji/claude-config/tree/main/skills/tdd
Command: npx skills add https://github.com/Roy-wonji/claude-config --skill tdd-roy-wonji

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents fragile Swift changes by enforcing a repeatable TDD workflow that starts with failing tests and ends with reviewed, refactored, and committed code.

Core Features & Use Cases

  • Plan → Red → Green → Review → Refactor → Commit pipeline to ensure changes are test-driven and deliberate.
  • Swift Testing-first test generation by delegating test writing to the existing test-engineer agent.
  • Verification-focused execution with explicit “Red/Green check” cycles to ensure tests fail first and pass after minimal implementation.
  • Use case: You want to add a new TCA feature that requires mocks and careful Effect/MainActor/Sendable handling, while guaranteeing tests remain green through refactors.

Quick Start

Run the tdd skill for your feature description in your Swift/iOS project and let it iterate through the full Plan → Red → Green → Review → Refactor → Commit flow using your project’s CLAUDE.md/AGENTS.md.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to run a TDD workflow in a Swift iOS project using Swift Testing?

The best way to run a TDD workflow in Swift is to enforce a sequential pipeline: Plan, Red, Green, Review, Refactor, and Commit. This ensures changes are test-driven, starting with failing tests and ending with reviewed, committed code.

How do I add a new TCA feature with mocks while keeping tests green during refactoring?

To add a TCA feature with mocks, use a TDD pipeline that handles Effect, MainActor, and Sendable constraints. It generates Swift Testing-first tests, verifies they fail, writes minimal code to pass, and keeps tests green through refactoring.

Can I use Swift Testing with TCA for test-driven development?

Yes, Swift Testing works with TCA for test-driven development. The workflow delegates test writing to generate tests first, verifies the Red state where tests fail, then implements minimal code to achieve the Green state where tests pass.

Does a strict TDD loop include code review and refactoring before committing Swift changes?

A strict TDD loop includes agent-based code review and simplification before committing Swift changes. After the Green state verifies tests pass, the workflow enforces a refactor phase and a final commit to ensure deliberate, reviewed code.

How do I verify tests fail first before writing implementation code in Swift?

To verify tests fail first in Swift, execute a Red check cycle after writing tests. This verification-focused step ensures tests explicitly fail before proceeding to the Green phase, where minimal implementation code is written to make them pass.