Dev & Engineering test-driven-developmentautomated-testingunit-testingred-green-refactorrefactoring

Test-Driven Development

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

FollowSkills review · FSRS-2.0
Use with care
52/ 100 5-point scale 2.6 / 5
1 2 3 4 5 6
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.

Evidence confidence:Low Reviewed Jul 19, 2026 Reviewed revision d884ae04edeb
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.
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.
Review evidence [1][2][3][4][5][6][7][8]
See the full review method →

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.

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

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 do you install this skill?

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.

How do you use this skill?

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.

How does this skill compare with similar options?

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.

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.

Dev & Engineering

Parallel Agent Dispatch

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

Dev & Engineering

Systematic Debugging

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

Dev & Engineering

Executing Plans

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

Dev & Engineering

Continuous Code Review

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

Dev & Engineering

Writing Plans

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

Dev & Engineering

Isolated Git Workspace

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

Dev & Engineering

Design Before Code

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

Dev & Engineering

Verification Before Completion

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

Dev & Engineering

Development Branch Finisher

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

Dev & Engineering

Superpowers Skill Bootstrap

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

Dev & Engineering

Rigorous Code Review Reception

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

Dev & Engineering

Subagent-Driven Development

Execute independent implementation tasks with fresh agents and review gates.

Related skills