tdd-workflow

tdd-workflow is a skill for Claude Code, Codex from hmj1026/dhpk. It costs 108 tokens per session (1,493 once invoked), scanned A, original, MIT.

A test-driven development workflow for writing behavior-focused unit and integration tests before or alongside implementation. Test-driven development (TDD) means writing a failing test, making it pass, and then improving the code.

In plain words
What is it for?
Use it to create test scaffolds, choose test seams and mocks, or guide a minimal RED-GREEN-REFACTOR change.
Why use it?
It keeps tests tied to observable behavior instead of internal implementation details and provides a small check for a feature or bug fix.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions Codex.

Part of the dhpk plugin — 39 skills, 1 command, 1 agent, 3 hooks shipped together

Good fit Use it to create test scaffolds, choose test seams and mocks, or guide a minimal RED-GREEN-REFACTOR change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hmj1026/dhpk/tdd-workflow
View source ↗ hmj1026/dhpk
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 hmj1026/dhpk --skill tdd-workflow
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code, Codex.

Or install dhpk, the plugin that ships this one along with the rest of its 39 skills, 1 command, 1 agent, 3 hooks.

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/hmj1026/dhpk/tdd-workflow/github.svg)](https://agentmods.dev/skills/hmj1026/dhpk/tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/hmj1026/dhpk/tdd-workflow"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/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/hmj1026/dhpk/tdd-workflow"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/tdd-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,493 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.00108 $0.01493
Opus 5.5 $0.00043 $0.00597
Sonnet 5.5 $0.00022 $0.00299
Haiku 4.5 $0.00011 $0.00149

Measured yesterday against content hash 1876c34745dc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (references/phpunit/scripts/resolve-version.js, references/phpunit/scripts/version-resolver.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

generated/claude-marketplace/package/skills/tdd-workflow/SKILL.md · 133 lines

How it starts

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

Test-Driven Development

Select the work

Choose the mode from the requested outcome, rather than the agent's name:

  • Standard TDD: own a feature or bug's test-first behavior change.
  • Test-generation: produce tests or a scaffold for a named production seam; keep production code unchanged unless implementation is separately requested.
  • Worker handback: perform a bounded GREEN or scaffold task using the settled owner's seam, target files, and verification command.

For Playwright journeys use e2e-runner; for a post-hoc coverage or acceptance audit use change-verdict. Documentation, formatting, rename-only, and harness configuration work without testable runtime behavior need no TDD loop.

Read tests.md when choosing assertions and mocking.md when introducing test doubles. Use the repository's existing test framework, runner, and nearby conventions. Read CONTEXT.md and relevant ADRs when present before choosing domain vocabulary or a new seam.

Establish the seam and evidence

  1. Identify the caller-visible behavior and its public API, command, event, or other boundary. Reuse the requested or approved seam and its existing test owner; ask only about a material missing behavior or constraint.
  2. Find the smallest safe verification command. Keep tests isolated from shared services and data unless their use is explicitly authorized.
  3. Check supplied RED/GREEN evidence against the current behavior, test, seam, and source revision. Reuse adequate evidence without repeating approvals; rerun the scoped command when the source or test has drifted, or the failure reason is missing. An old failure alone does not establish current RED.

Choose inline work or a worker handback from ownership, coupling, runtime expertise, and material risk; file count alone does not decide the route. Resolve a missing specialist outcome with tdd-guide when separate expertise is needed. Explicit Host, user, acceptance, and higher-priority requirements for that role remain binding. If the required role or runtime is unavailable, report BLOCKED and the action needed to resume. An equivalent capable owner may proceed only when applicable instructions allow it. In dhpk, rules/execution-policy.md owns dispatch and ownership decisions.

Read the full file on GitHub · 133 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. yesterday Changed · +8 lines 1876c34745dc
  2. 2d ago Changed · -33 lines · -6 tokens per session 2654f2ca1b0e
  3. 10d ago Changed · +17 lines · +7 tokens per session a439a62c32d6
  4. 15d ago Changed · -2 lines 9813fcbf207b
  5. 23d ago First seen · 143 lines · 107 tokens per session scan A 50fbe593c279

Subscribe to this mod's changes

tdd-workflow is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 108 tokens to every session and 1,493 once invoked, about $0.0004 per session on Opus 5.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-09-24.