tools: Skill for Claude Code

.claude/skills/testing-conventions/SKILL.md

testing-conventions is a skill for Claude Code from adamw7/tools. It costs 75 tokens per session (1,181 once invoked), scanned A, original, MIT.

A testing guide for a Java repository with enforced rules for JUnit tests, build timeouts, network access, and architecture checks. TDD means writing tests to guide development, but this guide focuses on making tests pass the repository’s existing checks.

In plain words
What is it for?
Adding or fixing unit and integration tests, configuring fast isolated test fixtures, handling temporary files, and complying with Surefire and ArchUnit checks.
Why use it?
It prevents tests from failing because they run too long, access the network, use the wrong framework, or violate project structure rules.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is adamw7/tools's own configuration. It tells Claude Code how to work on tools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything tools configures →

View source ↗ adamw7/tools
Reuse

Borrowing it

Nothing to install: this file belongs to adamw7/tools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/adamw7/tools/main/.claude/skills/testing-conventions/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/adamw7/tools

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 testing-conventions

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/adamw7/tools/testing-conventions"><img src="https://agentmods.dev/badge/skills/adamw7/tools/testing-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,181 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.00075 $0.01181
Opus 5.5 $0.00030 $0.00472
Sonnet 5.5 $0.00015 $0.00236
Haiku 4.5 $0.00007 $0.00118

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

Security

Grade A, and why

testing-conventions 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/testing-conventions/SKILL.md · 94 lines

How it starts

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

Testing Conventions Skill

Write unit and integration tests that satisfy the tools repo's enforced testing rules the first time. These rules are enforced by Surefire config, JUnit extensions, and ArchUnit architecture tests — a test that ignores them fails the build, not just review.

Hard rules (build fails otherwise)

Timeouts

  • 5 s per unit test. Surefire enforces a 5-second per-test timeout (root pom.xml). The bound is generous because the reactor builds in parallel (-T1C) and contending test forks stretch the cold-fork warmup; it is not a budget to spend. Keep unit tests fast — no real I/O, no sleeps, no heavy loops. A genuinely heavier test opts out with an explicit @Timeout and a comment explaining why.
  • Heavy shared setup (@BeforeAll etc.) has a looser 10-second limit (15 s under coverage). A fork that hangs outright is killed at 300 s (forkedProcessTimeoutInSeconds).

Unit tests run class-parallel

  • Surefire runs unit.test.parallelism (default 3) test classes at once per module; the methods within one class still run on a single thread, so a @BeforeEach-built fixture is never shared across threads.
  • A @TempDir is unique per class, so an ordinary test needs nothing extra.
  • Writing process-global state needs a guard, or the test corrupts whatever runs beside it:
    • a system property, or the deprecated PathValidator.setAllowedBaseDir → annotate the class @Isolated (org.junit.jupiter.api.parallel.Isolated); it then runs alone. ArchUnit fails the build if you forget. Confining a source with an AllowedPaths of its own writes nothing shared, and needs no annotation.
    • a fixture genuinely shared between classes (the embedded Derby database) → @ResourceLock("<name>"), which serialises just those classes. Put it on the shared base class; subclasses inherit it.
  • Debug a suspected ordering problem with -Dunit.test.parallelism=1.

Network is off for unit tests

  • The data module's NetworkOffExtension engages the Switch kill-switch before any test runs, so a unit test cannot open an outbound connection.
  • Anything needing the network is an integration test (*IT), gated behind the integration-tests profile and run by Failsafe — not Surefire.

Read the full file on GitHub · 94 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed c72d4f2c9f99
  2. 1mo ago First seen · 94 lines · 75 tokens per session scan A 4c3ea9ccd9b8

Subscribe to this mod's changes

testing-conventions is a skill published in the GitHub repository adamw7/tools (11 stars, last pushed today), licensed MIT. It adds 75 tokens to every session and 1,181 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

java-affected-tests

Use before opening or updating an OpenMetadata PR that changes Java, a JSON schema, an index mapping, a SQL migration, seed data or a pom — PR CI no longer runs the Java integration tests (they run only in the merge queue) and the JavaUIIT/search-it suites run only nightly, so this selects the unit tests and…

open-metadata/OpenMetadata · 120 tokens

oss-fuzz

Run Tika's OSS-Fuzz Jazzer targets locally against a working-tree checkout — build the image, build fuzzers from local source, fuzz a target, run a corpus as a regression pass, reproduce a crash, and add seeds. Use for "fuzz the OneNote parser", "run OneNoteParserFuzzer against these files", "reproduce an OSS-Fuzz…

apache/tika · 90 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

java-unit-test

A code-generation guide for Java unit tests in Spring Boot projects. Unit tests check one small piece of code in isolation; Spring Boot is a Java framework for building web applications and services.

hashgraph-online/awesome-codex-plugins · 113 tokens

112-java-maven-plugins

Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) …

jabrena/plinth · 149 tokens

testing-pyramid

Use when writing tests of any kind — unit, slice, or integration. Covers test structure, naming conventions, Mockito patterns, @WebMvcTest, @DataJpaTest, and Testcontainers setup.

rrezartprebreza/spring-boot-skills · 44 tokens