SkillAgentSearch skills...

test-driven-development

Write software using the RED-GREEN-REFACTOR cycle for reliable, well-tested code

Install / Use

npx skills add taracodlabs/aiden --skill test-driven-development

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

85/100

Supported Platforms

Universal

Our assessment of test-driven-development

test-driven-development scores 85/100 on our quality scale, 2739th of 4,702 Development & Engineering skills we index.

Its SKILL.md is 4.4 KB long, well organised into 21 sections with 10 code examples: a solid amount of guidance for an agent.

It has 843 GitHub stars, a meaningful sign that others use it.

Substance
26/30
Structure
20/20
Description
12/15
Adoption
12/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so test-driven-development is actively maintained.
  • Our last check on 2026-11-05 found the source still online.
  • It is released under AGPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-06. Automated pattern scan on 2026-10-06. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.

test-driven-development compared with similar skills

All 4 of these similar skills score higher than test-driven-development; compare them before choosing.

SkillScoreStarsUpdatedFormat
test-driven-development (this skill)by taracodlabs858432mo agoSKILL.md
taste-skillby Leonxlnx100117.6k9d agoCLAUDE.md
ai-job-searchby ai-job-search-dev10072.3ktodayCLAUDE.md
claude-howtoby luongnv8910047.4k3d agoCLAUDE.md
Claude-Code-Game-Studiosby Donchitos10039.9k8d agoCLAUDE.md

Frequently asked questions

How do I install test-driven-development?
Run npx skills add taracodlabs/aiden --skill test-driven-development. The install tabs above show the steps for each supported agent.
Which AI agents does test-driven-development work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is test-driven-development safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is AGPL-3.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is test-driven-development still maintained?
The repository was last updated about 2 months ago, so test-driven-development is actively maintained.

name: test-driven-development description: Write software using the RED-GREEN-REFACTOR cycle for reliable, well-tested code category: developer version: 1.0.0 origin: aiden license: Apache-2.0 tags: tdd, testing, red-green-refactor, unit-tests, pytest, jest, vitest, quality, development

Test-Driven Development (TDD)

Use the RED-GREEN-REFACTOR cycle to write reliable, well-tested software. Write tests first, then write the minimal code to pass them, then clean up.

When to Use

  • User wants to implement a new function or module correctly
  • User wants to ensure edge cases are handled before they become bugs
  • User is refactoring and wants a safety net
  • User wants tests for business-critical logic
  • User wants to document behavior through executable tests

How to Use

The TDD cycle

RED    → Write a failing test for the behavior you want
GREEN  → Write the minimum code to make the test pass
REFACTOR → Clean up the code without breaking tests
Repeat for each small behavior increment

Phase 1: RED — Write a failing test first

Write the test before the implementation. It must fail to prove the test works.

# test_calculator.py — write this BEFORE calculator.py
import pytest
from calculator import add

def test_add_two_positive_numbers():
  assert add(2, 3) == 5

def test_add_negative_number():
  assert add(-1, 5) == 4

def test_add_floats():
  assert abs(add(0.1, 0.2) - 0.3) < 1e-9

Run the tests — they should fail with ModuleNotFoundError or ImportError:

pytest test_calculator.py -v
# Expected: FAILED (module not found)

Phase 2: GREEN — Minimal implementation to pass

Write only enough code to make the tests pass — nothing more.

# calculator.py
def add(a, b):
  return a + b
pytest test_calculator.py -v
# Expected: 3 PASSED

Phase 3: REFACTOR — Improve code quality

Clean up implementation and tests while keeping all tests green.

# calculator.py — add type hints and docstring
def add(a: float, b: float) -> float:
  """Return the sum of a and b."""
  return a + b
pytest test_calculator.py -v  # must still pass after refactor

Write tests with pytest (Python)

# Parametrize for multiple cases
@pytest.mark.parametrize("a,b,expected", [
  (2, 3, 5),
  (-1, 5, 4),
  (0, 0, 0),
  (1.5, 2.5, 4.0),
])
def test_add(a, b, expected):
  assert add(a, b) == expected

# Test exceptions
def test_add_rejects_string():
  with pytest.raises(TypeError):
    add("hello", 2)

Write tests with Vitest / Jest (TypeScript / JavaScript)

// calculator.test.ts
import { describe, it, expect } from 'vitest'
import { add } from './calculator'

describe('add()', () => {
  it('adds two positive numbers', () => {
    expect(add(2, 3)).toBe(5)
  })

  it('handles negative numbers', () => {
    expect(add(-1, 5)).toBe(4)
  })

  it('throws on non-number input', () => {
    expect(() => add('a' as any, 2)).toThrow()
  })
})

TDD for API endpoints

# test_api.py — RED first
def test_create_user_returns_201(client):
  resp = client.post("/users", json={"name": "Alice", "email": "alice@example.com"})
  assert resp.status_code == 201
  assert resp.json()["id"] is not None

def test_create_user_rejects_missing_email(client):
  resp = client.post("/users", json={"name": "Alice"})
  assert resp.status_code == 422

# Then implement the /users endpoint to make these pass

Examples

"Implement a function that validates Indian phone numbers" → RED: write tests for +91 10-digit numbers, reject 9-digit, reject letters. GREEN: implement regex. REFACTOR: add named groups, docstring.

"Add a discount calculator to the checkout module" → RED: test 10% off, 0% off, 100% off, reject negative discount. GREEN: minimal implementation. REFACTOR: extract constants, add type hints.

"I want to refactor this function but keep it working" → Write characterization tests first (tests that document current behavior), then refactor with test safety net.

Cautions

  • Never skip the RED phase — a test that was never failing might not actually test anything
  • Tests should be independent — each test must set up its own state and not depend on test order
  • Aim for one assertion per test — tests with multiple assertions are harder to diagnose when they fail
  • TDD is slower upfront but faster overall — set this expectation with the user
  • Mock external services (APIs, databases) in unit tests — test real integrations separately

Related Skills

View on GitHub
GitHub Stars843
CategoryDevelopment
Updated2mo ago
Forks147

Languages

TypeScript

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions