CtrlK
BlogDocsLog inGet started
Tessl Logo

131-java-testing-unit-testing

Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions (RIGHT-BICEP, CORRECT, A-TRIP), leveraging JSpecify null-safety annotations, or eliminating testing anti-patterns such as reflection-based tests or shared mutable state. Part of the skills-for-java project

83

Quality

78%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./skills/131-java-testing-unit-testing/SKILL.md
SKILL.md
Quality
Evals
Security

Quality

Discovery

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

This is a strong skill description that clearly communicates its purpose with an explicit 'Use when' trigger clause, lists numerous specific capabilities and frameworks, and uses natural keywords Java developers would employ. The description is highly distinctive due to its narrow focus on Java unit testing with named tools and methodologies, making it easy to differentiate from other skills.

DimensionReasoningScore

Specificity

Lists numerous specific concrete actions: migrating JUnit 4 to JUnit 5, adopting AssertJ, structuring with Given-When-Then, applying parameterized tests, mocking with Mockito, verifying boundary conditions, leveraging JSpecify annotations, eliminating anti-patterns like reflection-based tests or shared mutable state.

3 / 3

Completeness

Opens with an explicit 'Use when' clause that clearly answers both what (review, improve, write Java unit tests with specific techniques) and when (migrating JUnit versions, adopting AssertJ, structuring tests, mocking, etc.). The trigger guidance is explicit and comprehensive.

3 / 3

Trigger Term Quality

Excellent coverage of natural terms users would say: 'unit tests', 'JUnit 4', 'JUnit 5', 'AssertJ', 'Mockito', 'parameterized tests', 'mocking dependencies', 'Given-When-Then', 'null-safety', 'JSpecify', 'testing anti-patterns'. These are terms Java developers naturally use when seeking testing help.

3 / 3

Distinctiveness Conflict Risk

Highly distinctive — narrowly scoped to Java unit testing with specific frameworks (JUnit 4/5, AssertJ, Mockito, JSpecify) and methodologies (RIGHT-BICEP, CORRECT, A-TRIP). Unlikely to conflict with general coding skills or non-Java testing skills.

3 / 3

Total

12

/

12

Passed

Implementation

57%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The skill has good structure and progressive disclosure, correctly delegating detailed patterns to a reference file while keeping the overview lean. Its main weaknesses are the lack of any concrete code examples in the skill body itself (making it hard to act on without reading the reference) and a workflow that, while present, lacks a complete feedback loop for post-verification failures. The bullet list of topics covered is borderline unnecessary given the reference file exists.

Suggestions

Add at least one concrete before/after code example (e.g., JUnit 4 → JUnit 5 migration or an AssertJ assertion pattern) directly in the skill body so Claude has immediately actionable guidance without needing to read the reference.

Expand the workflow into a numbered sequence that includes what to do if `clean verify` fails after applying changes (feedback loop for test failures, not just compilation failures).

Consider condensing or removing the 'What is covered' bullet list — it largely duplicates the reference file's table of contents and doesn't add actionable value.

DimensionReasoningScore

Conciseness

The 'What is covered' bullet list is essentially a table of contents for the reference file and adds moderate value, but the introductory line and scope statement are somewhat redundant. The content is not egregiously verbose but could be tightened — e.g., the bullet list could be removed or condensed since it mostly restates the description.

2 / 3

Actionability

The constraints section provides concrete commands (`./mvnw compile`, `./mvnw clean verify`) which is good, but the skill body contains zero code examples, no concrete test patterns, and no executable guidance — it entirely delegates to the reference file. Claude would need to read the reference to do anything useful.

2 / 3

Workflow Clarity

There is a clear compile-before/verify-after workflow with an explicit blocking condition on compilation failure, which is good. However, the steps are not fully sequenced (no numbered workflow), and there's no feedback loop for what to do if `clean verify` fails after applying changes.

2 / 3

Progressive Disclosure

The skill is structured as a concise overview with a single, clearly signaled reference file for detailed examples and patterns. Navigation is one level deep and well-organized with clear section headers.

3 / 3

Total

9

/

12

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation11 / 11 Passed

Validation for skill structure

No warnings or errors.

Repository
jabrena/cursor-rules-java
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.