agentleFS
daichi-0818daichi-0818/claude-code-ops-kit/skills/tdd/SKILL.md

tdd

Skill0 starsChanged 49 days agoMITView on GitHub

Test-driven development (red→green). Use when adding features or fixing bugs test-first, when asked for "tests first" / "red-green", or when touching production logic. The core move is agreeing on the seam — the public boundary to test — before writing anything.

194 other projects use a version of this.

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

  • tristanphvnSkill

    ketchup-video

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

    Also in 14 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 54 projects that use this

  • jaydubya818Skill

    principle-laziness-protocol

    Apply when a refactor is adding wrappers or abstractions instead of simplifying.

    Also in 45 projects that use this

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

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 186 edited versions we read keep these.

  • 2

    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:

    Red first: write the failing test, then the minimal code that passes it.

    line 39
  2. Distinctive:

    Refactoring lives outside the loop: not inside red→green — after it, with a review pass.

    line 42
  3. Very specific:

    When fixing a bug, systematic-debugging Phase 4 calls this skill: failing reproduction test first, then the fix.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 186 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

Test-Driven Development

TDD is the red → green loop. This skill is the bar that makes the loop produce tests worth keeping.

What a good test is

It verifies behavior through the public interface, never the internals. Rewrite the whole implementation and a good test still passes. It reads like a spec: "checkout succeeds with a valid cart" tells you in one line that the capability exists.

Seams — where tests go

A seam is a public boundary where behavior is observable from outside. Tests go on seams, never inside them.

Agree on the seams before writing. You cannot test everything, so ask "where is the public interface, and which seams deserve tests?" first, and spend the effort on critical paths and complex logic. Do not write tests on seams nobody agreed to.

Anti-patterns (write one of these → discard it and redo)

  • Implementation coupling: mocking internal collaborators, testing private methods, back-door assertions (inspecting the DB instead of the interface). Symptom: refactoring breaks tests while behavior is unchanged.
  • Tautology: computing the expectation the same way the code does (expect(add(a,b)).toBe(a+b)) — structurally unable to fail. Expectations come from an independent source: known-good values, the spec, hand calculation.
  • Horizontal slicing: writing all the tests first, then all the code — you end up testing imagined behavior. Go vertical: one test → one implementation → next. Each test is a tracer round informed by the previous cycle.

Loop rules

  • Red first: write the failing test, then the minimal code that passes it. No speculative features.
  • One slice per cycle: one seam, one test, one minimal implementation.
  • Refactoring lives outside the loop: not inside red→green — after it, with a review pass.

With debugging

When fixing a bug, systematic-debugging Phase 4 calls this skill: failing reproduction test first, then the fix.

<!-- Derived from the tdd skill in mattpocock/skills (MIT, Copyright (c) 2026 Matt Pocock), condensed and adjusted. See THIRD_PARTY_NOTICES.md. -->

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.

Reviews can't be read right now.

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.