tdd-test-generator

Generates failing unit tests with mocked dependencies before implementation to anchor API design.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/yuridefranca/ai-prompts --skill tdd-test-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-test-generator
Source: https://github.com/yuridefranca/ai-prompts/tree/main/src/skills/tdd-test-generator
Command: npx skills add https://github.com/yuridefranca/ai-prompts --skill tdd-test-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creating a disciplined start to feature development by generating failing unit tests before any implementation, anchoring API design and guiding early feedback.

Core Features & Use Cases

  • Generates failing unit tests before code to clarify API boundaries and expectations.
  • Ensures tests mock dependencies to isolate the unit under test.
  • Guides the red-green-refactor workflow and prepares for subsequent integration and E2E tests.

Quick Start

Run the tdd-test-generator to create failing unit tests before you implement any feature.

Frequently Asked Questions about tdd-test-generator

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

FAQPage Schema
How do I start test-driven development by writing failing unit tests first?

To start test-driven development with failing unit tests, define API boundaries and expectations by creating isolated test files with mocked dependencies before writing any implementation code. This anchors early feedback and enforces red-green-refactor discipline.

What is the best way to isolate units with mocked dependencies for TDD?

The best way to isolate units with mocked dependencies is to generate failing unit tests that mock external calls, establishing clear boundaries around the unit under test. This isolates behavior verification and drives feature development.

How does generating failing tests before implementation help clarify API design?

Generating failing tests before implementation clarifies API design by forcing you to define usage patterns and expectations upfront. This approach anchors the interface design and provides immediate feedback on structural decisions before committing to logic.

When do I need to create unit tests with mocked dependencies versus integration tests?

You need to create unit tests with mocked dependencies as the initial phase to isolate and verify specific units. Integration and E2E tests follow afterward to validate component interaction once the isolated units pass red-green-refactor cycles.

Does this TDD test generation approach work for general feature development across software projects?

Yes, this TDD test generation approach applies to feature work across typical software projects. It focuses on creating isolated units with mocked dependencies and clear boundaries to drive disciplined feature development before subsequent integration testing.

Why should I enforce red-green-refactor discipline before writing integration tests?

Enforcing red-green-refactor discipline before integration tests ensures each unit's logic is anchored by failing tests and verified in isolation. This prevents cascading errors and establishes a stable foundation for subsequent integration and E2E testing.