Use when you need to refactor Java code to adopt modern Java features (Java 8+) — including migrating anonymous classes to lambdas, replacing Iterator loops with Stream API, adopting Optional for null safety, switching from legacy Date/Calendar to java.time, using collection factory methods, applying text blocks, var inference, or leveraging Java 25 features like flexible constructor bodies and module import declarations. Part of the skills-for-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 clearly communicates its purpose, lists numerous specific modernization transformations, and opens with an explicit 'Use when' trigger clause. The description includes rich, natural trigger terms that Java developers would use and is distinctive enough to avoid conflicts with other skills. Minor note: it could slightly benefit from trimming verbosity, but the detail serves the disambiguation purpose well.
| Dimension | Reasoning | Score |
|---|---|---|
Specificity | Lists multiple specific concrete actions: migrating anonymous classes to lambdas, replacing Iterator loops with Stream API, adopting Optional for null safety, switching from legacy Date/Calendar to java.time, using collection factory methods, applying text blocks, var inference, and Java 25 features like flexible constructor bodies and module import declarations. | 3 / 3 |
Completeness | Clearly answers both 'what' (refactor Java code to adopt modern Java features with a detailed list of specific transformations) and 'when' (opens with 'Use when you need to refactor Java code to adopt modern Java features'), providing explicit trigger guidance. | 3 / 3 |
Trigger Term Quality | Excellent coverage of natural terms a user would say: 'refactor Java code', 'lambdas', 'Stream API', 'Optional', 'null safety', 'java.time', 'text blocks', 'var inference', 'anonymous classes', 'modern Java features', 'Java 8+', 'Java 25'. These are terms developers naturally use when discussing Java modernization. | 3 / 3 |
Distinctiveness Conflict Risk | Highly distinctive — narrowly scoped to Java modernization/refactoring with specific feature migrations listed. Unlikely to conflict with general Java coding skills, code review skills, or other language skills due to the precise focus on legacy-to-modern Java transformations. | 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 good structure with clear workflow steps, proper validation checkpoints, and appropriate progressive disclosure to a reference file. However, it spends tokens listing features Claude already understands and lacks any inline code examples of the actual refactoring patterns, making the body feel more like a table of contents than actionable guidance. Including at least one or two concrete before/after code snippets would significantly improve actionability.
Suggestions
Add 1-2 concrete before/after code examples inline (e.g., anonymous class → lambda, Iterator loop → Stream) so the skill body itself is actionable without requiring the reference file for basic patterns.
Trim the 'What is covered' bullet list — Claude already knows what lambdas, Streams, and Optional are. Replace with a terse summary like 'Covers Java 8+ features: lambdas, streams, Optional, java.time, collection factories, text blocks, var, and Java 25 features (JEP 513, 511).'
| Dimension | Reasoning | Score |
|---|---|---|
Conciseness | The bullet list of covered features is somewhat verbose and largely tells Claude things it already knows. The 'What is covered in this Skill?' section could be trimmed significantly. However, the constraints section is reasonably tight. | 2 / 3 |
Actionability | The skill provides concrete commands for compilation and verification (`./mvnw compile`, `./mvnw clean verify`), but contains zero code examples of the actual refactoring patterns — all concrete guidance is deferred to the reference file. The skill body itself describes rather than instructs for the core task. | 2 / 3 |
Workflow Clarity | The workflow is clearly sequenced: compile first → stop if failure → apply changes → run full verify. This includes explicit validation checkpoints and a feedback loop (stop and fix if compilation fails before proceeding), which is appropriate for a potentially destructive refactoring operation. | 3 / 3 |
Progressive Disclosure | The skill provides a clear overview with a single, well-signaled reference to the detailed guide. The split between overview/constraints in SKILL.md and detailed examples in the reference file is appropriate and one level deep. | 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.
9ec21dd
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.