Test-Driven Development Skill

SkillFiles & storage

This skill gives your AI a test-driven development workflow for writing code. Once added, your agent starts each coding task by writing tests that describe the expected behavior, then builds the code that passes those tests. The result is code that is checked against clear expectations as it is written.

Available today. Use it from your connected AI after setup.

Add the skill, then give your agent a coding task such as a new function or a bug fix. It will plan the tests first and write the code needed to satisfy them.

Then ask your AI: use the Test-Driven Development Skill skill

What your AI can do with it

  • Write tests that describe expected behavior before writing the code
  • Build features by making failing tests pass one at a time
  • Fix bugs by first writing a test that reproduces the problem
  • Refactor existing code while keeping the tests passing
  • Apply the same test-first routine consistently across coding tasks

What this skill tells your AI

The instructions your AI receives, as published by 2ssk/dot-files in .claude/skills/tdd/SKILL.md and read by ahel’s review.

Enforce TDD for every implementation task. This skill ensures quality throughtests first.

Workflow

Step 1 — Write Failing Test

  • Identify the smallest unit of behavior
  • Write test that fails because feature doesn't exist
  • Use language-specific testing framework
  • Keep test focused and simple

Step 2 — Write Minimal Code

  • Implement only what's needed to pass test
  • No optimization yet
  • No additional features
  • Get to green quickly

Step 3 — Refactor

  • Clean up code while tests pass
  • Improve structure, names, organization
  • Ensure tests still pass
  • No new functionality

Testing Patterns by Language

Go

func TestUnitName(t *testing.T) {
    t.Run("should do thing", func(t *testing.T) {
        // arrange
        input := ...
        expected := ...

        // act
        result := DoThing(input)

        // assert
        assert.Equal(t, expected, result)
    })
}

TypeScript

describe('UnitName', () => {
  it('should do thing', () => {
    const input = ...;
    const expected = ...;

    const result = doThing(input);

    expect(result).toEqual(expected);
  });
});

C++

TEST_F(UnitNameTest, ShouldDoThing) {
    auto input = ...;
    auto expected = ...;

    auto result = doThing(input);

    EXPECT_EQ(expected, result);
}

Quality Gates

  • All tests must pass before commit
  • Coverage ≥ 80% for new code
  • No flaky tests
  • Fast execution (< 30s for unit tests)

Signals

GitHub stars
251
Forks
12
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
tdd
Source
github.com/2ssk/dot-files