Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

tdd

/tdd

Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
24.10.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
4
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

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

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co robi i kiedy

Prowadzi pracę test-first w cyklu czerwony, zielony, refaktoryzacja, przy nowych funkcjach i poprawkach błędów.

Wyzwalacze z opisu

red-green-refactor
Oryginalny opis (EN)

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Jak działa

  1. What a good test is
  2. Seams — where tests go
  3. Anti-patterns
  4. Rules of the loop
Sekcje z nagłówków SKILL.md, w oryginale · 44 linii, 458 słów
Podgląd SKILL.md
---
name: tdd
description: Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
---

# Test-Driven Development

TDD is the red → green loop. This skill is the reference that makes that loop produce tests worth keeping: what a good test is, where tests go, the anti-patterns, and the rules of the loop. Every section applies on every cycle — consult them before and during the loop, not after.

Read the owning spec, public header, existing registered tests, and active
important decisions so test names and expectations use the project's actual
domain language.

## What a good test is

Tests verify behavior through public interfaces, not implementation details. Code can change entirely; tests shouldn't. A good test reads like a specification — "user can checkout with valid cart" tells you exactly what capability exists — and survives refactors because it doesn't care about internal structure.

See [tests.md](tests.md) for examples and [mocking.md](mocking.md) for mocking guidelines.

## Seams — where tests go

A **seam** is the boundary where you observe behavior without coupling the test
to incidental structure. Prefer the implemented public interface. A private
helper may be tested directly only when that is the clearest way to prove
public behavior and the test remains stable under behavior-preserving changes.

Identify the public seam from the owning spec and implemented header. Ask the
maintainer only when choosing a seam would create a new public contract or
resolve a material ambiguity; otherwise use the narrowest existing observable
boundary.

## Anti-patterns

- **Implementation-coupled** — mocks internal collaborators, tests private methods, or verifies through a side channel (querying the database instead of using the interface). The tell: the test breaks when you refactor but behavior hasn't changed.
- **Tautological** — the assertion recomputes the expected value the way the code
  does (`EXPECT_EQ(add(a, b), a + b)`), so it passes by construction and can
  never disagree with the code. Expected values must come from an independent
  literal, worked example, or specification.
- **Horizontal slicing** — writing all tests first, then all implementation. Bulk tests verify _imagined_ behavior: you test the _shape_ of things rather than user-facing behavior, the tests go insensitive to real changes, and you commit to test structure before understanding the implementation. Work in **vertical slices** instead — one test → one implementation → repeat, each test a **tracer bullet** that responds to what the last cycle taught you.

## Rules of the loop

- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.
- **One slice at a time.** One seam, one test, one minimal implementation per cycle.
- **Refactor only while green.** After the minimal implementation passes, remove
  duplication and improve names or seams without changing behavior, then rerun
  the focused test before starting the next red case. Review remains read-only.
Pliki w paczce (4)
  • SKILL.md 3 KB
  • mocking.md 2 KB
  • tests.md 2 KB
  • agents/openai.yaml 1 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · sek788432/stock-back-test-system100Apache-2.0
kdlbs/kandev100AGPL-3.0
sentimony/skills100MIT
TerminalSkills/skills100Apache-2.0
duronext/jig100MIT
xoai/sage100MIT
rolemodel/skills100MIT
j0hanz/j0hanz-marketplace100MIT
mthines/agent-skills100MIT

Migawka bazy z 28.10.2026 · wersja paczki 0f4baecb912a (skrót SHA-256 całej paczki)

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

Podobne skille

  • 100tdd-workflow
    Prowadzi implementację test-first nowych funkcji, poprawek i refaktoryzacji w cyklu czerwony, zielony, refaktoryzacja, z bramkami weryfikacji.
  • 95tdd-red-green-refactor
    Wymusza pracę w cyklu Red-Green-Refactor (TDD) w TypeScript i Node.js przy nowych funkcjach, poprawkach błędów i migracji logiki.
  • 90test-driven-development
    Prowadzi przez cykl TDD przy nowych funkcjach i poprawkach: jeden czerwony test, minimalny kod, potem refaktoryzacja.
  • 100tdd-with-agents
    Egzekwuje TDD w cyklu czerwony, zielony, refaktoryzacja we wszystkich warstwach, wraz ze wzorcami testów.
  • 100test-driven-development
    Pomaga pisać testy przed kodem: cykl czerwony-zielony-refaktoryzacja, wzorce testów dla stosu, nazewnictwo testów i mockowanie.
  • 100test-driven-development
    Wymusza cykl red-green-refactor w TDD: żadnego kodu produkcyjnego bez wcześniejszego testu, który nie przechodzi, przy funkcjach, poprawkach błędów i kodzie produkcyjnym.

Uwagi i zgłoszenia

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