agentleFS
ahonnahonn/dotfiles/.claude/skills/tdd/SKILL.md

tdd

Skill62 starsChanged 2 months agoMITView on GitHub

Use red-green-refactor when the user requests test-first development or the applicable testing policy selects TDD.

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

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

  • 0

    Common

    Most of the 186 edited versions we read keep these.

  • 9

    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. Very specific:

    Use this workflow only for test mode tdd or an explicit test-first request.

    line 8
  2. Distinctive:

    Use the existing test harness for this surface.

    line 14
  3. Distinctive:

    Ask only when an unresolved behavior or interface decision materially changes scope or risk.

    line 16
  4. Distinctive:

    Write a focused test and run it.

    line 21
  5. Distinctive:

    Add the implementation needed for that behavior and run the relevant test again.

    line 22
  6. Distinctive:

    Do not write a batch of speculative tests before implementing any behavior.

    line 26
  7. Distinctive:

    Verify behavior through public interfaces, with expected results drawn from a requirement, worked example, or other independent source of …

    line 30
  8. Distinctive:

    Avoid private-method assertions and internal call-order checks unless that interaction is itself the contract.

    line 31
  9. Distinctive:

    Prefer real collaborators where practical.

    line 32
  10. Distinctive:

    Read tests.md when choosing assertions or reviewing test quality.

    line 35

“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

Use this workflow only for test mode tdd or an explicit test-first request. The applicable AGENTS.md testing policy owns mode selection; this skill does not turn skip, verify-only, or add-tests into TDD.

Establish the boundary

Inspect the implementation, nearby tests, and the relevant interface before the first test. Read domain documentation only when it resolves uncertainty about the behavior or vocabulary under test.

  • Use the existing test harness for this surface. If none exists, follow the task's scope and testing policy; introduce one only when the request supports it.
  • Choose the smallest public boundary that exposes the required behavior. State the boundary in the plan when useful; routine test placement does not require user confirmation.
  • Ask only when an unresolved behavior or interface decision materially changes scope or risk. Continue independent work while that decision is pending.

Work in vertical slices

  1. Select one observable behavior from the requirement or reproduced bug.
  2. Write a focused test and run it. Confirm it fails for the missing behavior, not a broken fixture, import, or environment.
  3. Add the implementation needed for that behavior and run the relevant test again.
  4. Refactor when it improves the changed code, keeping the relevant tests green. A separate review skill is not a prerequisite.
  5. Repeat for the next meaningful behavior. Finish with the checks appropriate to the changed surface and report only checks actually run.

Do not write a batch of speculative tests before implementing any behavior. Let each completed slice inform the next one.

Keep tests worth maintaining

  • Verify behavior through public interfaces, with expected results drawn from a requirement, worked example, or other independent source of truth.
  • Avoid private-method assertions and internal call-order checks unless that interaction is itself the contract.
  • Prefer real collaborators where practical. Isolate external boundaries when needed for reliable, focused tests.
  • Cover meaningful failure paths and regressions without mirroring the implementation or adding cases solely to increase coverage.

Read tests.md when choosing assertions or reviewing test quality. Read mocking.md when external dependencies need isolation. Load only the guidance relevant to the current slice.

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.