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. This should trigger for requests such as Review Java code for unit tests; Apply best practices for unit tests in Java code. Part of cursor-rules-java project
88
85%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
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 thoroughly covers specific capabilities, includes natural trigger terms, and explicitly addresses both what the skill does and when it should be used. The only minor weakness is that it's somewhat dense and could benefit from slightly better formatting for readability, but the content itself is excellent for skill selection purposes.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | The description 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 with named methodologies (RIGHT-BICEP, CORRECT, A-TRIP), leveraging JSpecify annotations, and eliminating specific anti-patterns. | 3 / 3 |
Completeness | The description explicitly answers both 'what' (review, improve, write Java unit tests with specific techniques) and 'when' with a clear 'Use when...' clause at the start and explicit trigger examples ('This should trigger for requests such as...'). | 3 / 3 |
Trigger Term Quality | Includes strong natural keywords users would say: 'Java unit tests', 'JUnit 4', 'JUnit 5', 'AssertJ', 'Mockito', 'parameterized tests', 'mocking dependencies', 'review Java code for unit tests', 'best practices for unit tests'. These cover a wide range of natural user queries about Java testing. | 3 / 3 |
Distinctiveness Conflict Risk | Highly distinctive — narrowly scoped to Java unit testing with specific frameworks (JUnit 5, AssertJ, Mockito) and methodologies. Unlikely to conflict with general Java skills or non-testing skills due to the precise domain focus. | 3 / 3 |
Total | 12 / 12 Passed |
Implementation
70%Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.
The skill has strong workflow clarity with explicit compile-before and verify-after checkpoints, and good progressive disclosure by deferring detailed patterns to a reference file. However, the body itself lacks any concrete code examples of the test patterns it covers, making it more of a routing document than an actionable guide. The topic enumeration section adds moderate verbosity without proportional value.
Suggestions
Add at least one or two concrete, executable before/after code examples (e.g., JUnit 4 → JUnit 5 migration, or a basic AssertJ assertion pattern) directly in the SKILL.md so it provides immediate actionable guidance without requiring the reference file.
Remove or significantly condense the 'What is covered in this Skill?' bullet list — Claude doesn't need a table of contents when the reference file is linked; a single sentence summarizing scope would suffice.
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The 'What is covered in this Skill?' bullet list is essentially a table of contents that restates information Claude doesn't need upfront — it's moderately verbose. The workflow and constraints sections are reasonably tight, but the introductory enumeration of topics adds tokens without adding actionable value. | 2 / 3 |
Actionability | The skill provides concrete commands (`./mvnw compile`, `./mvnw clean verify`) and a clear workflow, but lacks any executable code examples for the actual test patterns it describes. All substantive guidance is deferred to the reference file, so the SKILL.md itself gives directions rather than copy-paste-ready examples. | 2 / 3 |
Workflow Clarity | The workflow is clearly sequenced with four numbered steps, includes an explicit pre-condition check (compile before changes), a blocking condition (stop if compilation fails), and a post-change verification step. This constitutes a proper feedback loop for a potentially destructive refactoring operation. | 3 / 3 |
Progressive Disclosure | The SKILL.md serves as a concise overview and delegates detailed examples and patterns to a single, clearly referenced file (`references/131-java-testing-unit-testing.md`). Navigation is one level deep and well-signaled. The structure is appropriate for the skill's complexity. | 3 / 3 |
Total | 10 / 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.
Validation — 11 / 11 Passed
Validation for skill structure
No warnings or errors.
762cb86
Table of Contents
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.