Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

tdd

/tdd

Pisze najpierw failujący test, a potem kod, po jednym zachowaniu naraz przy budowie funkcji lub naprawie błędu.

Repozytorium
skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
08.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

  1. Before the first test
  2. The loop
  3. A good test
  4. Bugs
  5. Done
Sekcje z nagłówków SKILL.md, w oryginale · 39 linii, 360 słów
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

RepozytoriumWynikLicencja
Ta strona · masihmoafi/skills100MIT
kdlbs/kandev100AGPL-3.0
sentimony/skills100MIT
sentimony/skills100MIT
TerminalSkills/skills100Apache-2.0
duronext/jig100MIT
xoai/sage100MIT
rolemodel/skills100MIT
matteocodogno/wellforge100MIT

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ą.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.