Tdd logo

Tdd

CommunityPopular
codeaholicguy
tdd

AI DevKit · Test-driven development — write a failing test before writing production code. Use when implementing new functionality, adding behavior, or fixing bugs during active development.

Overview

Publishercodeaholicguy
Repositoryai-devkit
Skill nametdd
Stars
1.6K
Forks
252
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 codeaholicguy on GitHub. Read the source before you install it.

Installation

Install the Tdd 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.
  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/codeaholicguy/ai-devkit.git /tmp/ai-devkit
mkdir -p .claude/skills
cp -r /tmp/ai-devkit/skills/tdd .claude/skills/tdd
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tdd 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 Tdd 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 Tdd 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.

TDD

Red. Green. Refactor. In that order, every time.

Hard Rules

  • No production code without a failing test first.
  • If production code was written before its test, delete it and start over with a failing test.
  • Never skip the red step. A test that has never failed proves nothing.

Cycle

For each unit of behavior:

  1. Red — Write a test for the next behavior. Run it. It must fail. Read the failure message — it should describe the missing behavior.
  2. Green — Write the minimum production code to make the test pass. Nothing more. Run the test. Apply the verify skill.
  3. Refactor — Clean up both test and production code. Run the test again. Still green? Done. Apply the verify skill.

Then pick the next behavior and repeat.

Rules for Each Step

Red:

  • Test one behavior, not one function. Name the test after what the system should do, not what the function is called.
  • The test must fail for the right reason — a missing method, wrong return value, unmet condition. Not a syntax error or import failure.
  • If the test passes immediately, it's not testing new behavior. Delete it or pick a different behavior.

Green:

  • Write the simplest code that passes. Hardcode if needed — the next test will force generalization.
  • Do not add code "while you're in there." If it's not required by a failing test, it doesn't exist yet.
  • Do not refactor during green. Pass first, clean second.

Refactor:

  • Remove duplication between test and production code.
  • Extract only when you see real duplication, not predicted duplication.
  • Tests must still pass after every refactor move. Run them after each change.

Anti-Patterns

PatternProblemFix
Test-afterCode shapes the test instead of the other way aroundDelete the code, write the test first
Testing internalsTests break on refactor, not on behavior changeTest public behavior only
Giant red stepMultiple behaviors in one testOne assertion per behavior
Gold-plating greenAdding code no test requiresRemove untested code
Skipping refactorTech debt accumulates immediatelyRefactor before the next red
Mock-heavy testsTests pass but real code failsPrefer real dependencies, mock at boundaries only

Red Flags and Rationalizations

RationalizationWhy It's WrongDo Instead
"This is too simple to test first"Simple code still needs a specWrite the test — it'll be fast
"I'll add the test right after"You won't, and the code will shape the testTest first, always
"I need to see the design first"The test IS the designLet the test drive the interface
"Mocking is too hard for this"Difficulty mocking signals tight couplingFix the design, then test
"The test would be identical to the implementation"Then you're testing internalsTest the behavior from the outside

Memory Integration

After completing a TDD session, store reusable test patterns (setup, assertions, fixtures): npx ai-devkit@latest memory store --title "<pattern>" --content "<details>" --tags "tdd,testing"

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 Tdd AI skill do?

AI DevKit · Test-driven development — write a failing test before writing production code. Use when implementing new functionality, adding behavior, or fixing bugs during active development.

Why use Tdd on TypingMind?

Because you install it once and use it with any model. Tdd 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 Tdd in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/codeaholicguy/ai-devkit/tree/main/skills/tdd. 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 Tdd?

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 Tdd?

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

Is the Tdd AI skill free?

Yes. It is published on GitHub by codeaholicguy 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 👇