tdd
/tdd
Pisze najpierw failujący test, a potem kod, po jednym zachowaniu naraz przy budowie funkcji lub naprawie błędu.
- Autor
- masihmoafi ↗
- Repozytorium
- skills ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 08.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Pisze najpierw failujący test, a potem kod, po jednym zachowaniu naraz przy budowie funkcji lub naprawie błędu.
Oryginalny opis (EN)
Test-driven development: the agent writes the failing test, then the code, one behavior at a time. Use when building a feature or fixing a bug test-first, or when the user says tdd, red-green, or test-first.
Jak działa
- Before the first test
- The loop
- A good test
- Bugs
- Done
Podgląd SKILL.md
--- name: tdd description: "Test-driven development: the agent writes the failing test, then the code, one behavior at a time. Use when building a feature or fixing a bug test-first, or when the user says tdd, red-green, or test-first." --- # Test-driven development Write the failing test, then the code that passes it, one **slice** at a time. ## Before the first test 1. Name the behavior in one line: input, expected outcome, non-goals. 2. Pick the **seam**, the public boundary you test at (function, CLI, HTTP route, rendered UI). 3. Find the repo's test command and run it once for the baseline. ## The loop 1. **Red.** One test for the next smallest behavior; run only it. It must fail because the behavior is missing; a typo, import or fixture failure is not red. If it passes at once, it is a characterization test: pick a behavior that is actually missing. 2. **Green.** The smallest code that passes; rerun that test. 3. **Next slice.** Let this slice shape the next test; never write them all up front. Refactor once the behavior is complete and green, then rerun the relevant suite. Code written before its test is deleted, not kept "as reference": a test written after passes at once and proves nothing. Exploring first is fine; throw the exploration away, then start at red. A test that is hard to write means an interface that is hard to use: simplify the interface. ## A good test - Checks behavior through the seam and survives a refactor that keeps it. - Has one reason to fail; deterministic and fast. - Takes its expected value from an independent source. `assert add(a, b) == a + b` can never fail; `assert add(2, 3) == 5` can. - Mocks only external boundaries (network, paid APIs, clock); makes no paid calls. A fake proves only the fake's boundary: say so. - For model and ML code, test the deterministic parts (transforms, parsing, shapes, prompt assembly, scoring math); model quality is an experiment. ## Bugs Write the regression test first and show it failing on the current code for the intended reason; a regression test that never failed proves nothing. ## Done Show the test command's red output before, the same command green after, and the wider suite green. Label the work honestly: TDD, regression test, characterization test or refactor. Sources: `mattpocock/skills` (`tdd`); [obra/superpowers](https://github.com/obra/superpowers) (`test-driven-development`, MIT).
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · masihmoafi/skills | 100 | MIT |
| kdlbs/kandev | 100 | AGPL-3.0 |
| sentimony/skills | 100 | MIT |
| sentimony/skills | 100 | MIT |
| TerminalSkills/skills | 100 | Apache-2.0 |
| duronext/jig | 100 | MIT |
| xoai/sage | 100 | MIT |
| rolemodel/skills | 100 | MIT |
| matteocodogno/wellforge | 100 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 09b70d657c93 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100test-driven-development
Prowadzi TDD z workflow red-green-refactor: testy najpierw, odtwarzanie błędów padającym testem, asercje o zachowaniu i bezpieczna refaktoryzacja kodu pod testami. - 90testing
Pisze testy od czerwonego do zielonego, po jednym wycinku naraz, na uzgodnionych granicach, przy budowie funkcji lub naprawie błędu. - 100054-design-tdd
Prowadzi zmiany w Javie metodą TDD: najpierw test, który nie przechodzi, potem minimalny kod i refaktoryzacja. - 90tdd-guide
Prowadzi pracę test-first: najpierw nieprzechodzące testy, cykl RED, GREEN, REFACTOR, dla funkcji, błędów i refaktoryzacji zmieniających zachowanie. - 100tdd-feature
Dostarcza szkielet red-green-refactor do budowy nowych funkcji w TDD: najpierw padające testy, potem implementacja, która je przechodzi. - 100test-driven-development
Prowadzi implementację test-first w cyklach red-green-refactor: jeden test, minimalny kod i porządki, także przy odtwarzaniu błędu testem przed poprawką.