dev-tdd

Enforce the RED-GREEN-REFACTOR cycle for unit and E2E testing.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/abudhahir/projects-pkm --skill dev-tdd-abudhahir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-tdd
Source: https://github.com/abudhahir/projects-pkm/tree/main/SKILLS/dev-tdd
Command: npx skills add https://github.com/abudhahir/projects-pkm --skill dev-tdd-abudhahir

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces a Test-Driven Development (TDD) workflow, ensuring that code is written to pass predefined tests, leading to more robust and reliable software.

Core Features & Use Cases

  • TDD Cycle Enforcement: Guides users through the RED-GREEN-REFACTOR cycle.
  • Mandatory Testing: Ensures tests are written and seen to fail before implementation.
  • Use Case: When tasked with implementing a new user authentication module, use this Skill to write failing tests for login, registration, and password reset first, then implement the code to make those tests pass.

Quick Start

Use the dev-tdd skill to implement the login functionality by writing a failing test first.

Frequently Asked Questions about dev-tdd

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

FAQPage Schema
How do I implement Test-Driven Development using the RED-GREEN-REFACTOR cycle?

Test-Driven Development using the RED-GREEN-REFACTOR cycle requires writing a failing test first, implementing the minimum code to pass that test, and then refactoring. This Skill guides you through each phase with strict execution gates and file-based logging.

What is the best way to ensure failing tests are written before code implementation?

The best way to ensure failing tests are written before implementation is to enforce mandatory testing within your TDD workflow. This Skill mandates that tests are written and explicitly observed failing before any functional code is developed.

Does this TDD workflow support both unit testing and e2e testing?

Yes, this TDD workflow supports both unit testing and e2e testing. It enforces the RED-GREEN-REFACTOR cycle across both testing types to promote robust code quality and reliable software development.

How do I write tests first for a new user authentication module?

To write tests first for a new user authentication module, you start by writing failing tests for login, registration, and password reset functionalities. Only after observing the failing tests do you implement the code to make them pass.

Why does my code quality degrade during refactoring without mandatory tests?

Code quality degrades during refactoring without mandatory tests because there is no safety net to catch regressions. Enforcing the RED-GREEN-REFACTOR cycle ensures tests remain passing while you improve the code structure.

Can I use this TDD approach for general development without external dependencies?

Yes, you can use this TDD approach for general development without external dependencies. It operates independently with file-based logging to track your testing cycle, requiring no additional libraries or frameworks to function.