test-dev

test-dev is a skill for Claude Code from whtoo/How_to_implment_PL_in_Antlr4. It costs 22 tokens per session (1,026 once invoked), scanned A, original, BSD-3-Clause.

A Java testing specialist workflow built around JUnit 5, AssertJ, Mockito, and JaCoCo. It sets rules for naming tests, arranging them as given-when-then steps, and measuring code coverage.

In plain words
What is it for?
Use it to write and review unit tests for Java code, mock dependencies, make assertions, and track line and branch coverage.
Why use it?
It gives Java tests consistent structure and checks how much code and branching the tests exercise.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

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.

agentmods
npx agentmods add skills/whtoo/how_to_implment_pl_in_antlr4/test-dev
Any agent
npx skills add whtoo/How_to_implment_PL_in_Antlr4 --skill test-dev
Clone the repo
git clone --depth 1 https://github.com/whtoo/How_to_implment_PL_in_Antlr4

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 test-dev

README.md
[![agentmods](https://agentmods.dev/badge/skills/whtoo/how_to_implment_pl_in_antlr4/test-dev.svg)](https://agentmods.dev/skills/whtoo/how_to_implment_pl_in_antlr4/test-dev)
Your own site
<a href="https://agentmods.dev/skills/whtoo/how_to_implment_pl_in_antlr4/test-dev"><img src="https://agentmods.dev/badge/skills/whtoo/how_to_implment_pl_in_antlr4/test-dev.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00022 $0.01026
Opus 5 $0.00011 $0.00513
Sonnet 5 $0.00004 $0.00205
Haiku 4.5 $0.00002 $0.00103

Measured yesterday against content hash 0fa6ec233763, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-dev 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.

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/test-dev/SKILL.md · 155 lines

How it starts

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

测试开发

🎯 垂直职责

单一职责: 标准化测试框架 - JUnit 5 + AssertJ + Mockito + JaCoCo

📦 测试框架

依赖版本

<junit.version>5.11.3</junit.version>
<assertj.version>3.27.0</assertj.version>
<mockito.version>5.8.0</mockito.version>
<jacoco.version>0.8.12</jacoco.version>

覆盖率要求

模块 行覆盖率 分支覆盖率
核心引擎 ≥90% ≥85%
指令实现 ≥95% ≥90%
总体 ≥85% ≥80%

📝 测试编写规范

命名规则

格式: test{场景}_{期望结果}_when{条件}

// ✅ 好示例
void testIAddReturnsSum_whenStackHasTwoIntegers() { }
void testTypeCheckerRejectsInvalidBinaryOp_whenOperandsIncompatible() { }

// ❌ 差示例
void test1() { }
void testMethod() { }

测试结构 (Given-When-Then)

@Test
@DisplayName("应正确执行 IADD 指令")
void testIAddInstruction() {
    // Given - 准备测试数据
    OperandStack stack = new OperandStack(10);
    stack.push(10);
    stack.push(20);

    // When - 执行被测操作
    instruction.execute(context);

    // Then - 验证结果
    assertThat(stack.pop()).isEqualTo(30);
}

AssertJ断言

// ✅ 推荐: AssertJ流畅断言
assertThat(result)
    .isNotNull()
    .isEqualTo(expected);

assertThat(list)
    .isNotEmpty()
    .hasSize(3);

// ❌ 避免: JUnit旧式断言
assertEquals(expected, result);  // 顺序易错

🎯 测试类型

单元测试

@Tag("unit")
class InstructionTest {
    @Test
    @DisplayName("加法指令应正确计算")
    void testAdd() {
        // Given
        AddInstruction add = new AddInstruction();

        // When
        add.execute(context);

        // Then
        assertThat(result).isEqualTo(8);
    }
}

集成测试

@Tag("integration")
class CompilerPipelineTest {
    @Test
    @DisplayName("完整编译流程应处理循环")
    void testFullCompilation() {
        // Given
        String source = loadTestProgram("fibonacci.cymbol");

        // When
        CompilationResult result = compiler.compile(source);

        // Then
        assertThat(result.isSuccess()).isTrue();
    }
}

参数化测试

@ParameterizedTest
@ValueSource(ints = {0, 1, 10, 100})
@DisplayName("数据栈应处理各种值")
void testStackPushPop(int value) {
    stack.push(value);
    assertThat(stack.pop()).isEqualTo(value);
}

Read the full file on GitHub · 155 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 First seen · 155 lines · 22 tokens per session scan A 0fa6ec233763

Subscribe to this mod's changes

test-dev is a skill published in the GitHub repository whtoo/How_to_implment_PL_in_Antlr4 (34 stars, last pushed 3mo ago), licensed BSD-3-Clause. It adds 22 tokens to every session and 1,026 once invoked, about $0.0001 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-04.

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

java-unit-test

为 Spring Boot 项目生成高质量 Java 单元测试代码。当用户要求"写单元测试"、"生成测试用例"、"帮我写 test"、"补充测试覆盖"、"写 JUnit 测试"、"写 Mockito 测试"、"测试这个 Service / Controller / Mapper"时,必须使用此 skill。即使用户只是说"帮我测一下这个方法"或贴出 Java 代码并问"怎么测",也应触发此 skill。.

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

test-quality

Write high-quality JUnit 5 tests with AssertJ assertions. Use when user says "add tests", "write tests", "improve test coverage", or when reviewing/creating test classes for Java code.

decebals/claude-code-java · 45 tokens

refactor

Refactor Java code in this repo without changing behavior. Not for bug fixes or new features.

membrane/api-gateway · 22 tokens

java-regression-test-generator

Automatically generate regression tests for Java codebases by analyzing changes between old and new code versions. Use when users need to: (1) Generate tests after refactoring or code changes, (2) Ensure previously tested behavior still works in new versions, (3) Cover modified or newly added code paths, (4) Migrate…

ArabelaTso/Skills-4-SE · 111 tokens

eclipse-test

Run JUnit tests in Eclipse projects — all tests, by package, by class, or individual test methods. Also build Maven projects.

gradusnikov/eclipse-chatgpt-plugin · 31 tokens