Logo vun Test Driven Development

Test Driven Development

Communautéit
pimenov
test-driven-development

Drives behavior changes through tests or explicit focused checks before implementation. Use when implementing new logic, fixing a bug, changing behavior, adding edge-case handling, modifying validation, refactoring behavior-sensitive code, or after debugging identifies a root cause that needs a regression guard. Also use when Codex is about to say a bug is fixed or behavior works but no proof exists yet.

Iwwersiicht

Editeurpimenov
Repositorycodex-first-skills-pack
Skill-Nummtest-driven-development
Stären
28
Forks
5
Matgeliwwert Fichieren
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum pimenov op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Test Driven Development an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/pimenov/codex-first-skills-pack/tree/main/skills/test-driven-development
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pimenov/codex-first-skills-pack.git /tmp/codex-first-skills-pack
mkdir -p .claude/skills
cp -r /tmp/codex-first-skills-pack/skills/test-driven-development .claude/skills/test-driven-development
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Test Driven Development an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Test Driven Development automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Test Driven Development net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Test-Driven Development

Overview

Use tests as executable proof of expected behavior. For bugs, first reproduce the bug with a failing test or focused check. For new behavior, define the expected behavior before writing implementation code.

This skill is not ceremony. It is a guard against "looks fixed" answers that cannot catch regressions.

Do Not Use

  • Pure documentation, copy, or static content changes with no behavior.
  • Mechanical formatting, renames, or file moves.
  • Configuration-only changes where the right proof is a config validation/build/smoke check rather than a unit test.
  • One-off exploration before a behavior claim is made.
  • Cases where the repo has no realistic test harness and the user explicitly chooses a manual smoke check.

Core Loop

Use the smallest proof that matches the risk.

text
RED -> GREEN -> REFACTOR -> VERIFY

1. RED: Define The Failing Behavior

Before implementation, create or identify a check that should fail before the fix.

Good RED targets:

  • unit test for pure logic;
  • integration test for service/API/database boundaries;
  • component/browser test for UI behavior;
  • CLI command or smoke script for operational behavior;
  • minimal reproduction when no test harness exists.

For bugs, use the prove-it pattern:

text
Bug report -> failing reproduction -> minimal fix -> passing reproduction -> broader check

If no failing test can be added, state why and name the substitute proof:

text
No automated test added because <reason>.
Focused check: <command/manual smoke/repro script>.
Regression risk: <remaining gap>.

2. GREEN: Make The Smallest Fix

Write the minimum code that makes the RED check pass.

Do not mix in:

  • broad refactors;
  • unrelated cleanup;
  • dependency upgrades;
  • UI polish;
  • new features not covered by the behavior check.

If the minimum fix needs a design decision, stop and surface the decision before coding through it.

3. REFACTOR: Improve Safely

Refactor only after the behavior check is green.

Keep refactors behavior-preserving. Run the focused check after meaningful refactor steps. If a refactor changes behavior, it needs its own RED check or a scope note.

4. VERIFY: Expand Confidence

Run checks in widening circles:

  1. the focused failing test/check;
  2. nearby tests for the touched module;
  3. typecheck/lint/build if the stack uses them;
  4. broader suite or browser/manual smoke when the touched surface warrants it.

Do not rerun expensive broad checks repeatedly on unchanged code. Say what was run and what remains unverified.

Choosing Test Size

Prefer the smallest test that proves the behavior:

  • unit: pure functions, validation rules, data transforms;
  • integration: API handlers, database queries, service boundaries, auth checks;
  • component/browser: user-visible UI behavior, routing, forms, rendering;
  • smoke: deploy/runtime/CLI/config behavior where automated unit tests are not the right proof.

Avoid brittle tests that only assert implementation details unless the implementation detail is the contract.

Working In Existing Repos

Before adding tests:

  1. Read the existing test style and commands.
  2. Find the closest similar test.
  3. Use the repo's current runner and helpers.
  4. Avoid adding a new test framework unless the user explicitly approves.
  5. Keep test data small and deterministic.

If test commands or framework behavior are version-sensitive, use source-driven-development before inventing syntax.

Working With Bugs

When debugging-and-error-recovery has identified a root cause, use this skill to add the guard.

Bugfix checklist:

  • observed behavior is captured;
  • expected behavior is explicit;
  • failing reproduction exists or the no-test reason is stated;
  • fix makes the reproduction pass;
  • nearby regressions are checked.

Do not close a bug only because the code changed. Close it when the proof passes or the user explicitly accepts the remaining gap.

Working With Production And External Systems

For production, data, auth, billing, routing, webhooks, email, CRM, Notion, Linear, GitHub, Directus, Cloudflare, VPS, or other live systems:

  • keep the first pass read-only unless a bounded mutation is approved;
  • prefer dry-runs, local fixtures, staging, or smoke checks over live writes;
  • do not create synthetic production data without approval;
  • record the exact check and rollback/evidence path when relevant.

Tests and smoke checks are evidence, not approval to deploy or mutate production.

Common Rationalizations

RationalizationReality
"This is obvious."Obvious behavior still regresses. A small check protects it.
"I'll add tests after."After-the-fact tests often mirror the implementation instead of proving the requirement.
"There are no tests here."Then state that and create the smallest focused check instead of pretending it is proven.
"The bug is fixed because I changed the code."The bug is fixed when the failing scenario passes.
"A snapshot is enough."Snapshots rarely prove behavior unless the rendered output is the contract.

Red Flags

  • Claiming a bug is fixed without reproducing it first.
  • Adding implementation code before defining expected behavior.
  • Updating tests to match new behavior without explaining why the expectation changed.
  • Removing a failing test instead of understanding it.
  • Adding broad mocks that hide the real boundary being tested.
  • Treating manual "looks good" as enough for risky behavior changes.
  • Skipping verification because the change is small but user-visible.

Output Shape

Use this compact report:

text
TDD report:
- Behavior: <what should be true>
- RED: <test/check that failed or no-test reason>
- GREEN: <minimal fix>
- Guard: <test/check now protecting behavior>
- Verification: <commands/checks and results>
- Remaining risk: <if any>

For user-facing durable notes, write explanatory prose in the user's language and keep commands, paths, env vars, test names, and package names in their exact form.

Verification

Before finishing, confirm:

  • Expected behavior was stated before or alongside implementation.
  • A failing test/check existed, or a no-test reason was stated.
  • The implementation was the smallest reasonable fix for that behavior.
  • The focused test/check passed after the fix.
  • Broader checks were run when the touched surface warranted them.
  • Remaining unverified risk was stated plainly.

Heefeg gestallte Froen

Wat mécht de KI-Skill Test Driven Development?

Drives behavior changes through tests or explicit focused checks before implementation. Use when implementing new logic, fixing a bug, changing behavior, adding edge-case handling, modifying validation, refactoring behavior-sensitive code, or after debugging identifies a root cause that needs a regression guard. Also use when Codex is about to say a bug is fixed or behavior works but no proof exists yet.

Firwat Test Driven Development op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Test Driven Development besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Test Driven Development an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/pimenov/codex-first-skills-pack/tree/main/skills/test-driven-development an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Test Driven Development benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Test Driven Development benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Test Driven Development domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Test Driven Development gratis?

De Skill gëtt vum pimenov op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