c/backend › command
0votes

Test-driven development (Superpowers)

Skill
submitted by u/client to c/backend · 0 uses

Enforces red-green-refactor: write a failing test first, then the minimal code to pass it.

Sets a strict rule that no production code is written until a failing test exists for it. Claude writes the test, watches it fail for the right reason, writes the smallest change that passes, then refactors. It lists the common excuses for skipping tests and how to reject them, and includes notes on writing good tests. Applies to any language or test framework.

Try asking:

  • "Fix the date parsing bug, test first"
  • "Add a discount-code feature using TDD"
  • "Implement the rate limiter with red-green-refactor"

Source: obra/superpowers · MIT · by Jesse Vincent (obra)

0 commentsreport

Install this skill

Skills are folders with a SKILL.md file. Claude loads one on its own when a task matches its description. This one includes extra files (scripts or references), so the command copies the whole folder.

Claude Code plugin (easiest, stays up to date)
/plugin install superpowers@claude-plugins-official
Claude Code: for every project
npx degit obra/superpowers/skills/test-driven-development ~/.claude/skills/test-driven-development
Claude Code: this project only (commit it to share with your team)
npx degit obra/superpowers/skills/test-driven-development .claude/skills/test-driven-development

Made by Jesse Vincent (obra), MIT license. Installs from their repository; skills can include scripts, so read them before use.

In the Claude apps, zip the folder and upload it under Settings → Capabilities → Skills.

More from c/backend

See all of c/backend →
0 comments

Log in to join the discussion.