Dev & Engineering

Test-Driven Development

Prove expected behavior with a failing test before writing implementation code.

52/ 100
Use with care

Useful, but reliability, evidence or controls still have material gaps.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 299k
Last updated
15d ago
License
MIT
test-driven-developmentautomated-testingunit-testingred-green-refactor
+1refactoring

What does this skill do, and when should you use it?

This is the test-driven-development skill inside the Superpowers repository, and it requires tests before production code. It enforces a Red-Green-Refactor loop: verify that a test fails for the expected reason, write the minimum code needed to pass, then refactor while keeping the tests green. It applies to new features, bug fixes, refactoring, and behavior changes; throwaway prototypes, generated code, and configuration files require approval from a human partner. It fits developers who want explicit behavior records, regression protection, and safer refactoring.

It instructs the developer to write one minimal test for a concrete behavior, using real code rather than mocks unless unavoidable; run the test and confirm that it fails because the feature is missing; write the simplest production code that passes; rerun the test suite and confirm that the output is clean and other tests still pass; then refactor without adding behavior and repeat for the next behavior. It also supplies test-quality criteria, rationalization counters, restart conditions, a completion checklist, and a regression-testing workflow for debugging.

Good fit
  • A developer is implementing a new feature and wants the expected behavior defined before implementation.
  • A maintainer is fixing a bug and needs a failing reproduction that prevents regression.
  • A team is refactoring existing code and wants tests to verify that behavior remains unchanged.
  • A developer is improving legacy code with little coverage and needs to add tests around existing behavior.
  • A team frequently relies on manual checks or postpones testing and needs a stricter implementation workflow.

How do you install this skill?

Before you use it
  • Before applying the “delete code written before tests” rule, confirm version control, backups, and a recoverable workspace to avoid deleting existing user work.
  • npm test is only an example; verify the project’s test framework, dependencies, and test-path syntax first.
  • For legacy systems, rapid prototypes, and configuration changes, do not apply the no-exceptions rule mechanically; obtain user confirmation and record the rationale for deviations.
Before you start
Your agent needs
  • Shell / CLI
  • Local filesystem

No standalone installation procedure is documented for this skill; it is located at skills/test-driven-development/ in obra/superpowers. The README says Superpowers is a collection of 14 skills and should be installed separately for each coding-agent harness. For example, Claude Code supports /plugin install superpowers@claude-plugins-official; Codex CLI supports /plugins, searching for superpowers, and selecting Install Plugin. Other harness instructions are provided in the repository README.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/obra/superpowers.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/skills/test-driven-development" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Use test-driven-development: write a failing test for this behavior, run it to verify the failure, then implement the minimum code and verify it passes.

Trigger it before implementing a feature, fixing a bug, refactoring, or changing behavior. Example prompt: “Use test-driven-development: write a failing test for this behavior, run it to verify the failure, then implement the minimum code and verify it passes.” The example test command is: npm test path/to/test.test.ts. Ask the human partner before treating a throwaway prototype, generated code, or configuration file as an exception.

What are this skill's strengths and limitations?

Pros
  • Requires observing the expected failure, helping prove that the test detects missing behavior.
  • Constrains implementation to the minimum needed and supports later refactoring.
  • Covers common development work including features, fixes, refactors, and behavior changes.
  • Includes completion checks, a debugging regression workflow, and testing anti-pattern guidance.
Limitations
  • The rules are strict and normally reject writing production code before the test.
  • The listed exceptions require approval from a human partner.
  • The example uses npm test, but the skill does not define a project-specific test framework or command.
  • The skill has no documented standalone installation flow and is installed through Superpowers.

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
Test-Driven Development this page 52 · Use with care ★ 299k 15d ago MIT
Test-Driven Development Workflow 57 · Use with care ★ 107k 12d ago MIT
TDD Guard 61 · Recommended ★ 2.4k 13d ago MIT
Test-Driven Skill Authoring 44 · Not recommended ★ 299k 15d ago MIT
RenderCV Testing Context 61 · Recommended ★ 18k 7mo ago MIT

Compared with writing tests after implementation, this skill uses tests first to answer “what should this do?” and uses the observed failure as evidence that the test is meaningful. Compared with manual testing, it emphasizes repeatability, recorded behavior, and regression detection.

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Use with care
52/ 100 5-point scale 2.6 / 5
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
1Trust14 / 25 · 2.8/5

The skill scopes itself to a development workflow and requires asking the human partner for exceptions; there is no evidence of credential theft, covert exfiltration, or malicious external actions. Deductions apply because the “delete code written before tests” rule is potentially destructive without backup, rollback, or workspace-boundary guidance. Sensitive-data handling, dependency security, and data-flow disclosure are absent, and publisher identity is unverified by FollowSkills.

