About tdd-workflow
tdd-workflow is a skill for developers implementing software through test-driven development. It iterates on one discrete behavior at a time, checking failure before implementation and rerunning tests after refactoring.
Key features
- 01Write tests for one behavior at a time
- 02Verify a new test fails as expected
- 03Add only the code needed to pass
- 04Refactor after tests pass
- 05Rerun tests after refactoring
Use cases
- 01Develop functionality incrementally
- 02Modify code using a test-first process
- 03Check for regressions after refactoring
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dgalarza/ claude-code-workflows --skill tdd-workflowAfter installing, type/tdd-workflowin Claude Code to confirm it loaded.
Details
From the project READMEThe goal of this skill is to implement a true test driven development workflow. This means:
- Writing the simplest test for ONE discrete piece of functionality.
- Run the new test and verify that it fails as expected.
- Write the minimal amount of code needed to make the test pass.
- Run the test to verify it passes.
- Once tests pass, look for opportunities to refactor.
- Run tests once again to verify refactoring didn't break anything.
Repeat this until you've completed the functionality desired.
Remember to never do any of the following:
- Write an entire test file up front.
- Implement more than one discrete piece of functionality at a time.
Comments
Markdown supported