Skip to content
Skills Library
Programming · Building & coding

tdd-implement

/tdd-implement

Implement a feature or fix a bug using strict TDD. Analyzes the requirement, creates tests first, implements minimal code, then refactors. Use for feature requests, bug fixes, or enhancements that need test coverage.

Repository
fastled ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Implement a feature or fix a bug using strict TDD. Analyzes the requirement, creates tests first, implements minimal code, then refactors. Use for feature requests, bug fixes, or enhancements that need test coverage.

Arguments

/tdd-implement <feature request, bug description, or issue reference>
Original author description

Implement a feature or fix a bug using strict TDD. Analyzes the requirement, creates tests first, implements minimal code, then refactors. Use for feature requests, bug fixes, or enhancements that need test coverage.

How it works

  1. Input
  2. Step 1: Analyze the Requirement
  3. Step 2: Implement Each Behavior via TDD
  4. Step 3: Integration Verification
  5. Step 4: Final Summary
  6. Key Rules
Original SKILL.md headings · 113 lines, 585 words
SKILL.md preview
---
name: tdd-implement
description: Implement a feature or fix a bug using strict TDD. Analyzes the requirement, creates tests first, implements minimal code, then refactors. Use for feature requests, bug fixes, or enhancements that need test coverage.
argument-hint: <feature request, bug description, or issue reference>
context: fork
agent: test-writer-agent
---

# TDD Implementation — Feature-Driven Test-First Development

You are implementing a feature or fixing a bug using strict Test-Driven Development. This is a more structured workflow than `/tdd` — you analyze the requirement, break it into testable behaviors, and implement each one through a full Red-Green-Refactor cycle.

## Input

$ARGUMENTS

## Step 1: Analyze the Requirement

### Actions
1. **Read the requirement** carefully — identify what behavior needs to change or be added
2. **Find relevant source code**: Use Grep/Glob to locate the files that need to change
3. **Read existing tests**: Find any existing test coverage for the affected code
4. **Identify testable behaviors**: Break the requirement into 1-5 discrete, testable units

### Output
```
## Requirement Analysis

**Requirement**: [one-line summary]
**Source files**: [list of files that will be modified]
**Existing tests**: [list of related test files, or "none found"]
**Testable behaviors**:
1. [behavior 1 — what it does, how to verify]
2. [behavior 2 — what it does, how to verify]
3. [behavior 3 — if needed]
```

## Step 2: Implement Each Behavior via TDD

For EACH testable behavior, execute a full Red-Green-Refactor cycle:

### RED: Write Failing Test
1. Write a minimal test for this specific behavior
2. Follow all conventions from `agents/tests.md`:
   - `FL_` prefixed macros (`FL_CHECK_EQ`, `FL_REQUIRE_TRUE`, etc.)
   - Include `test.h` and `FastLED.h`
   - `using namespace fl;` + anonymous namespace
   - Mirror source path for test file placement
3. Run `bash test TestName` — verify it FAILS for the right reason

### GREEN: Minimal Implementation
1. Write the minimum code to make this test pass
2. Do NOT implement other behaviors yet
3. Run `bash test TestName` — verify it PASSES
4. Run `bash test --cpp` — verify no regressions

### REFACTOR: Clean Up
1. Improve code quality without changing behavior
2. Run tests after each change to verify they stay green

### Report Each Cycle
```
### Behavior N: [description]
- RED: Test written at tests/fl/foo.cpp — FAILS (expected: [reason])
- GREEN: Implemented in src/fl/foo.h — PASSES
- REFACTOR: [changes made, or "clean as-is"]
```

## Step 3: Integration Verification

After all behaviors are implemented:

1. **Run full test suite**: `bash test --cpp`
2. **Check for regressions**: Verify ALL tests pass, not just new ones
3. **Review changes holistically**: Ensure the implementation is cohesive
4. **Run code review**: Check changes against FastLED coding standards

### Output
```
## Integration Verification

**Full test suite**: [X/X] tests pass
**New tests added**: [count]
**Source files modified**: [list]
**Regressions**: None / [details if any]
```

## Step 4: Final Summary

```
## TDD Implementation Complete

**Requirement**: [what was implemented]
**Approach**: [brief description of the solution]

### Files Changed
| File | Change Type | Description |
|------|-------------|-------------|
| tests/fl/foo.cpp | Added | 3 test cases for [feature] |
| src/fl/foo.h | Modified | Added [function/method] |

### Test Coverage
- [Test case 1]: [what it verifies]
- [Test case 2]: [what it verifies]
- [Test case 3]: [what it verifies]

### All Tests Passing: Yes
```

## Key Rules

- **Test FIRST, implement SECOND** — this order is absolute
- **One behavior per cycle** — don't batch multiple behaviors
- **Minimal implementation** — write the simplest code that passes
- **Run tests at EVERY transition** — RED->GREEN->REFACTOR each verified
- **Stay in project root** — never `cd` to subdirectories
- **Use `bash test`** wrapper — never bare `python`, `meson`, or `ninja`
- **Extend existing test files** — don't create new ones unless necessary
- **No mocks** — use real objects and values

Versions

The database has no other skills named tdd-implement.

Database snapshot: 13.11.2026 · package version 31388de52e2f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100implement
    Implements a single task from the plan using TDD discipline. Reads the task spec, writes tests first, writes minimal passing code, refactors, and commits. Use when executing a planned task, writing code for a feature, or when the user says "implement this", "write the code",…
  • 842-implement
    Implements the feature using TDD. Invoked when the user wants to implement the feature, start TDD, begin red-green-refactor, or runs /aido:2-implement.
  • 100workflow-build-feature
    Build a feature end to end: spec and TDD, implement, unit tests, Playwright check, PR. Use when "build a feature" or "implement this end-to-end". Spec/TDD loop only → workflow-spec-tdd. One bug → workflow-fix-and-ship.
  • 90tdd
    Implements features using strict test-driven development — red-green-refactor cycle. Writes a failing test first, then minimal code to pass, then refactors. Use when building features that need high reliability.
  • 100tdd
    Build one feature or fix one bug test-first in the red → green → refactor loop, with tests at agreed seams. Use when the user asks for TDD or test-first work on a single feature or bug fix, mentions "red-green-refactor", wants integration tests, or when implement reaches its…
  • 96tdd
    Use when implementing features or bug fixes test-first.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.