2Reliability9 / 20 · 2.3/5

The document is coherent and gives a detailed RED-GREEN-REFACTOR process, failure branches, and a testing anti-pattern reference. Deductions apply because test framework, installation prerequisites, cross-project command adaptation, and diagnostics for unavailable commands are unspecified; the example also has a minor consistency issue between a synchronous operation and a Promise-typed function. Static calibration caps this at 10.

3Adaptability9 / 15 · 3.0/5

Invocation is clear for new features, bug fixes, refactoring, and behavior changes, with exceptions for prototypes, generated code, and configuration files. Deductions apply because the “always” and “no exceptions” language is dogmatic, boundaries for legacy code and non-test tasks are underdeveloped, and there is no Chinese-language support guidance. Core function does not depend on overseas services.

4Convention9 / 15 · 3.0/5

The skill provides clear headings, progressive workflow, examples, a checklist, an anti-pattern reference, and troubleshooting guidance; repository context supplies an MIT license, version, maintainer, update path, and contribution process. Deductions apply because the skill itself lacks versioning, changelog, dependency-install notes, and an explicit maintenance owner, while reachability of the referenced file is only indirectly supported by the supplied materials.

5Effectiveness7 / 15 · 2.3/5

The skill gives a directly usable TDD cycle, test-quality criteria, failure verification, and completion checklist, with a clear goal of reducing omissions and regressions. Deductions apply because no execution evidence for this skill is provided, the strict deletion rule can impose unnecessary cost, and alternatives for rapid prototypes or legacy systems are not compared. Static calibration caps this at 7.

6Verifiability4 / 10 · 2.0/5

Concrete commands, code examples, checklists, and sample failure output make the guidance partly auditable. The repository also claims behavioral and CI tests exist, but the supplied evidence does not show actual results or committed coverage of this skill’s key paths. Static calibration caps this at 5.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 19, 2026 Reviewed revision d884ae04edeb Review evidence[1][2][3][4][5][6][7][8]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Can this skill be installed by itself?
The source only documents it as part of obra/superpowers, a 14-skill collection, and does not provide a standalone installation procedure.
When can TDD be skipped?
Throwaway prototypes, generated code, and configuration files are listed as exceptions, but a human partner must approve the exception.
What if the test passes immediately?
Fix the test; an immediate pass usually means it is testing existing behavior rather than exposing the missing feature.
Does it require mocks?
No. It prefers real code and permits mocks only when they are unavoidable.

More skills from this repository

All from obra/superpowers

Dev & Engineering

Test-Driven Skill Authoring

Create, revise, and verify Agent Skills with a test-driven documentation workflow.

★ 299k FS 44 Not recommended 15d ago
Dev & Engineering

Parallel Agent Dispatch

Delegate independent engineering problems to focused agents and investigate them concurrently.

★ 299k FS 50 Use with care 15d ago
Dev & Engineering

Systematic Debugging

Find the root cause before changing code, reducing trial-and-error rework.

★ 299k FS 48 Use with care 15d ago
Dev & Engineering

Executing Plans

Turn a written implementation plan into verified, checkpointed development work.

★ 299k FS 54 Use with care 15d ago
Dev & Engineering

Continuous Code Review

Dispatch focused reviews after tasks, major features, and before merges to catch problems early.

★ 299k FS 53 Use with care 15d ago
Dev & Engineering

Writing Plans

Turn multi-step software requirements into executable, testable implementation plans.

★ 299k FS 53 Use with care 15d ago
Dev & Engineering

Isolated Git Workspace

Creates an isolated workspace for feature work, then prepares the project and verifies its clean test baseline.

★ 299k FS 52 Use with care 15d ago
Dev & Engineering

Design Before Code

Clarify intent, compare approaches, and secure an approved design before implementation begins.

★ 299k FS 50 Use with care 15d ago
Dev & Engineering

Verification Before Completion

Require fresh evidence before claiming work is complete, fixed, or passing.

★ 299k FS 48 Use with care 15d ago
Dev & Engineering

Development Branch Finisher

Safely close completed development work after tests pass, with guided merge, PR, retention, or discard choices.

★ 299k FS 44 Not recommended 15d ago
Dev & Engineering

Superpowers Skill Bootstrap

Ensures applicable skills are discovered and invoked before every response or action.

★ 299k FS 35 Not recommended 15d ago
Dev & Engineering

Rigorous Code Review Reception

Verify review feedback before changing code, then act on technical evidence.

★ 299k FS 52 Use with care 15d ago
Dev & Engineering

Subagent-Driven Development

Execute independent implementation tasks with fresh agents and review gates.

★ 299k FS 50 Use with care 15d ago

Related skills