dhpk-tdd-workflow

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

A framework-independent guide to test-driven development, or TDD: writing a small test for observable behaviour before changing the code, then making it pass and cleaning up the code. It also covers focused unit and integration test scaffolds.

In plain words
What is it for?
It is for building features or fixing bugs test-first, creating a small test scaffold, and reviewing test boundaries and test doubles.
Why use it?
It keeps tests tied to what users or other code can observe instead of private implementation details. It reduces the risk of claiming a fix works without running and reviewing the test.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the dhpk plugin — 65 skills, 31 commands, 37 agents, 4 hooks shipped together

Good fit It is for building features or fixing bugs test-first, creating a small test scaffold, and reviewing test boundaries and test doubles.

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

Made for: Claude Code.

Or install dhpk, the plugin that ships this one along with the rest of its 65 skills, 31 commands, 37 agents, 4 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 dhpk-tdd-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-tdd-workflow/github.svg)](https://agentmods.dev/skills/hmj1026/dhpk/dhpk-tdd-workflow)
Your own site
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-tdd-workflow"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/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 dhpk-tdd-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/hmj1026/dhpk/dhpk-tdd-workflow"><img src="https://agentmods.dev/badge/skills/hmj1026/dhpk/dhpk-tdd-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,376 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.00109 $0.01376
Opus 5 $0.00055 $0.00688
Sonnet 5 $0.00022 $0.00275
Haiku 4.5 $0.00011 $0.00138

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

Security

Grade A, and why

dhpk-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 4d 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.

generated/claude-profiles/compat-v1/package/skills/dhpk-tdd-workflow/SKILL.md · 132 lines

How it starts

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

Test-Driven Development

Test-generation mode

When invoked with test-generation, inspect the named production seam and its existing test conventions, then generate the smallest behavior-focused test scaffold. The caller must review and run the generated test before claiming a GREEN result. This is the canonical replacement for the retired /codex-test-gen command; use an explicitly selected Codex backend only when the caller requests one.

Use this skill to keep tests attached to observable behavior rather than implementation details. Read tests.md when writing or reviewing assertions and mocking.md before introducing a test double.

Before choosing names or seams, read CONTEXT.md when the repository provides one and respect nearby ADRs. Keep test vocabulary aligned with the project's domain language rather than inventing test-only names.

Standard TDD mode

Use this mode for tdd-guide and any task that owns test strategy:

  1. Identify the public interface and the behavior that should be observable.
  2. Confirm the seam from the user request, approved plan, or dispatcher brief.
  3. Write one small test for that behavior and run it before implementation.
  4. Confirm RED fails for the intended missing behavior, not a test/setup error.
  5. Write only enough production code to make that test GREEN.
  6. Run the scoped test again, then refactor only while it remains green.
  7. Repeat one vertical slice at a time; run the applicable full suite at phase exit rather than broad speculative tests on every loop.

Tests must assert return values, emitted state, or caller-visible side effects. Do not test private methods, internal call counts, or a value through a side channel that bypasses the public interface. Expected values must come from a literal, worked example, or independent specification; never recompute them with the same logic as the implementation.

Seams and slicing rules

  • Name the public seams before writing the test: API, command, event, or other caller-visible boundary. Keep tests at that seam unless a genuine external boundary requires a narrow adapter test.
  • Use independent expected values from a literal example or specification; a test that calls the same helper to compute its expected result is tautological and cannot detect a shared defect.
  • Build vertical tracer bullets: one failing behavior through the real boundary and minimal collaborators, then expand coverage around the same path.
  • Keep the loop vertical: one test, one minimal implementation, then one refactor while green. Avoid writing a horizontal batch of imagined tests before the first behavior is understood.
  • Avoid horizontal slicing (all models, then all services, then all controllers). It delays feedback and encourages implementation-coupled tests.
  • Reject implementation-coupled assertions on private names, incidental call counts, or internal data shape. A tautological test is a test smell, not evidence of coverage.

Read the full file on GitHub · 132 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. 4d ago First seen · 132 lines · 109 tokens per session scan A b49b26ae8def

Subscribe to this mod's changes

dhpk-tdd-workflow is a skill published in the GitHub repository hmj1026/dhpk (2 stars, last pushed today), licensed MIT. It adds 109 tokens to every session and 1,376 once invoked, about $0.0005 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-09-05.