Agent skill

Superpowers Test Driven Development

by christopherarter in christopherarter/superpowers-reasonix

Writing or fixing any code?. An agent skill from christopherarter/superpowers-reasonix.

MITAuto-check passedTesting & QA

Install Superpowers Test Driven Development

skills CLI
$ npx skills add christopherarter/superpowers-reasonix --skill superpowers-test-driven-development -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install christopherarter/superpowers-reasonix superpowers-test-driven-development --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/christopherarter/superpowers-reasonix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/superpowers-test-driven-development .claude/skills/superpowers-test-driven-development && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
superpowers-test-driven-development
GitHub stars
102
Token cost
~1.9k tokens
SKILL.md length
669 words
Files
2 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Writing or fixing any code?. An agent skill from christopherarter/superpowers-reasonix.

  • Tasks that involve Test-driven development
  • SKILL.md covers Overview, When to Use, The Iron Law and Red-Green-Refactor, plus 9 more sections
  • Calls npm
  • Tasks that involve Failing and flaky tests

What it does

Superpowers Test Driven Development is an agent skill from christopherarter/superpowers-reasonix. Writing or fixing any code? Load first — write the failing test before the code.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/testing-anti-patterns.md`).

It sits in Testing & QA, covering Test-driven development and Failing and flaky tests. The repository describes itself as: Superpowers skill port to Reasonix coding harness. The licence is MIT.

When your agent uses it

  • Tasks that involve Test-driven development
  • Tasks that involve Failing and flaky tests

Example prompts

  • “/superpowers-test-driven-development”

What it can do on your machine

Read from SKILL.md and the folder at commit d202ba4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Superpowers Test Driven Development loads about 1.9k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 669 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from christopherarter/superpowers-reasonix at commit d202ba4, republished under its MIT licence (© christopherarter). 669 words, ~1,881 tokens.

Download SKILL.mdSave it as .claude/skills/superpowers-test-driven-development/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
superpowers-test-driven-development
description
Writing or fixing any code? Load first — write the failing test before the code.

Test-Driven Development (TDD)

Overview

Test first. Watch it fail. Write minimal code to pass.

Core principle: Didn't watch the test fail? You don't know it tests the right thing.

Break the letter of the rules = break the spirit.

When to Use

Always: new features, bug fixes, refactors, behavior changes.

Exceptions (ask your human partner): throwaway prototypes, generated code, config files.

"Skip TDD just this once"? Stop. That's rationalization.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Code before the test? Delete it. Start over. Don't keep it as "reference", don't "adapt" it, don't look at it. Delete means delete. Implement fresh from tests.

Red-Green-Refactor

dot
digraph tdd_cycle {
    rankdir=LR;
    red [label="RED\nWrite failing test", shape=box, style=filled, fillcolor="#ffcccc"];
    verify_red [label="Verify fails\ncorrectly", shape=diamond];
    green [label="GREEN\nMinimal code", shape=box, style=filled, fillcolor="#ccffcc"];
    verify_green [label="Verify passes\nAll green", shape=diamond];
    refactor [label="REFACTOR\nClean up", shape=box, style=filled, fillcolor="#ccccff"];
    next [label="Next", shape=ellipse];

    red -> verify_red;
    verify_red -> green [label="yes"];
    verify_red -> red [label="wrong\nfailure"];
    green -> verify_green;
    verify_green -> refactor [label="yes"];
    verify_green -> green [label="no"];
    refactor -> verify_green [label="stay\ngreen"];
    verify_green -> next;
    next -> red;
}
RED — write failing test

One minimal test. Shows what should happen.

<Good>
```typescript
test('retries failed operations 3 times', async () => {
  let attempts = 0;
  const operation = () => {
    attempts++;
    if (attempts < 3) throw new Error('fail');
    return 'success';
  };

const result = await retryOperation(operation);

expect(result).toBe('success'); expect(attempts).toBe(3); });

Clear name, real behavior, one thing
</Good>

