Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

tdd

/tdd

Prowadzi cykl czerwony, zielony, refaktor z obserwowanymi błędami: najpierw failujący test, dopiero potem kod produkcyjny.

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

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

Prowadzi cykl czerwony, zielony, refaktor z obserwowanymi błędami: najpierw failujący test, dopiero potem kod produkcyjny.

Oryginalny opis (EN)

Test-driven development with RED-GREEN-REFACTOR cycle. Use when building features or fixing bugs test-first. Load BEFORE writing implementation code. Enforces failing test before any production code.

Jak działa

  1. What a good test is
  2. Seams — where tests go
  3. Anti-Patterns
  4. Rules of the Loop
  5. Workspace Integration
Sekcje z nagłówków SKILL.md, w oryginale · 41 linii, 318 słów
Podgląd SKILL.md
---
name: tdd
description: Test-driven development with RED-GREEN-REFACTOR cycle. Use when building features or fixing bugs test-first. Load BEFORE writing implementation code. Enforces failing test before any production code.
license: MIT
compatibility: opencode
---

# Test-Driven Development

TDD is the red → green loop. Every section applies on every cycle. Consult them before and during the loop, not after.

## 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 and survives refactors because it doesn't care about internal structure.

## Seams — where tests go

A **seam** is the public boundary you test at: the interface where you observe behavior without reaching inside. Tests live at seams, never against internals.

**Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam.

Ask: "What's the public interface, and which seams should we test?"

## Anti-Patterns

- **Implementation-coupled** — mocks internal collaborators, tests private methods. The tell: the test breaks when you refactor but behavior hasn't changed.
- **Tautological** — assertion recomputes the expected value the way the code does, so it passes by construction. Expected values must come from an independent source.
- **Horizontal slicing** — writing all tests first, then all implementation. Work in **vertical slices**: one test → one implementation → repeat.

## 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.
- **Refactoring is not part of the loop.** It belongs to the review stage.

## Workspace Integration

**Related rules:** `.opencode/rules/testing.md` (quality gates), `.opencode/rules/coding.md`
**Related workflow:** `.opencode/workflows/feature.md` (Stage 2: Test Planning)
**Related agents:** `@developer`, `@tester`
**Related skills:** `verify-completion`, `code-review`

**Quality Gates (`.opencode/rules/testing.md`):**
- Each test cycle must satisfy Gate 2: Tests pass
- Each implementation must satisfy Gate 3: Code Quality
- Full suite must pass before merging (Gate 2)

Wersje

RepozytoriumWynikLicencja
Ta strona · nasac0x/code-orchestrator100MIT
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 1f3d9d751cd2 (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-cycle
    Prowadzi pętlę TDD czerwony-zielony-refaktor z obowiązkowym sprawdzeniem fałszywie dodatnich wyników testu.
  • 100test-driven-development
    Wymusza cykl czerwony, zielony, refaktoryzacja przed każdą implementacją funkcji lub poprawką błędu: najpierw test, potem kod.
  • 90tdd-workflow
    Prowadzi znormalizowany cykl TDD: czerwony, zielony, refaktor i weryfikacja, z dbaniem o pokrycie testami i brak regresji.
  • 100tdd-workflow
    Pisze funkcje i poprawki test-first w cyklu czerwony, zielony, refaktor.
  • 100tdd-cycle
    Narzuca rygor czerwony, zielony, refaktor z obserwowanymi błędami, zwłaszcza gdy test przechodzi podejrzanie za pierwszym razem.
  • 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.