tdd-guide

tdd-guide is a skill for Claude Code from alexmond/jhelm. It costs 56 tokens per session (1,542 once invoked), scanned A, original, Apache-2.0.

A guide to test-driven development (TDD), where you write a failing test before the code, then make it pass and improve the design. It focuses on JUnit 5 tests for Java.

In plain words
What is it for?
Use it to create JUnit 5 tests, find coverage gaps with JaCoCo, or guide the red-green-refactor process for a new feature.
Why use it?
It helps reveal missing cases and weak tests instead of checking only whether existing tests pass. It also gives a consistent way to review test coverage.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to create JUnit 5 tests, find coverage gaps with JaCoCo, or guide the red-green-refactor process for a new feature.

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

Made for: Claude Code.

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-guide

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexmond/jhelm/tdd-guide"><img src="https://agentmods.dev/badge/skills/alexmond/jhelm/tdd-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,542 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.00056 $0.01542
Opus 5.5 $0.00022 $0.00617
Sonnet 5.5 $0.00011 $0.00308
Haiku 4.5 $0.00006 $0.00154

Measured 1mo ago against content hash fbae3628339b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tdd-guide 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 1mo 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.

.claude/skills/tdd-guide/SKILL.md · 207 lines

How it starts

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

TDD Guide

Test-driven development skill for generating tests, analyzing coverage, and guiding red-green-refactor workflows. Adapted from alirezarezvani/claude-skills for JUnit 5 and the jhelm project.


Workflows

Generate Tests from Code

  1. Provide source code (Java class or method)
  2. Target framework: JUnit 5 (org.junit.jupiter.api)
  3. Follow jhelm conventions:
    • Use Assertions (not AssertJ)
    • Use @TempDir for temporary files
    • Use @ParameterizedTest with @CsvSource or @MethodSource to avoid duplication
    • Prefer real test data over Mockito mocks
    • Mockito acceptable only for HTTP (CloseableHttpClient) and Kubernetes (KubeService)
  4. Validation: Tests compile and cover happy path, error cases, edge cases

Analyze Coverage Gaps

  1. Run JaCoCo: ./mvnw test (generates target/site/jacoco/jacoco.xml)
  2. Use /jacoco skill to analyze coverage by module
  3. Prioritize gaps:
    • P0: 0% covered classes with many lines (high impact)
    • P1: Partially covered classes with uncovered branches
    • P2: Low-risk utility classes
  4. Generate tests for P0 items first
  5. Target: 80% minimum coverage per module

TDD New Feature

  1. Write failing test first (RED)
  2. Run: ./mvnw test -Dtest=NewFeatureTest -pl <module>
  3. Implement minimal code to pass (GREEN)
  4. Run test again to confirm pass
  5. Refactor while keeping tests green (REFACTOR)
  6. Run ./mvnw validate to verify formatting + PMD + checkstyle

JUnit 5 Patterns for jhelm

Basic Test

@Test
void testChartLoadingFromDirectory() throws Exception {
	Chart chart = ChartLoader.load(Path.of("src/test/resources/test-charts/minimal"));
	assertEquals("minimal", chart.getMetadata().getName());
	assertNotNull(chart.getValues());
}

Parameterized Test (avoid duplication)

@ParameterizedTest
@CsvSource(delimiter = '|', value = {
	"upper     | hello | HELLO",
	"lower     | HELLO | hello",
	"title     | hello world | Hello World"
})
void testStringFunctions(String func, String input, String expected)
		throws IOException, TemplateException {
	assertEquals(expected, exec("{{ " + func + " \"" + input + "\" }}"));
}

Read the full file on GitHub · 207 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. 1mo ago First seen · 207 lines · 56 tokens per session scan A fbae3628339b

Subscribe to this mod's changes

tdd-guide is a skill published in the GitHub repository alexmond/jhelm (7 stars, last pushed 3d ago), licensed Apache-2.0. It adds 56 tokens to every session and 1,542 once invoked, about $0.0002 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-08-31.

Related

Other skills, from other repositories

JUnit 5 Testing

Production-grade Java unit and integration testing with JUnit 5 covering assertions, parameterized tests, lifecycle hooks, Mockito mocking, nested tests, and extensions.

PramodDutta/qaskills · 36 tokens

maven-harness-pom

Reference Maven POM fragments for the full harness — Spotless, Checkstyle, SpotBugs, Error Prone, JaCoCo, PIT, OpenAPI generator + diff, OWASP dependency check, Surefire/Failsafe. Use when wiring the harness into a new project or upgrading a brownfield POM.

loiane/specs-driven-development-spring-angular · 71 tokens

tdd-red-green-refactor

Strict red/green/refactor/simplify discipline for the /build command. Use when implementing any task in Phase 4. The agent must NOT write production code without a failing test recorded in .tdd-state.json.

loiane/specs-driven-development-spring-angular · 56 tokens

archunit-rules

Encode architecture invariants as ArchUnit rules. Use when defining or reviewing layer boundaries, package dependencies, naming conventions, or cross-module access.

loiane/specs-driven-development-spring-angular · 33 tokens

junit5-testcontainers-patterns

JUnit 5 + Spring Boot 4 test slice patterns and Testcontainers integration test patterns with @ServiceConnection. Use when writing or reviewing any test, especially when choosing between unit / slice / integration scope.

loiane/specs-driven-development-spring-angular · 50 tokens

harness-report-parsing

Parse harness output (Surefire/Failsafe XML, JaCoCo XML, PIT XML, Checkstyle/SpotBugs XML, OpenAPI diff JSON, dependency-check JSON) into a single structured summary. Use when writing 07-validation-report.md or when a CI run failed and the agent must explain why.

loiane/specs-driven-development-spring-angular · 70 tokens