
TDD workflow
Guides an agent through test-first red-green-refactor cycles with per-step commits
TDD workflow 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
- 8
- Last commit
- License
- MIT
- Listing updated
Similar skills
About TDD workflow
This skill sets a disciplined build loop for an agent working inside a job worktree. It takes each acceptance criterion in turn, writes a failing test first, confirms the failure is for the right reason, then writes the minimal code to pass it, refactors with the suite green, and commits after each step. Bug fixes start with a regression test that reproduces the defect before any production change is made.
The guidance also covers practical testing choices. It favors real databases for data access and fakes only at network boundaries, injected clocks and random sources instead of sleeps, self-contained test data, and assertions on outcomes rather than on internal helper calls. It includes conventional commit message examples and forbids skipped or focused tests used to hide failures.
The skill is a single SKILL.md with no bundled scripts. It refers to a verification-loop step for checking coverage, and its examples use Go, TypeScript and Python, so the agent needs a working test toolchain in the repository it is building.
When your agent uses it
Test-first build loop for factory jobs - red, green, refactor, one acceptance criterion at a time, with a commit after each green step. Use when implementing a spec, fixing a bug, or changing behavior inside a job worktree.
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 (6 KB) on GitHub on 2 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 forgeline plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add Nabwinsaud/forgeline
/plugin install forgeline@forgelineOr copy only this skill to ~/.claude/skills/tdd-workflow:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/tdd-workflow &&
cp -R "$tmp/skills/tdd-workflow" ~/.claude/skills/tdd-workflow &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/tdd-workflow inside it instead.
Copy the skill folder to ~/.agents/skills/tdd-workflow to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/tdd-workflow &&
cp -R "$tmp/skills/tdd-workflow" ~/.agents/skills/tdd-workflow &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/tdd-workflow inside it instead.
Copy the skill folder to ~/.cursor/skills/tdd-workflow to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/tdd-workflow &&
cp -R "$tmp/skills/tdd-workflow" ~/.cursor/skills/tdd-workflow &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/tdd-workflow inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/Nabwinsaud/forgeline.git --path skills/tdd-workflowOr copy the folder to ~/.gemini/skills/tdd-workflow yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/tdd-workflow:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/tdd-workflow &&
cp -R "$tmp/skills/tdd-workflow" ~/.copilot/skills/tdd-workflow &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/tdd-workflow inside it instead.
Get the folder:
git clone --depth 1 https://github.com/Nabwinsaud/forgeline.gitThen copy forgeline/skills/tdd-workflow into your agent's skills folder as tdd-workflow. Agents that support SKILL.md read one folder per skill.
What it does
- Red-green-refactor loop
- Walks the agent through one acceptance criterion at a time, from failing test to passing code to cleanup.
- Regression-first bug fixing
- Requires a test that reproduces a reported bug to fail before any production code is changed.
- Test shape guidance
- Sets conventions for arrange-act-assert layout, naming, parametrized cases and deterministic setup.
- Mocking boundaries
- Explains which layers should use real databases and code and which should be faked, such as third-party HTTP APIs.
- Commit cadence rules
- Defines small conventional commits per green step and forbids committing skipped or commented-out tests.
- Review feedback handling
- Describes how to turn failing gate output or review findings from an earlier attempt into tests before continuing.
Good for
- Implement a feature from a spec one acceptance criterion at a time
- Fix a bug by first writing a test that reproduces it
- Add a new endpoint with tests covering its error responses
- Refactor a module while keeping the test suite green at every commit
- Address failing test output from a previous attempt before continuing work
TDD workflow FAQ
When does TDD workflow apply?
It is meant for implementing a spec, fixing a bug, or changing behavior inside a job worktree, as stated in its description.
Does TDD workflow run any scripts or tools?
No scripts are included. It is a single SKILL.md with instructions only, and it does not set allowed tools.
What languages do the examples use?
The examples show Go, TypeScript and Python test code, and the commit examples use conventional commit prefixes.
How do I install TDD workflow in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/tdd-workflow to use it in all your projects, or to .claude/skills/tdd-workflow in one project. Or install the forgeline plugin, which includes it: /plugin marketplace add Nabwinsaud/forgeline, then /plugin install forgeline@forgeline.
Does TDD workflow 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 workflow?
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 workflow?
The closest alternatives to TDD workflow are TDD, TDD, TDD loop, TDD and Mt build.
Where this comes from
- Description: from the skill's own SKILL.md.
More from Nabwinsaud/forgeline

Gives agents conventions for designing HTTP/JSON endpoints, errors and pagination
- Open source
- 8 GitHub stars
- Developer tools

Records a human approve, reject or retry decision on a paused Forgeline job
- Open source
- 8 GitHub stars
- Developer tools

Gives a read-only reviewer agent a prioritized procedure for checking factory PRs
- Open source
- 8 GitHub stars
- Developer tools

Guides agents through safe Postgres schema changes, backfills and sqlc regeneration
- Open source
- 8 GitHub stars
- Databases

Turns one sentence into a Forgeline job that runs through to a reviewed PR
- Open source
- 8 GitHub stars
- Developer tools

Checks whether your machine and repo are ready to run the Forgeline factory
- Open source
- 8 GitHub stars
- Developer tools





