tdd-workflow

tdd-workflow is a skill for Claude Code from mnthe/hardworker-marketplace. It costs 53 tokens per session (1,691 once invoked), scanned A, original, MIT.

A Test-Driven Development workflow, where developers first write a failing test, then make it pass, and finally improve the code. TDD is a way to develop behaviour through tests in the RED-GREEN-REFACTOR cycle.

In plain words
What is it for?
Use it for ultrawork tasks marked with the TDD approach, with focused tests during development and the full test suite during final verification.
Why use it?
It enforces the correct test-first order and keeps feature work focused through fast, targeted test runs.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the ultrawork plugin — 15 skills, 9 commands shipped together

Good fit Use it for ultrawork tasks marked with the TDD approach, with focused tests during development and the full test suite during final verification.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mnthe/hardworker-marketplace/tdd-workflow
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mnthe/hardworker-marketplace --skill tdd-workflow
Clone the repo
git clone --depth 1 https://github.com/mnthe/hardworker-marketplace

Made for: Claude Code.

Or install ultrawork, the plugin that ships this one along with the rest of its 15 skills, 9 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tdd-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/mnthe/hardworker-marketplace/tdd-workflow/github.svg)](https://agentmods.dev/skills/mnthe/hardworker-marketplace/tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/mnthe/hardworker-marketplace/tdd-workflow"><img src="https://agentmods.dev/badge/skills/mnthe/hardworker-marketplace/tdd-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tdd-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/mnthe/hardworker-marketplace/tdd-workflow"><img src="https://agentmods.dev/badge/skills/mnthe/hardworker-marketplace/tdd-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,691 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.01691
Opus 5 $0.00026 $0.00846
Sonnet 5 $0.00011 $0.00338
Haiku 4.5 $0.00005 $0.00169

Measured 9d ago against content hash 99a50fc9db20, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

tdd-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ultrawork/skills/tdd-workflow/SKILL.md · 216 lines

How it starts

The opening of the file, as written. The whole thing — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TDD Workflow

Test-Driven Development (TDD) workflow for tasks marked with approach: "tdd".

CRITICAL: TDD tasks MUST follow this exact sequence. Gate hooks will block out-of-order operations.


Scoped vs Full Test Execution

During TDD phases (RED/GREEN/REFACTOR):

  • Run scoped tests only (specific test file or pattern)
  • Fast feedback loop for the feature being developed
  • Full test suite is deferred to VERIFY task

During VERIFICATION phase:

  • Verifier runs full test suite (npm test without scope)
  • Ensures no regressions across entire codebase
  • PASS/FAIL determination based on complete test coverage

Why scoped execution?

  1. Speed: Test only what changed, not entire suite
  2. Focus: TDD cycle targets specific behavior
  3. Separation: Task implementation vs system verification

Using test_scope from Task

When task has test_scope field, use it for scoped execution:

# Read test_scope from task
TEST_SCOPE=$(bun "{SCRIPTS_PATH}/task-get.js" --session ${CLAUDE_SESSION_ID} --id {TASK_ID} --field test_scope)

# Run scoped test
npm test -- {test_scope}

Example task.json:

{
  "id": "3",
  "subject": "Add input validation",
  "approach": "tdd",
  "test_scope": "tests/validation.test.ts"
}

If test_scope is not set, use the test file path you created.


TDD Phase 1: RED - Write Failing Test

  1. Create test file FIRST (before any implementation code)
  2. Write test for expected behavior
  3. Run test and VERIFY IT FAILS
# Record test creation
bun "{SCRIPTS_PATH}/task-update.js" --session ${CLAUDE_SESSION_ID} --id {TASK_ID} \
  --add-evidence "TDD-RED: Created test file tests/validateUser.test.ts"

# Run SCOPED test - MUST FAIL
npm test -- tests/validateUser.test.ts

# Record failure (expected)
bun "{SCRIPTS_PATH}/task-update.js" --session ${CLAUDE_SESSION_ID} --id {TASK_ID} \
  --add-evidence "TDD-RED: npm test -- tests/validateUser.test.ts (exit code 1)"

Evidence Required:

  • Test file path created
  • Scoped test execution output showing failure
  • Exit code 1 (expected)
  • Evidence includes full test command with scope

Read the full file on GitHub · 216 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 216 lines · 53 tokens per session scan A 99a50fc9db20

Subscribe to this mod's changes

tdd-workflow is a skill published in the GitHub repository mnthe/hardworker-marketplace (4 stars, last pushed 4mo ago), licensed MIT. It adds 53 tokens to every session and 1,691 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.