tdd-implementer

Implement minimal code to satisfy a failing test during the GREEN phase.

2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/michaelalber/ai-toolkit --skill tdd-implementer-michaelalber
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-implementer
Source: https://github.com/michaelalber/ai-toolkit/tree/main/skills/tdd-implementer
Command: npx skills add https://github.com/michaelalber/ai-toolkit --skill tdd-implementer-michaelalber

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of writing only the necessary code to make a failing test pass, preventing over-engineering during the GREEN phase of Test-Driven Development.

Core Features & Use Cases

  • Minimal Code Implementation: Focuses on writing the absolute least amount of code required to satisfy a failing test.
  • Strategy Guidance: Employs "Fake It," "Obvious Implementation," or "Triangulation" to guide code writing.
  • Use Case: When you have a failing test for a new function, use this Skill to implement the simplest possible code that makes the test pass, ensuring a rapid feedback loop.

Quick Start

Use the tdd-implementer skill to write the minimal code required to make the current failing test pass.

Frequently Asked Questions about tdd-implementer

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

FAQPage Schema
How do I write minimal code to pass a failing test during TDD?

TDD strategies like Fake It, Obvious Implementation, and Triangulation guide writing the absolute least code needed to satisfy a failing test. They prevent premature abstraction by forcing the codebase to evolve strictly through test requirements rather than speculative design.

What is the best way to avoid over-engineering when implementing code for a new function?

The best way to avoid over-engineering when implementing code for a new function is adhering to TDD principles by writing only what is necessary to satisfy the failing test. This rapid feedback loop prevents speculative generalization and keeps implementation strictly bounded by test cases.

When should I use Triangulation instead of Obvious Implementation in test-driven development?

Use Triangulation in test-driven development when the generalization of a function is not immediately obvious from a single test case. You should write multiple failing tests with varying inputs to force the correct implementation, whereas Obvious Implementation is used when the solution is already clear.

Does this approach to code implementation work without adding dependencies?

Yes, this approach to code implementation works without adding dependencies because it focuses entirely on writing minimal logic to pass existing test cases. It requires no external libraries or modules, relying solely on basic refactoring and strict adherence to TDD principles.

Why does writing only the necessary code for a failing test prevent premature abstraction?

Writing only the necessary code for a failing test prevents premature abstraction because it restricts development to fulfilling specific test assertions. By using strategies like Fake It, you defer generalization until multiple distinct test cases prove the need for a more complex implementation.