
TDD
Guides the agent through a test-first loop: failing test, then minimal implementation
TDD is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 7
- Last commit
- License
- MIT
- Listing updated
Similar skills
About TDD
This skill makes the agent write a failing test before any implementation code, only when the user explicitly asks for test-first work. It starts by judging whether a behaviour is worth a test at all, then walks through naming the behaviour in one declarative sentence, writing a colocated test file, running it to confirm it fails for the predicted reason, implementing the smallest change that passes, and refactoring with the test as a safety net.
The skill also sets testing conventions: hand-rolled stateful fakes for services, concrete value assertions instead of snapshots, promise matchers for async code, and explicit rules against tautological or implementation-mirroring tests. It asks the agent to report each behaviour, whether its failure matched the prediction, and the final test output.
It assumes a JavaScript or TypeScript project using a Jest-style runner, and it refers to a separate marco-code-style skill for the full style guide, which is not included in this folder.
When your agent uses it
Writes the failing test first, then the implementation, in Marco's testing style. Use whenever the user asks for the test before the code, in any wording ("tdd", "test first", "write the failing test first, then implement..."), and when the deliver skill adds a test worth its CI cost.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (5 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the ai-essentials plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add tonyghiani/ai-essentials
/plugin install ai-essentials@ai-essentialsOr copy only this skill to ~/.claude/skills/tdd:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.claude/skills/tdd &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/tdd inside it instead.
Copy the skill folder to ~/.agents/skills/tdd to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.agents/skills/tdd &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/tdd inside it instead.
Copy the skill folder to ~/.cursor/skills/tdd to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.cursor/skills/tdd &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/tdd inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/tonyghiani/ai-essentials.git --path skills/tddOr copy the folder to ~/.gemini/skills/tdd yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/tdd:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/tdd &&
cp -R "$tmp/skills/tdd" ~/.copilot/skills/tdd &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/tdd inside it instead.
Get the folder:
git clone --depth 1 https://github.com/tonyghiani/ai-essentials.gitThen copy ai-essentials/skills/tdd into your agent's skills folder as tdd. Agents that support SKILL.md read one folder per skill.
What it does
- Test-first workflow
- Walks the agent through naming a behaviour, writing a failing test, and confirming the failure before implementing.
- Test-worthiness check
- Tells the agent to skip tests for constants, config values, renames and pass-through code.
- Stateful fake guidance
- Describes building service fakes that round-trip state instead of relying on module mocks.
- Assertion conventions
- Prefers concrete values, resolves and rejects matchers, and negative assertions that pin the contract.
- Anti-pattern rules
- Lists practices to avoid, such as tests that mirror the implementation or pass on an empty result.
- Edge case focus
- Directs tests toward idempotency, retries, missing dependencies, boundaries and error paths.
Good for
- Write a failing test for a new service method before implementing it
- Add test-first coverage for a retry behaviour after partial failure
- Implement a boundary-condition fix with a test written beforehand
- Check whether a proposed change deserves a test at all
TDD FAQ
When does TDD trigger?
Only when the user asks for the test before the code, using wording such as tdd or test first, or when the deliver skill decides a test is worth its CI cost.
Does TDD need any scripts or extra tools?
It contains no scripts. It instructs the agent to run the project's own test runner, with npx jest given as an example.
Does TDD write tests for constants or config values?
No. The skill tells the agent to say so and skip the loop for constants, config values, renames, wiring and pass-through code.
How do I install TDD in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/tdd to use it in all your projects, or to .claude/skills/tdd in one project. Or install the ai-essentials plugin, which includes it: /plugin marketplace add tonyghiani/ai-essentials, then /plugin install ai-essentials@ai-essentials.
Does TDD run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use TDD?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to TDD?
The closest alternatives to TDD are TDD, TDD, TDD workflow, Test driven development and TDD.
Where this comes from
- Description: from the skill's own SKILL.md.
More from tonyghiani/ai-essentials

Lets an agent read your GitHub queue at day's end and draft a morning triage report
- Open source
- 7 GitHub stars
- Developer tools

Finds untranslated UI strings and i18n patterns that break translation in code
- Open source
- 7 GitHub stars
- Developer tools

Writes pull request descriptions from a fixed summary, screenshots and testing template
- Open source
- 7 GitHub stars
- Developer tools

Guides an agent through resolving merge conflicts by intent, then verifying and pushing
- Open source
- 7 GitHub stars
- Developer tools

Triages PR review comments, then implements, replies to and resolves them
- Open source
- 7 GitHub stars
- Developer tools

Audits UI code for accessibility defects that block keyboard and screen-reader users
- Open source
- 7 GitHub stars
- Developer tools





