No slash command · from Superpowers
Applies behavior-driven development with Gherkin scenarios and TDD. Activates when implementing features, fixing bugs, or writing executable specifications before production code.
Ships in Superpowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill provides a comprehensive guide to applying Behavior-Driven Development principles to your coding tasks. BDD is not just about tools; it's a methodology for shared understanding and high-quality implementation.
When the user asks for a feature, bug fix, or refactor, apply the following mindset:
The process flows from requirements to code:
See ./references/bdd-best-practices.md for a detailed guide.
Scenarios are your "Executable Specifications".
bdd-specs.md as the planning-stage scenario inventory in the superpowers workflow. During brainstorming and plan writing, keep the reviewed Given/When/Then scenarios in docs/plans/.../bdd-specs.md so design review, task decomposition, and sprint contracts all read from the same source..feature files or the framework-native executable test format. bdd-specs.md is for design and planning; .feature files are for automation and living documentation.See ./references/gherkin-guide.md for syntax and storage structure.
The engine of implementation:
"No production code is written without a failing test first."
The Red step MUST verify the test fails for the right reason (run the test and read the failure output) before writing any implementation. Skipping or rationalizing this step produces:
Delete it and re-derive it from a failing test — do not keep it "as reference," do not "adapt" it into the test-first version, do not read it while writing the test. Any of those re-introduces the implementation-biased-test failure mode above through the back door: a test written while looking at the code it's meant to constrain will pass on the first try regardless of whether it checks the right thing. Delete means delete.
| Rationalization | Why it fails |
|---|---|
| "I'll write the test after — same coverage either way" | A test written against working code always passes on the first run. That proves the test doesn't crash, not that it verifies the right behavior. Only a test that failed first, for the stated reason, has been shown capable of catching a regression. |
| "I already manually verified it works" | Manual verification is not repeatable and leaves no regression guard. It answers "did this work once," not "will this keep working." |
| "This is too simple to need a test" | Simple code changes behavior just as easily as complex code. The Iron Law has no complexity threshold — it has the three named exceptions below and nothing else. |
| "I'll be pragmatic, not dogmatic, about TDD" | This is the rationalization, not an alternative to it. Every one of these tables' entries is someone being "pragmatic" about skipping the Red step. |
| "I already spent an hour on this, deleting it is wasteful" | Sunk cost. The hour is already spent whether you delete the code or keep it; keeping untested code doesn't recover that hour, it just adds an unverified regression risk on top of it. |
The only legitimate exceptions are named in ./references/bdd-best-practices.md (one-off prototypes, generated code, config files) — and even those should be raised with the user, not silently assumed.
A test-first test encodes "this is what the system is contracted to do." A test-after test encodes "this is what the code I already wrote happens to do" — it will pass even if the code has the wrong behavior, because it was shaped to match that behavior rather than an independent specification. If you catch yourself writing a test against code you can already see, stop, delete the code, and write the test against the behavior instead.
./references/bdd-best-practices.md - BDD methodology, discovery, formulation, and automation./references/gherkin-guide.md - Gherkin scenario syntax, storage structure, and examples./references/testing-anti-patterns.md - Mocking pitfalls and other ways tests can pass without verifying real behaviorWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
bdd, gherkin, tdd, test-driven-development, executable-specifications
8 skills in this plugin
/brainstormingDesigns new software features and multi-component changes for the current repo into implementation-ready BDD specs via autonomous codebase research, then commits the design for review (runs to completion without mid-design questions). Use when starting a new feature, greenfield design, or multi-component change, or invoking /superpowers:brainstorming. Not for hardware/physical-system design, out-of-repo questions, single-file refactors, or known-root-cause bugs (those go to direct edits or systematic-debugging)./executing-plansExecutes a written implementation plan via per-batch sub-agent coordinators with verification and commits between batches. Use when a plan exists and the user wants it executed, or invokes /superpowers:executing-plans <plan-path>./receiving-code-reviewUse when the superpowers-evaluator returned REWORK on a batch, when fixing rework items from an evaluation report, or when receiving any code review feedback on superpowers output. Requires technical rigor and verification instead of performative agreement or blind implementation./retrospectiveAnalyzes evaluation patterns across completed plans and evolves the superpowers checklists accordingly. Use after executing-plans completes, or when the user asks to review completed plans and update the checklists via /superpowers:retrospective./systematic-debuggingDiagnoses a reported bug, error, test failure, or unexpected behavior through a 4-phase root-cause analysis before any code changes. Use when the user reports a bug or test failure with an unknown root cause, or invokes /superpowers:systematic-debugging "<symptom>". Not for bugs with a named root cause (edit directly)./verification-before-completionUse when about to claim work is complete, fixed, or passing, before committing, before reporting a task done, or before telling the evaluator the batch is ready. Requires running the verification command and reading its output in this turn before any success claim; evidence before assertions always.npx claudepluginhub fradser/dotclaude --plugin superpowersOther plugins' skills for the same job