agentleFS
Facta-DevFacta-Dev/beautifulnodejs/.claude/skills/tdd/SKILL.md

tdd

Skill0 starsChanged 31 days agoMITView on GitHub

Drives an <app> change test-first through the red, green, refactor loop, one seam at a time, with integration tests at the boundaries.

193 other projects use a version of this, 58 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use capture-learning-tools, design-frontend-dev and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • The-Vibe-CompanySkill

    capture-learning-tools

    Turn technical conversations, bugs, CI failures, review comments,

    Also in 5 projects that use this

  • The-Vibe-CompanySkill

    design-frontend-dev

    Clean Impeccable frontend design skill. Use when the user wants to

    Also in 5 projects that use this

  • jaydubya818Skill

    figure-it-out

    Use when novel or multi-phase work needs an auditable workflow and no narrower playbook fits.

    Also in 66 projects that use this

  • shiwenbin1617Skill

    ketchup-video

    Catch the user up like /ketchup, with a short subtitled video of slides for what happened and the waiting calls as text under it. Use for /ketchup-video.

    Also in 24 projects that use this

  • simo97Skill

    request-refactor-plan

    Use this skill when user wants to create a refactor plan.

    Also in 47 projects that use this

  • jaydubya818Skill

    principle-minimize-reader-load

    Apply when layers, wrappers, or hidden state make simple behavior hard to follow.

    Also in 57 projects that use this

  • +3 more from The-Vibe-Company
  • +2 more from jaydubya818

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 189 edited versions we read keep these.

  • 4

    Distinctive

    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:

    Do NOT activate this skill when the change is documentation-only, a mechanical rename, or a configuration edit with no behaviour to pin …

    line 25
  2. Distinctive:

    Red before green: Write the failing test first, then only the minimum code that makes it pass.

    line 30
  3. Very specific:

    Use the project's own vocabulary: Test names and interfaces match the domain language recorded in GLOSSARY.md and the decisions recorded in …

    line 44
  4. Distinctive:

    No fabricated results: never claim a test passes without running it, and never assert on a behaviour the test does not actually exercise.

    line 69
  5. Distinctive:

    Leave the suite green at the end of every slice: a red test in the tree is a broken contract, not a to-do.

    line 71

“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “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

<app> TDD skill

Reusable workflow for building <app> features and fixes test-first. An agent invokes this skill; the agent supplies the domain knowledge, the skill supplies the loop discipline.

When to Activate

Activate this skill when a change to <app> is driven test-first. Typical triggers:

  • The request is to build a feature or fix a bug test-first, or mentions red, green, refactor.
  • The request asks for integration tests, or for the boundary between unit tests and integration tests in <app>.
  • A change is being made where a regression test must land at the right seam.

Do NOT activate this skill when the change is documentation-only, a mechanical rename, or a configuration edit with no behaviour to pin down.

Core Principles

  • Red before green. Write the failing test first, then only the minimum code that makes it pass. Do not anticipate future tests.
  • Test behaviour through public interfaces. The implementation may change entirely; the test should not. A good test reads like a specification ("user can check out with a valid cart") and survives refactors because it does not care about internal structure.
  • Tests live at seams. A seam is the public boundary where behaviour is observed without reaching inside. Agree the seams up front, then test only there.
  • One vertical slice at a time. One test, one minimal implementation, repeat. Each test is a tracer bullet that responds to what the previous cycle taught.
  • Refactoring belongs to the review stage, not to the red-green implementation cycle.
  • Use the project's own vocabulary. Test names and interfaces match the domain language recorded in GLOSSARY.md and the decisions recorded in the ADRs for the area being touched.

Rules

  • No horizontal slicing. Writing all the tests first and then all the implementation produces tests that verify imagined behaviour and go insensitive to real changes.
  • No tautological assertions. The expected value must come from an independent source of truth (a known-good literal, a worked example, the spec). An assertion that recomputes the expected value the way the code does passes by construction and can never disagree with the code.
  • No implementation-coupled tests. Mocking internal collaborators, testing private methods, or verifying through a side channel (querying the database instead of calling the interface) makes the test break on refactors while behaviour is unchanged.
  • Agree the seams before writing tests. State the public interfaces under test and confirm them with the requester; give each seam a one-line note on what it catches and what it misses. No test is written at an unconfirmed seam.
  • Integration tests exercise the real boundary. In <app> that means the wired mux over fakes (no database) or the container-backed suite (make test-int), with fixtures that are explicit about which layer they stand in for.
  • No fabricated results: never claim a test passes without running it, and never assert on a behaviour the test does not actually exercise.
  • Leave the suite green at the end of every slice: a red test in the tree is a broken contract, not a to-do.

Research References

ClaimSourceYearLink
Red-green loop, seam agreement, anti-patterns (implementation-coupled, tautological, horizontal slicing)skills/engineering/tdd/SKILL.md (upstream, MIT)2026local file
<app> test layers and commandsdocs/architecture/11-testing-and-ci.mdn/alocal file

Output Format

Raw structured prose, not a code fence:

### <app> tdd, <change in one line>

Seams under test (agreed): <seam> -> catches <x>, misses <y>
Slice 1: test <file>:<name> -> red: <failure> -> green: <implementation> -> <command run>: <result>
Slice 2: test <file>:<name> -> red: <failure> -> green: <implementation> -> <command run>: <result>
Integration coverage: <what runs against the real boundary>
Suite state: <command> -> <result>

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.