agentleFS
karim-embarekkarim-embarek/superpowers-antigravity/skills/superpowers-tdd/SKILL.md

superpowers-tdd

Skill2 starsChanged 3 months agoMITView on GitHub

Enforces Test-Driven Development (RED-GREEN-REFACTOR cycle). Ensures failing tests precede code implementation and eliminates untested slop.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill whenever implementing new functionality, refactoring code, or fixing bugs.

    line 8
  2. Distinctive:

    Write a minimal unit, integration, or E2E test describing the expected behavior.

    line 16
  3. Distinctive:

    Run the test suite and confirm:

    line 17
  4. Distinctive:

    Write the minimal production code required to make the failing test pass.

    line 22
  5. Distinctive:

    Do not add speculative code, extra fields, or future features.

    line 23
  6. Distinctive:

    Run the test suite and confirm the test passes.

    line 24
  7. Distinctive:

    Ensure all tests remain 100% GREEN.

    line 28
  8. Distinctive:

    Testing Implementation Details: Test contracts and outputs, not internal private variables.

    line 31
  9. Very specific:

    Flaky Tests: Avoid hardcoded delays (sleep(1000)).

    line 32
  10. Distinctive:

    Deleting Tests to Pass: Never delete or comment out failing assertions to claim completion.

    line 33

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Superpowers: Test-Driven Development (TDD) Skill

Use this skill whenever implementing new functionality, refactoring code, or fixing bugs.

Core Axiom

No production code shall be written unless a failing test requires it.

RED-GREEN-REFACTOR Protocol

Phase 1: RED (Write Failing Test)

  1. Write a minimal unit, integration, or E2E test describing the expected behavior.
  2. Run the test suite and confirm:
    • The test fails.
    • The failure reason matches the expected missing feature (not a syntax error or typo).

Phase 2: GREEN (Make Test Pass)

  1. Write the minimal production code required to make the failing test pass.
  2. Do not add speculative code, extra fields, or future features.
  3. Run the test suite and confirm the test passes.

Phase 3: REFACTOR (Clean Code)

  1. Refactor the code for clarity, performance, and adherence to design patterns.
  2. Ensure all tests remain 100% GREEN.

Testing Anti-Patterns to Avoid

  • Testing Implementation Details: Test contracts and outputs, not internal private variables.
  • Flaky Tests: Avoid hardcoded delays (sleep(1000)). Use dynamic assertion waiting.
  • Deleting Tests to Pass: Never delete or comment out failing assertions to claim completion.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.