Przejdź do treści
Biblioteka skilli
Programowanie · Testowanie

test-driven-development

/test-driven-development

Prowadzi implementację przez nieprzechodzący test na początku i najmniejszy kod, który go spełnia, przy funkcjach, poprawkach błędów, testach regresji i trudnym w zmianie kodzie, oraz pomaga ocenić, co warto testować.

Repozytorium
headcount ↗
Licencja
MIT
Ostatnia zmiana repozytorium
18.10.2026

Ocena i bezpieczeństwo

90/ 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ść25 / 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 18.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 implementację przez nieprzechodzący test na początku i najmniejszy kod, który go spełnia, przy funkcjach, poprawkach błędów, testach regresji i trudnym w zmianie kodzie, oraz pomaga ocenić, co warto testować.

Oryginalny opis (EN)

Drives implementation by writing a failing test first, then the smallest code that passes it. Use this before writing implementation code for any feature or bugfix, when a bug needs a regression test, when existing code is hard to change safely, or when someone asks whether a change is covered. Also use to decide what is worth testing and what is not.

Jak działa

  1. The loop
  2. What to test
  3. Bugs
  4. Rules
  5. Never
  6. Return contract
Sekcje z nagłówków SKILL.md, w oryginale · 50 linii, 402 słów
Podgląd SKILL.md
---
name: test-driven-development
description: Drives implementation by writing a failing test first, then the smallest code that passes it. Use this before writing implementation code for any feature or bugfix, when a bug needs a regression test, when existing code is hard to change safely, or when someone asks whether a change is covered. Also use to decide what is worth testing and what is not.
---

# Test-driven development

## The loop

1. **Red** — write one test that fails for the right reason. Run it. A test that passes immediately
   is testing nothing; a test that errors instead of failing is testing the wrong thing.
2. **Green** — the smallest change that makes it pass. Ugly is fine here.
3. **Refactor** — clean up with the test green. If it goes red, you changed behavior, not structure.

Never skip step 1. Writing the test after the code produces a test shaped to the implementation,
which is the one shape that cannot catch the implementation being wrong.

## What to test

Test behavior at the boundary a caller actually depends on. For each unit ask: if this broke
silently, who notices and how? If the answer is nobody, delete the code rather than test it.

- **Test**: branching logic, boundary conditions, error paths, anything with a past bug, contracts
  between modules.
- **Do not test**: getters, framework behavior, private helpers reachable only through a public path
  already covered, exact wording of log lines.

## Bugs

Every bug gets a failing test *before* the fix, reproducing it at the smallest scope that shows it.
That test is the proof the bug existed and the guard that it stays fixed. A fix without one is a
claim.

## Rules

- One behavior per test. A test asserting five things tells you almost nothing when it fails.
- The test name states the behavior, not the method: `rejects_expired_token`, not `test_auth`.
- Never weaken an assertion to get green. If a test is inconvenient, the design is telling you
  something.
- Never mock what you own — mock the network and the clock, not your own modules. Mocking your own
  code tests the mock.

## Never

- Write the test after the code and call it test-driven. You will test what you built rather than what was required.
- Skip watching the test fail. A test that has never failed proves nothing.
- Delete or skip a failing test to unblock a release. Fix it, or revert what broke it.
- Treat a coverage number as the goal. It counts lines executed, not behavior pinned down.

## Return contract

Report the tests added, what each pins down, what is deliberately untested and why, and the actual
command you ran with its output. "Tests pass" without the command output is not a result.

Wersje

RepozytoriumWynikLicencja
Ta strona · cbrock84/headcount90MIT
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 9b6f91c9f469 (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

Uwagi i zgłoszenia

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