<Bad>
```typescript
test('retry works', async () => {
  const mock = jest.fn()
    .mockRejectedValueOnce(new Error())
    .mockRejectedValueOnce(new Error())
    .mockResolvedValueOnce('success');
  await retryOperation(mock);
  expect(mock).toHaveBeenCalledTimes(3);
});

Vague name, tests mock not code </Bad>

One behavior. Clear name. Real code (no mocks unless unavoidable).

Verify RED — watch it fail

MANDATORY. Never skip. Run via bash:

bash
npm test path/to/test.test.ts

Confirm: fails (not errors), failure message is the expected one, fails because feature missing (not a typo).

Passes? Testing existing behavior — fix the test. Errors? Fix, rerun till it fails right.

GREEN — minimal code

Simplest code that passes.

<Good>
```typescript
async function retryOperation<T>(fn: () => Promise<T>): Promise<T> {
  for (let i = 0; i < 3; i++) {
    try {
      return await fn();
    } catch (e) {
      if (i === 2) throw e;
    }
  }
  throw new Error('unreachable');
}
```
Just enough to pass
</Good>
<Bad>
```typescript
async function retryOperation<T>(
  fn: () => Promise<T>,
  options?: {
    maxRetries?: number;
    backoff?: 'linear' | 'exponential';
    onRetry?: (attempt: number) => void;
  }
): Promise<T> {
  // YAGNI
}
```
Over-engineered
</Bad>

Don't add features, refactor other code, or "improve" past the test.

Verify GREEN — watch it pass

MANDATORY.

bash
npm test path/to/test.test.ts

Confirm: passes, other tests still pass, output pristine (no errors/warnings).

Fails? Fix code, not test. Other tests fail? Fix now.

REFACTOR — clean up

After green only: kill duplication, improve names, extract helpers. Stay green. Don't add behavior.

Repeat

Next failing test, next feature.

Good Tests

QualityGoodBad
MinimalOne thing. "and" in name? Split it.test('validates email and domain and whitespace')
ClearName describes behaviortest('test1')
Shows intentDemonstrates desired APIObscures what code should do

Common Rationalizations

ExcuseReality
"Too simple to test"Simple code breaks. Test takes 30 seconds.
"I'll test after"Tests passing immediately prove nothing.
"Tests after achieve same goals"Tests-after = "what does this do?" Tests-first = "what should this do?"
"Already manually tested"Ad-hoc ≠ systematic. No record, can't re-run.
"Deleting X hours is wasteful"Sunk cost. Keeping unverified code is tech debt.
"Keep as reference, write tests first"You'll adapt it. That's testing after. Delete means delete.
"Need to explore first"Fine. Throw away exploration, start with TDD.
"Test hard = design unclear"Listen to the test. Hard to test = hard to use.
"TDD will slow me down"TDD faster than debugging. Pragmatic = test-first.
"Manual test faster"Manual doesn't prove edge cases. You'll re-test every change.
"Existing code has no tests"You're improving it. Add tests for it.
Show full SKILL.md (246 more words)Show less

Red Flags — STOP and Start Over

  • Code before test
  • Test passes immediately, or you can't explain why it failed
  • "I'll test after" / "tests after achieve the same purpose"
  • "Keep as reference" / "adapt existing code"
  • "Already spent X hours, deleting is wasteful"
  • "TDD is dogmatic, I'm being pragmatic" / "this is different because…"

All mean: delete code, start over with TDD.

Example: Bug Fix

Bug: empty email accepted.

RED

typescript
test('rejects empty email', async () => {
  const result = await submitForm({ email: '' });
  expect(result.error).toBe('Email required');
});

Verify RED

bash
$ npm test
FAIL: expected 'Email required', got undefined

GREEN

typescript
function submitForm(data: FormData) {
  if (!data.email?.trim()) {
    return { error: 'Email required' };
  }
  // ...
}

Verify GREEN

bash
$ npm test
PASS

REFACTOR — extract validation for more fields if needed.

Verification Checklist

  • Every new function/method has a test
  • Watched each test fail before implementing
  • Each test failed for the expected reason (feature missing, not a typo)
  • Wrote minimal code to pass
  • All tests pass, output pristine
  • Tests use real code (mocks only if unavoidable)
  • Edge cases and errors covered

Can't check all? You skipped TDD. Start over.

When Stuck

ProblemSolution
Don't know how to testWrite the wished-for API. Assertion first. Ask your human partner.
Test too complicatedDesign too complicated. Simplify the interface.
Must mock everythingCode too coupled. Use dependency injection.
Test setup hugeExtract helpers. Still complex? Simplify design.

Debugging Integration

Bug? Write a failing test reproducing it. Follow the cycle — the test proves the fix and blocks regression. Never fix bugs without a test. (See superpowers-systematic-debugging.)

Testing Anti-Patterns

Adding mocks/test utils? Consult the Testing Anti-Patterns reference (auto-included below): testing mock not real behavior; test-only methods in prod classes; mocking without understanding deps.

Final Rule

Production code → test exists and failed first
Otherwise → not TDD

No exceptions without your human partner's permission.

© christopherarter, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/superpowers-test-driven-development of christopherarter/superpowers-reasonix.

  • SKILL.md
  • references/testing-anti-patterns.md

Open the folder on GitHubat commit d202ba4

Compare with similar skills

Superpowers Test Driven Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Superpowers Test Driven Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Superpowers Test Driven Development this skillchristopherarter/superpowers-reasonix102—~1.9kAutomated safety check: PassMIT
Openspec Plus TDDelastic/terraform-provider-elasticstack2101 repos~4.7kAutomated safety check: PassApache-2.0
Fix BugMelbourneDeveloper/dart_node1131 repos~709Automated safety check: NotesNone
Evanflow Debugevanklem/evanflow418—~760Automated safety check: PassCustom licence
TDDcodeaholicguy/ai-devkit1.6k—~838Automated safety check: PassApache-2.0
TDD Workflows TDD Greenaiskillstore/marketplace4306 repos~568Automated safety check: PassNone

Similar skills

  • Openspec Plus TDD

    elastic/terraform-provider-elasticstack

    Official

    MANDATORY skill that activates whenever code is written to implement an OpenSpec change task.

    210 GitHub starsUsed in 1 repo~4.7k tokens
    Testing & QAAuto-check passed
  • Fix Bug

    MelbourneDeveloper/dart_node

    Fix a bug using test-driven development. An agent skill from MelbourneDeveloper/dart_node.

    113 GitHub starsUsed in 1 repo~709 tokens
    Testing & QAAuto-check: notes
  • Evanflow Debug

    evanklem/evanflow

    Root-cause discipline for bugs, test failures, and unexpected behavior.

    418 GitHub stars~760 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • TDD

    codeaholicguy/ai-devkit

    AI DevKit · Test-driven development — write a failing test before writing production code.

    1.6k GitHub stars~838 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • TDD Workflows TDD Green

    aiskillstore/marketplace

    Implement the minimal code needed to make failing tests pass in the TDD green phase.

    430 GitHub starsUsed in 6 repos~568 tokens
    Testing & QAAuto-check passed
  • Test First Changes

    pdparchitect/noodle

    Test-first procedure for every behaviour change in Noodle. An agent skill from pdparchitect/noodle.

    141 GitHub stars~201 tokensUpdated today
    Testing & QAAuto-check passed

More from christopherarter/superpowers-reasonix

All 11 skills in this repo
  • Superpowers Systematic Debugging

    christopherarter/superpowers-reasonix

    Any bug, failing or flaky test, or surprise behavior?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Writing Skills

    christopherarter/superpowers-reasonix

    Creating, editing, or testing a Reasonix skill?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Brainstorming

    christopherarter/superpowers-reasonix

    Building a feature or starting from an idea?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Finishing A Development Branch

    christopherarter/superpowers-reasonix

    Branch finished, tests green?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Receiving Code Review

    christopherarter/superpowers-reasonix

    Got review feedback?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Using Git Worktrees

    christopherarter/superpowers-reasonix

    Feature work needing an isolated workspace, or executing a plan?

    102 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Superpowers Test Driven Development

What does Superpowers Test Driven Development do?

Writing or fixing any code?. An agent skill from christopherarter/superpowers-reasonix. Superpowers Test Driven Development is an agent skill from christopherarter/superpowers-reasonix. Writing or fixing any code?

When should I use Superpowers Test Driven Development?

Superpowers Test Driven Development fits situations like: tasks that involve Test-driven development; tasks that involve Failing and flaky tests.

How do I install Superpowers Test Driven Development in Claude Code?

Run `npx skills add christopherarter/superpowers-reasonix --skill superpowers-test-driven-development -a claude-code`. Or copy the skill folder (skills/superpowers-test-driven-development in christopherarter/superpowers-reasonix) into .claude/skills/superpowers-test-driven-development in your project. Claude Code loads it when a task matches its description.

How do I install Superpowers Test Driven Development in Codex?

Run `npx skills add christopherarter/superpowers-reasonix --skill superpowers-test-driven-development -a codex`. Or copy the skill folder (skills/superpowers-test-driven-development in christopherarter/superpowers-reasonix) into .agents/skills/superpowers-test-driven-development in your project. Codex loads it when a task matches its description.

Can I use Superpowers Test Driven Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add christopherarter/superpowers-reasonix --skill superpowers-test-driven-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/superpowers-test-driven-development, .gemini/skills/superpowers-test-driven-development, .github/skills/superpowers-test-driven-development and .opencode/skills/superpowers-test-driven-development in your project.

What does Superpowers Test Driven Development need to run?

Going by SKILL.md and its folder, Superpowers Test Driven Development needs the command-line tools its instructions call (npm).

Does Superpowers Test Driven Development access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Superpowers Test Driven Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Superpowers Test Driven Development use?

Superpowers Test Driven Development is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Superpowers Test Driven Development use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Superpowers Test Driven Development?

Skills that share tags, products or a category with Superpowers Test Driven Development: Openspec Plus TDD (elastic/terraform-provider-elasticstack, 210 stars), Fix Bug (MelbourneDeveloper/dart_node, 113 stars), Evanflow Debug (evanklem/evanflow, 418 stars) and TDD (codeaholicguy/ai-devkit, 1.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Superpowers Test Driven Development?

christopherarter (a GitHub user) maintains it in christopherarter/superpowers-reasonix, which has 102 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 20, 2026.

Source: christopherarter/superpowers-reasonix on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.