tdd

Guide teams through red-green-refactor cycles for test-driven development workflows.

195|16|Updated Feb 18, 2025
One-click install
npx skills add https://github.com/InditexTech/weavejs --skill tdd-inditextech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/InditexTech/weavejs/tree/main/code/.agents/skills/tdd
Command: npx skills add https://github.com/InditexTech/weavejs --skill tdd-inditextech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-driven development helps teams validate behavior before implementing it, reducing regressions and guiding design decisions.

Core Features & Use Cases

  • Guided red-green-refactor workflow that emphasizes validating public interfaces over internal details.
  • Encourages integration-style tests and incremental refactoring to deliver reliable features.
  • Supports test-first development with clear criteria for when to proceed to the next change.

Quick Start

Start by writing a small failing test and then implement just enough code to pass it.

Frequently Asked Questions about tdd

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

FAQPage Schema
How do I start test-driven development for a new feature?

Start test-driven development by writing a small failing test that validates a public interface, then implement just enough code to pass it before moving to the next change.

What is the red-green-refactor cycle in TDD?

The red-green-refactor cycle in TDD is a workflow where you write a failing test, implement code to make it pass, and then incrementally refactor safely before repeating the process.

How do I integrate tests first when fixing a bug?

Integrate tests first when fixing a bug by writing a test that captures the expected behavior and fails against the current code, then applying disciplined incremental refactoring to resolve it.

Should I test internal details or public interfaces in TDD?

TDD enforces a public-interface focus, validating behavior through integration-style tests rather than testing internal implementation details to support safer refactoring.

When should I proceed to the next change during a TDD workflow?

You should proceed to the next change during a TDD workflow only when your current test passes, enforcing one-test-at-a-time iteration with clear criteria for incremental refactoring.

Can I use TDD for large incremental refactoring tasks?

TDD supports disciplined incremental refactoring by providing guardrails for planning and tracing, ensuring you safely refactor large codebases through small, test-validated steps.