tests-first

tests-first

€7,00
Sale price  €7,00 Regular price 
Skip to product information
tests-first

tests-first

€7,00
Sale price  €7,00 Regular price 

After this, the AI writes a failing test that reproduces the desired behaviour BEFORE writing any production code — bugs caught at write-time, regression coverage as a by-product.

For developers who agree TDD is correct but can't get the AI to do it without reminding it.

Before: "Add validation: password must be 8+ chars with one number"

[Writes the validation function directly. Looks fine. Three weeks later you discover passwords with only numbers and no letters pass. No test, no signal.]

After: "Add validation: password must be 8+ chars with one number"

Test first:
  expect(validate("pass")).toBe(false)        // too short
  expect(validate("password")).toBe(false)    // no number
  expect(validate("password1")).toBe(true)    // valid
  expect(validate("12345678")).toBe(false)    // numbers only — the gotcha

Runs tests — three pass, one fails (the gotcha catches it).
NOW writes the production code to make all four pass.

Use when

  • starting a new feature or bug fix
  • "TDD this"
  • an existing change has no test covering it

Three ways to use this

  1. Paste it (any AI, 30 seconds, no install)
    Open the .md file, copy contents, paste into Claude / ChatGPT / Cursor / Perplexity with: "Read this and apply it whenever the task it describes comes up in our conversation." Done.
  2. Install it (Claude Code / Cursor users)
    Drop the unzipped folder into ~/.claude/skills/ (Claude Code), .cursor/skills/ (Cursor), or your IDE's equivalent. Auto-loads next session.
  3. New to AI assistants? Get Claude free at claude.ai, then use Option 1.

€7

You may also like