Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

test-driven-development

/test-driven-development

Buduje funkcje i poprawki błędów test-first w krótkich cyklach czerwone, zielone, refaktoryzacja.

Repozytorium
dusk_code ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.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
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.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

Buduje funkcje i poprawki błędów test-first w krótkich cyklach czerwone, zielone, refaktoryzacja.

Oryginalny opis (EN)

Build a feature or fix a bug test first, in short red, green, refactor cycles. Use when adding behaviour, fixing a bug with a regression test, or changing code that already has tests.

Jak działa

  1. Before the first cycle
  2. The cycle
  3. What to test
  4. When the cycle stalls
  5. Done
Sekcje z nagłówków SKILL.md, w oryginale · 56 linii, 424 słów
Podgląd SKILL.md
---
name: test-driven-development
description: Build a feature or fix a bug test first, in short red, green, refactor cycles. Use when adding behaviour, fixing a bug with a regression test, or changing code that already has tests.
source: "dusk_code"
author: "Neil Ermak"
license: MIT
---

# Test-Driven Development

The test states the behaviour before the code exists, and the failing run proves the
test can catch its absence. Each cycle is small enough to finish in minutes.

## Before the first cycle

- Find how the project tests: the framework, where tests live, the command that runs
  one test and the one that runs them all. Read a few existing tests and follow them.
- Split the work into behaviours, one sentence each, and keep them in `tasks`. Start
  with the simplest case that is still meaningful.

## The cycle

1. **Red.** Write one test for the next behaviour. Name it after the behaviour, not the
   function. Run it with `run_command` and watch it fail for the expected reason: a
   wrong value or a missing function, not a typo or a broken import. A test that
   passes at once tests nothing new; change it or delete it.
2. **Green.** Write the least code that passes it. Hard-coding is acceptable while
   only one example forces the result; the next test will force the general rule.
   Run the test, then the surrounding suite.
3. **Refactor.** With everything green, remove duplication and clarify names in both
   code and tests. Run the suite after each change. Never refactor on red.

Commit or checkpoint at green when the project's workflow allows it.

## What to test

- Behaviour through public interfaces, not private details, so refactoring does not
  break tests.
- Boundaries: empty input, one element, the maximum, invalid input, errors from
  dependencies.
- For a bug: first a test that reproduces it and fails, then the fix. The
  `systematic-debugging` skill covers finding the cause.
- For parsers and untrusted input, add property-based or fuzz tests where the project
  has the tooling.

Replace slow or external dependencies (network, clock, randomness) at a seam the code
already has or that is worth having. Do not mock the unit under test.

## When the cycle stalls

- A test is hard to write: the design is telling you something; add a seam or split
  the unit before forcing the test.
- Green needs a large change: the step was too big; revert to the last green and write
  a smaller test.
- Existing code has no tests: first add characterization tests that pin down current
  behaviour, then change it.

## Done

All behaviours in `tasks` have tests, the full suite passes, no test was skipped or
weakened to get there, and formatter and linter are clean. Report the tests added and
the command that runs them.

Wersje

RepozytoriumWynikLicencja
Ta strona · DroBov1Tya/dusk_code100MIT
GanyuanRan/Aegis100MIT
lucasouzadev/agent-kit-skill100MIT
zeative/satgas100AGPL-3.0
nikospavlopoulos/devops-mutant-powers100MIT
JohnStrunk/CommonCast100LGPL
Sanit-mann/The-Insectoids100MIT
mastro993/fstack100MIT
jelvodev/yaap100MIT

Migawka bazy z 13.11.2026 · wersja paczki 3e80fbd198d0 (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

  • 90tdd-red-green-refactor
    Prowadzi zmianę w krótkich cyklach czerwony, zielony, refaktoryzacja, z Claude w roli dyscyplinowanego partnera i widoczną listą testów.
  • 100test-driven-development-tdd-workflow
    Prowadzi iteracyjny rozwój oprogramowania zgodnie ze ścisłym cyklem czerwone, zielone, refaktoryzacja.
  • 100tdd
    Prowadzi przez test-driven development, gdy funkcja lub poprawka wymaga testów napisanych przed implementacją, w cyklu red-green-refactor.
  • 100test-driven-implementation
    Wprowadza zachowanie, poprawia błędy i zmienia interfejsy małymi cyklami czerwone, zielone, refaktoryzacja, z trafnymi asercjami.
  • 100tdd
    Prowadzi przez test-driven development przy budowie funkcji i naprawie błędów test-first, z testami integracyjnymi i cyklem red-green-refactor.
  • 100tdd
    Prowadzi przez test-driven development przy budowie funkcji i naprawie błędów test-first, z testami integracyjnymi i cyklem red-green-refactor.

Uwagi i zgłoszenia

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