Tdd
This skill guides you through test-driven development using separate subagents for test writing and implementation, ensuring each phase stays focused on its role. It supports Jest, Vitest, pytest, Go test, cargo test, PHPUnit, and RSpec, with modes for interactive approval, autonomous execution, and dry-run validation. Vertical slicing and context isolation keep your TDD workflow disciplined and your tests honest.
Tdd enforces disciplined test-driven development by orchestrating separate agents for test writing and implementation to prevent specification leakage.
AI-generated summary based on this skill's SKILL.md
Install
glebis/claude-skills/tdd · repository language: JavaScript
git clone https://github.com/glebis/claude-skills
cp -r claude-skills ~/.claude/skills/tddgenerated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is test-driven development and how does TDD work?
TDD is a methodology where you write tests before implementing code. TDD guides you through this process using separate subagents for test writing and implementation, ensuring each phase stays focused on its role. The workflow follows the red-green-refactor cycle: write a failing test (red), implement code to pass it (green), then refactor for quality. This test-first approach improves code reliability by catching issues early.
How do I write tests first in TDD?
TDD supports writing tests first through dedicated test-writing phases. You define test cases before implementation, specifying what your code should do. TDD works with popular frameworks including Jest, Vitest, pytest, Go test, cargo test, PHPUnit, and RSpec. The skill uses separate subagents to keep test writing focused, ensuring your tests remain honest and properly isolated through context isolation and vertical slicing techniques.
What testing frameworks does TDD support?
TDD supports a wide range of testing frameworks across multiple languages: Jest and Vitest for JavaScript, pytest for Python, Go test for Go, cargo test for Rust, PHPUnit for PHP, and RSpec for Ruby. This broad framework support lets you apply test-driven development methodology regardless of your tech stack, with consistent red-green-refactor workflows across all supported platforms.
What modes does TDD offer for automated testing setup?
TDD provides three execution modes for your automated testing workflow: interactive approval mode lets you review and approve each step, autonomous execution runs the full red-green-refactor cycle automatically, and dry-run validation lets you preview changes without committing them. These modes support different team preferences while maintaining discipline through vertical slicing and context isolation.
How can TDD help improve code quality and reliability?
TDD improves code reliability through its test-first approach, which catches defects before they reach production. By writing test cases before implementation, you clarify requirements upfront and ensure comprehensive coverage. TDD's red-green-refactor cycle combined with separate subagents for testing and implementation keeps your workflow disciplined, while vertical slicing and context isolation ensure your tests remain focused and honest.
What is the red-green-refactor cycle in TDD?
The red-green-refactor cycle is the core TDD development pattern. Red: write a failing test that defines desired behavior. Green: write minimal code to make the test pass. Refactor: improve code quality without changing functionality. TDD guides you through this cycle repeatedly, using separate subagents to keep each phase focused. This structured approach ensures continuous testing and maintains code quality throughout development.