{
  "id": "test-driven-development",
  "handle": "test-driven-development",
  "canonicalUrl": "https://bestskillsforclaude.com/en/skills/test-driven-development",
  "language": "en",
  "alternates": {
    "en": "https://bestskillsforclaude.com/en/skills/test-driven-development",
    "es": "https://bestskillsforclaude.com/es/skills/test-driven-development",
    "pt-BR": "https://bestskillsforclaude.com/pt-br/skills/test-driven-development",
    "ja": "https://bestskillsforclaude.com/ja/skills/test-driven-development"
  },
  "category": {
    "id": "engineering-discipline",
    "name": "Engineering discipline"
  },
  "publisher": {
    "name": "Jesse Vincent (obra)",
    "url": "https://github.com/obra"
  },
  "source": "https://github.com/obra/superpowers",
  "documentation": null,
  "licenseAsStated": "MIT",
  "runtime": "Claude Code and other supported coding agents",
  "lastReviewed": "2026-08-05",
  "headline": "Why does test driven development work better with an agent than without one?",
  "summary": "Because the failing test is the only thing that proves the agent understood the request.",
  "verdict": "The test-driven-development skill in Jesse Vincent's superpowers collection drives the agent through a red, green, refactor cycle: a failing test first, the smallest change that passes it, then cleanup. With an agent the failing test does double duty, because it also proves the agent understood the requirement before it started writing code.",
  "bestFor": "Features and bug fixes with checkable behaviour, especially in code you cannot manually verify quickly.",
  "skipIf": "You are exploring, prototyping or throwing the code away tomorrow.",
  "keyTakeaways": [
    "A failing test is a specification the agent cannot talk its way around.",
    "Watch the test fail. An agent that skips to green has usually written a test that cannot fail.",
    "Small cycles are the point. Large ones give the same false confidence as no tests.",
    "It is one skill inside a wider methodology, and works best with writing-plans alongside it."
  ],
  "quickStart": [
    "Install superpowers from obra/superpowers, published under MIT.",
    "Insist on seeing the test fail before any implementation is written.",
    "Keep each cycle to one small behaviour, because a large cycle hides which part actually failed."
  ],
  "sections": [
    {
      "heading": "What it changes in practice",
      "paragraphs": [
        "The hardest problem in agent assisted coding is not capability, it is verification. The agent believes it succeeded, the diff looks reasonable, and nobody has checked anything. A failing test converts belief into a mechanical fact.",
        "It also front loads misunderstandings. If the agent writes a test that asserts the wrong behaviour, you find out in the first minute rather than after a large implementation is built on the misunderstanding."
      ]
    },
    {
      "heading": "Where it disappoints",
      "paragraphs": [
        "Tests that assert what the implementation happens to do are worse than no tests, because they lock a defect in place. Read the test, not just the result.",
        "It is also poorly suited to exploration. When you do not yet know what correct looks like, writing the assertion first is guessing with extra steps."
      ]
    }
  ],
  "faq": [
    {
      "question": "Why insist on seeing the test fail?",
      "answer": "A test that passes before the implementation exists is not testing anything. Watching it fail is the cheapest check available."
    },
    {
      "question": "Does this slow the agent down?",
      "answer": "Per change, yes. Across a week it is usually faster, because it removes the rework caused by unverified changes."
    },
    {
      "question": "Is it separate from the rest of superpowers?",
      "answer": "It is one skill in a larger methodology. It works alone, and works better next to writing-plans and verification-before-completion."
    }
  ],
  "sources": [
    {
      "label": "obra/superpowers on GitHub",
      "url": "https://github.com/obra/superpowers",
      "kind": "repository"
    },
    {
      "label": "Agent skills directory listing",
      "url": "https://skills.sh",
      "kind": "directory"
    }
  ],
  "machineReadable": {
    "markdown": "https://bestskillsforclaude.com/en/skills/test-driven-development/content.md",
    "json": "https://bestskillsforclaude.com/en/skills/test-driven-development/skill.json"
  },
  "disclosure": "Editorial desk review based on the publisher's own repository. Not a security audit, a benchmark or a guarantee of maintenance."
}