How_to_implment_PL_in_Antlr4: Skill for Claude Code

.claude/skills/test-dev/SKILL.md

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.

This is whtoo/How_to_implment_PL_in_Antlr4's own configuration. It tells Claude Code how to work on How_to_implment_PL_in_Antlr4 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 How_to_implment_PL_in_Antlr4 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to whtoo/How_to_implment_PL_in_Antlr4. 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/whtoo/How_to_implment_PL_in_Antlr4/main/.claude/skills/test-dev/SKILL.md
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/github.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/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 test-dev

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00022 $0.01026
Opus 5.5 $0.00009 $0.00410
Sonnet 5.5 $0.00004 $0.00205
Haiku 4.5 $0.00002 $0.00103

Measured 1mo ago against content hash 0fa6ec233763, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/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. 1mo ago 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 5mo 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.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-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

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

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

testng-skill

Generates TestNG tests in Java with groups, data providers, parallel execution, XML suite configuration, and listeners. Use when user mentions "TestNG", "@DataProvider", "testng.xml", "groups". Triggers on: "TestNG", "@DataProvider", "testng.xml", "TestNG suite", "parallel tests Java".

LambdaTest/agent-skills · 75 tokens

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens