Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

matt-tdd

/matt-tdd

Pisze testy, które przetrwają refaktoryzację, metodą test-first: czerwony, zielony, a potem testy integracyjne dla modułu.

Repozytorium
harness-kit ↗
Licencja
MIT
Ostatnia zmiana repozytorium
10.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
3
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.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 testy, które przetrwają refaktoryzację, metodą test-first: czerwony, zielony, a potem testy integracyjne dla modułu.

Wyzwalacze z opisu

write testsadd teststest this moduletest-firstred-greenintegration tests
Oryginalny opis (EN)

Write tests that survive refactors, test-first. Triggers on: 'write tests', 'add tests', 'test this module', 'test-first', 'red-green', 'integration tests', or /matt-tdd.

Jak działa

  1. Steps
  2. Reference
  3. Example
Sekcje z nagłówków SKILL.md, w oryginale · 29 linii, 552 słów
Podgląd SKILL.md
---
name: matt-tdd
description: "Write tests that survive refactors, test-first. Triggers on: 'write tests', 'add tests', 'test this module', 'test-first', 'red-green', 'integration tests', or /matt-tdd."
imported: true
imported_from: https://github.com/mattpocock/skills
preset_enabled: false
---

# Test-driven development

Tests go red before the code goes green. This skill is the reference that makes the red → green loop produce tests worth keeping: where tests go, what a good one looks like, and how the loop runs inside this repo's wave rule.

## Steps

1. **Name the seams.** A seam is the public boundary you test at: the interface a caller uses, where you can observe behaviour without reaching inside. Write the seams under test as the first lines of the scenario matrix (CLAUDE.md, Wave 0), then the happy paths, edge cases and failure modes. Ask the user only when two candidate seams would produce different tests and the spec does not settle it. When the shape of the interface is itself in question, call the Skill tool with `matt-codebase-design` for the module, seam and depth vocabulary.
2. **Write the tests red.** A haiku explorer lists the area's test layout, fixtures and naming. Dispatch a sonnet subagent with the scenario matrix, the seams, that list, `tests.md` and `mocking.md`, and nothing about the implementation (CLAUDE.md, Wave 1); it does not see this file. It writes one test per matrix line, named for what the caller gets, in the project's own words.
3. **Confirm red.** Run the verify gate named in CLAUDE.md for the area touched. Every new test fails. A test that passes now is checking nothing; fix or delete it before going on.
4. **Go green.** Dispatch the implementation subagent with the failing tests and the requirements (CLAUDE.md, Wave 2). Write only enough code to pass the tests on disk; a test that turns out wrong is fixed at the seam, not worked around in the code.
5. **Confirm green, refactor, verify live.** The verify gate named in CLAUDE.md for the suites touched passes. Refactor is its own pass after green: simplify the code the tests cover, run the suite again. Then the behaviour is seen in the running system (UI, API response, CLI output; CLAUDE.md, Wave 3) and that check is written in the final message. Done means green twice and seen live.

## Reference

Tests verify behaviour through the seam; the code inside can change entirely and the test still passes. `tests.md` shows good and bad tests side by side. `mocking.md` says what to mock (system boundaries only) and how to design a boundary so it mocks cleanly.

Two ways a test stops being worth keeping:

- **Implementation-coupled**: it mocks an internal collaborator, calls a private method, asserts on call order, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks on a refactor when behaviour has not changed.
- **Tautological**: the expected value is computed the way the code computes it (`expect(add(a, b)).toBe(a + b)`, a snapshot derived by hand the same way, a constant asserted equal to itself), so it passes by construction. Expected values come from an independent source: a known-good literal, a worked example, the spec.

Each test names one matrix behaviour. A test that checks a field exists or a function was called, instead of what a caller sees, is a shape test and belongs in neither wave.

## Example

- Verify gate by area: the verify gate with the suite name.
- Full verify gate: the verify gate with no argument.
Pliki w paczce (3)
  • SKILL.md 3 KB
  • mocking.md 1 KB
  • tests.md 2 KB

Wersje

W bazie nie ma innych skilli o nazwie matt-tdd.

Migawka bazy z 13.11.2026 · wersja paczki 1da07b9fcf33 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 4 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100write-tests
    Pisze testy jednostkowe i integracyjne dla istniejącego kodu, także w podejściu TDD, gdy brakuje testów.
  • 90TDD Methodology
    Wdraża metodykę TDD dla funkcji, błędów i refaktoryzacji: najpierw testy, potem kod, gdy użytkownik prosi o test-first lub TDD.
  • 100tdd-workflow
    Pisze funkcje i poprawki test-first w cyklu czerwony, zielony, refaktor.
  • 100tdd
    Prowadzi TDD pionowymi wycinkami funkcji, cyklem czerwony, zielony, refaktoryzacja, z testami przeżywającymi refaktoryzację.
  • 100tdd
    Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów.
  • 100tdd
    Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów.

Uwagi i zgłoszenia

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