Skill review

The test-driven-development skill, reviewed

From obra/superpowers. Kin scored it 70/100 and says: worth a look. Number 23 of 30 reviewed skills.

Reviewed on November 7, 2026. The skill may have changed since: read it on GitHub.

Kin, the Briefkin mascotA small dark card with two round eyes, brows, a mouth and an amber dot on its corner.

obra/superpowers · skills/test-driven-development/SKILL.md

B
70/100Good
Worth a look

test-driven-development

“A strict TDD drill for agents: red, green, refactor, and delete any code that dared to come first”

Post on X

What it does

Makes the agent work test-first: write one failing test, watch it fail for the right reason, write minimal code, run the whole suite, then refactor. Code written before its test gets deleted, and a long table rebuts the usual excuses.

When the agent uses it
Before writing implementation code for any feature, bug fix, refactor or behavior change, which means almost every coding task.
Who it is for
Teams who want agents to prove each change with a test that failed first; skip it for prototypes, or if you don't want an agent throwing away code.
What it costs
256 lines, about 2.6k tokens once the agent loads it.
The description the agent sees

Use when implementing any feature or bugfix, before writing implementation code

What it tells the agent to do

  1. Write one minimal test for one behavior, using real code and avoiding mocks
  2. Run it and confirm it fails because the feature is missing, not because of a typo or error
  3. Write the simplest code that passes, with no extra options or features
  4. Run the test, then the project's full suite; the output must be clean and every failure reported by name
  5. Refactor only while green: remove duplication, improve names, extract helpers
  6. Repeat for the next behavior, then tick the verification checklist before calling it done
  7. If code was written before its test, delete it and start over

Lines worth reading

Straight from the file, with why each one matters.

  1. line 37Write code before the test? Delete it. Start over.

    The Iron Law in one line. It is bracing as a principle, but in a real repo it tells the agent to throw away code.

  2. line 192test you watched scroll past and didn't mention is a report falsified

    A sharp honesty rule: run the whole suite, even when the task named one file, and report failures you didn't cause.

  3. line 14Violating the letter of the rules is violating the spirit of the rules.

    This shuts down the 'spirit not ritual' loophole before the agent can reach for it.

  4. line 160// YAGNI

    The over-engineered example's whole body is a comment that it isn't needed. A small, good joke.

  5. line 216read [writing-good-tests.md](writing-good-tests.md) for the rules

    It points to a reference file, but no other files could be listed in the folder, so the link may lead nowhere.

Watch out for

  • Medium

    The agent is told to delete code that predates a test, with no step asking the user first. It could discard your work-in-progress.

    line 254**All of these mean: Delete code. Start over with TDD.**
  • Low

    The description fires on any feature or bug fix, so the skill loads on nearly every coding task, including ones where TDD doesn't fit.

    line 3Use when implementing any feature or bugfix, before writing implementation code
  • Low

    It may widen the scope of a change by adding tests to legacy code the task didn't touch.

    line 236You're improving it. Add tests for existing code.

The scorecard

  • TriggerSays when to use it
    6/10

    Says when but not what; only the name reveals it's TDD. Very broad trigger.

  • FocusOne clear job
    8/10

    One job, test-first development, held tightly throughout.

  • LeanLight to load
    7/10

    About 330 lines; the rationalization tables argue more than they instruct.

  • ConcreteSteps you can follow
    8/10

    Real commands, good/bad examples, a worked bug fix and a checklist. The commands assume npm.

  • SafeSafe to run
    6/10

    No network or secrets, but it orders code deletion without asking.

What it does well

  • Verify RED is spelled out: the test must fail for the expected reason, not error out or fail on a typo.
  • Paired good/bad examples for both the test and the implementation make 'minimal' concrete.
  • Requires a full-suite run and naming every failure, which closes the 'my one test passed' loophole.

How it could be better

  1. Ask before deleting code

    Deleting code without permission can destroy the user's work; the rule should apply only to code the agent wrote, or come after a confirmation.

    Add
    If implementation code exists without a failing test, stop. Delete it only if you wrote it in this session; otherwise ask your human partner before deleting or setting it aside.
  2. Say what the skill does in the description

    The agent sees only the description, and it never mentions tests or the red-green cycle.

    Add
    description: Test-driven development: write a failing test, watch it fail, write minimal code to pass, run the full suite, refactor. Use when implementing a feature, fixing a bug or changing behavior, before writing implementation code.
  3. Ship or drop writing-good-tests.md

    SKILL.md tells the agent to read this file whenever it touches a test, but no sibling file could be found.

    Add
    When writing or changing any test, read [writing-good-tests.md](writing-good-tests.md) <add this file next to SKILL.md, or inline its four rules here and remove the link>.
  4. Use the repo's test command, not just npm

    The Verify steps hardcode npm test, which misleads the agent in Python, Rust or Go projects.

    Add
    Run the single test with the project's runner (<e.g. npm test path/to/file, pytest path::test_name, cargo test name>), then run the full suite with <project test command>.

Kin reviews against Anthropic’s Extend Claude with skills and agentskills.io’s the Agent Skills standard. It reads SKILL.md only, so a script beside it can still do things the file does not say.

Thinking of installing another skill?

Link it or paste its SKILL.md and Kin reviews it the same way. Free, no sign-up.

Review a skill

More reviewed skills

Skills run while you look away.

Briefkin shows every Claude Code, Codex and Cursor session on one board: working, waiting on you, done. Answer them from your phone. Free in the open beta.

Make your board