Test Driven Development logo

Test Driven Development

Organization
taracodlabs
test-driven-development

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

Overview

Publishertaracodlabs
Repositoryaiden
Skill nametest-driven-development
Stars
852
Forks
150
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by taracodlabs on GitHub. Read the source before you install it.

Installation

Install the Test Driven Development AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/taracodlabs/aiden/tree/main/skills/test-driven-development
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/taracodlabs/aiden.git /tmp/aiden
mkdir -p .claude/skills
cp -r /tmp/aiden/skills/test-driven-development .claude/skills/test-driven-development
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Test Driven Development in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Test Driven Development on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Test Driven Development is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

python
# 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:

powershell
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.

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

Phase 3: REFACTOR — Improve code quality

Clean up implementation and tests while keeping all tests green.

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

Write tests with pytest (Python)

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)

typescript
// 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

python
# 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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Test Driven Development AI skill do?

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

Why use Test Driven Development on TypingMind?

Because you install it once and use it with any model. Test Driven Development is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Test Driven Development in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/taracodlabs/aiden/tree/main/skills/test-driven-development. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Test Driven Development?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Test Driven Development?

As many as you like. As long as a model supports skills, you can use Test Driven Development with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Test Driven Development AI skill free?

Yes. It is published on GitHub by taracodlabs under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