tdd

Plan and execute red-green-refactor TDD cycles for software features.

38|6|Updated Sep 13, 2012
One-click install
npx skills add https://github.com/pixelastic/oroshi --skill tdd-pixelastic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/pixelastic/oroshi/tree/main/tools/ai/claude/config/skills/tdd
Command: npx skills add https://github.com/pixelastic/oroshi --skill tdd-pixelastic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds and maintains features using TDD cycles to reduce defects and guide robust design.

Core Features & Use Cases

  • Red-Green-Refactor workflow: write a failing test first, then implement the minimal code to pass, and refactor.
  • Mocking best practices: isolate units by mocking immediate collaborators to keep tests focused.
  • Test strategy planning: align test scope and interfaces before coding to minimize rewrites.

Quick Start

Write a failing unit test that targets a new feature, then implement just enough production code to make that test pass.

Frequently Asked Questions about tdd

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

FAQPage Schema
What is the red-green-refactor loop in test-driven development?

The red-green-refactor loop is a TDD workflow where you write a failing test, implement minimal code to pass it, then refactor. This enforces observable behavior and maintains incremental progress to reduce defects and guide design.

How do I write unit tests that isolate dependencies with mocking?

Isolate units by mocking immediate collaborators to keep tests focused. This behavioral testing strategy aligns test scope and interfaces before coding to minimize rewrites and ensure tests target observable behavior.

Can I use TDD to build features across any software project?

Yes, this TDD workflow is applicable across software projects. It uses plan-guided test strategy planning to align interfaces and scope before coding, supporting both behavioral and scaffolding tests for incremental development.

What's the best way to start a TDD cycle for a new feature?

Start the TDD cycle by writing a failing unit test that targets the new feature, then implement just enough production code to make that test pass. This enforces strict incremental workflow and observable behavior.

When should I use scaffolding tests versus behavioral tests in TDD?

Use behavioral tests to enforce observable behavior and scaffolding tests to support incremental workflow. This TDD approach covers unit isolation and mocking strategies to align test scope and interfaces before coding.