test-driven-development

Enforce test-first implementation with red-green-refactor cycles and automated verification.

4|2|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/anderson-0/mighty-powers --skill test-driven-development-anderson-0
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-driven-development
Source: https://github.com/anderson-0/mighty-powers/tree/main/skills/test-driven-development
Command: npx skills add https://github.com/anderson-0/mighty-powers --skill test-driven-development-anderson-0

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents unreliable implementations by enforcing a test-first workflow that validates intended behavior before production code is written.

Core Features & Use Cases

  • Red-Green-Refactor Workflow: Guides developers through writing failing tests, implementing minimal solutions, and safely improving code.
  • Test Quality Enforcement: Helps avoid mock misuse, incomplete test coverage, test-only production code, and other testing anti-patterns.
  • Use Case: Apply this Skill when adding a new feature or fixing a bug to ensure every behavior change is protected by a verified regression test.

Quick Start

Use the test-driven-development skill to guide me through implementing this feature by writing failing tests first and following the complete TDD cycle.

Frequently Asked Questions about test-driven-development

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

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

The red green refactor cycle in test-driven development is a workflow of writing a failing test, implementing minimal code to pass it, and safely improving the design. This enforces test-first implementation to validate behavior before production changes.

How do I prevent mock misuse when writing unit tests?

To prevent mock misuse when writing unit tests, apply test quality enforcement to avoid incomplete coverage and anti-patterns. Dependency-aware mocking decisions ensure you validate behavior correctly without test-only production code.

How do I write failing tests first for a new feature?

To write failing tests first for a new feature, follow a disciplined test-first workflow by defining the intended behavior before production code is written. Implement minimal solutions to pass the tests and safely refactor.

When do I need automated verification for a bug fix?

Automated verification for a bug fix is needed when changing existing software behavior. Applying test-driven development ensures every behavior change is protected by a verified regression test to prevent unreliable implementations.

Does test-driven development work for refactoring existing code?

Test-driven development works for refactoring by applying test-first implementation practices to behavior changes. It validates intended behavior before modifying production code, ensuring software reliability during structural improvements.

What are the limitations of test-first implementation?

Limitations of test-first implementation involve the overhead of maintaining strict red green refactor discipline and dependency-aware mocking. It requires careful validation of test quality to avoid incomplete coverage and test-only production code.