Back to Skills

test-driven-development

Use when implementing any feature or bugfix, before writing implementation code

463stars54forksUpdated 2/18/2026

Security Assessment

Safe(100/100)
Security Score100/100

About test-driven-development

The 'test-driven-development' skill focuses on integrating Test-Driven Development (TDD) practices into feature development, ensuring that tests are written before the implementation code. TDD follows a cycle of writing a failing test, writing minimal code to pass the test, and then refactoring the code, which helps improve software quality and ensures that the software behaves as expected from the beginning. This process is tracked using BD, providing persistence and visibility into the development lifecycle, thus enhancing the development process and maintaining high-quality code over time.

The skill integrates the TDD cycle with BD molecules, offering a structured approach to development. It helps users create reusable molecules for each TDD phase (Red, Green, and Refactor) and apply them across features or bug fixes. These tasks are organized into an efficient workflow, which includes writing failing tests, executing them, and refining the code. BD tools facilitate smooth tracking of each task, and the cycle is designed to ensure that all tests pass before declaring a feature complete. The approach aims at minimizing technical debt while promoting code quality.

The target users of this skill are developers looking to implement or enforce TDD in their workflows, especially in teams using BD for task and project management. It is ideal for teams wanting to ensure the correctness of their code early in the development process and maintain a strong focus on testing. Use cases include software feature development, bug fixing, and continuous improvement of code quality with minimal disruption.

FAQ

How do I use the TDD molecule?

To use the TDD molecule, you need to first create it by running the 'bd molecule create tdd-cycle' command. Then, apply the molecule for each feature or bug fix by using 'bd molecule apply tdd-cycle --vars feature=<feature-name>' where <feature-name> is the feature you're working on.

Can I apply the TDD molecule to an existing project?

Yes, you can apply the TDD molecule to any feature or bug fix within an existing project. Use the 'bd molecule apply' command, specifying the feature and epic you are working on.

Is there any required setup before using the TDD skill?

Before using the TDD skill, you must create the TDD molecule once with the 'bd molecule create tdd-cycle' command. This setup ensures that all tasks for the TDD cycle are predefined and reusable for any feature you work on.

What does the TDD cycle entail?

The TDD cycle follows the Red-Green-Refactor approach. First, you write a failing test (Red), then write minimal code to pass the test (Green), and finally, refactor the code while ensuring all tests still pass (Refactor). The cycle is repeated for each test case until the feature is complete.

Install test-driven-development

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill