CtrlK
BlogDocsLog inGet started
Tessl Logo

141-java-refactoring-with-modern-features

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

94

Quality

92%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

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 an excellent skill description that clearly communicates its purpose and when to use it. It opens with an explicit 'Use when' clause, provides comprehensive coverage of specific Java modernization tasks spanning multiple Java versions, and uses natural terminology that developers would actually use. The only minor issue is the trailing 'Part of the skills-for-java project' which adds no selection value.

DimensionReasoningScore

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 'flexible constructor bodies and module import declarations'.

3 / 3

Completeness

Clearly answers both what (refactor Java code to adopt modern features with extensive list of specific transformations) AND when ('Use when you need to refactor Java code to adopt modern Java features') with explicit trigger guidance at the start.

3 / 3

Trigger Term Quality

Excellent coverage of natural terms users would say: 'refactor Java code', 'lambdas', 'Stream API', 'Optional', 'null safety', 'java.time', 'text blocks', 'var inference', 'Java 8+', 'Java 25 features'. These are terms developers naturally use when discussing Java modernization.

3 / 3

Distinctiveness Conflict Risk

Highly distinctive with a clear niche: Java modernization/refactoring specifically. The detailed list of Java-specific features (lambdas, Stream API, java.time, Optional) makes it unlikely to conflict with general code refactoring or other language skills.

3 / 3

Total

12

/

12

Passed

Implementation

85%

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

This is a well-structured skill that efficiently outlines modern Java refactoring scope with clear validation workflows and appropriate progressive disclosure. The main weakness is that all concrete code examples are deferred to the reference file, making the skill body less immediately actionable for quick reference. The constraints section with mandatory compilation checks demonstrates good safety practices.

Suggestions

Add 1-2 brief inline code examples showing before/after patterns for the most common refactoring (e.g., anonymous class to lambda) to make the skill immediately actionable without requiring reference file access

DimensionReasoningScore

Conciseness

The skill is lean and efficient, providing a clear list of covered features without explaining what lambdas or streams are. Every section serves a purpose and assumes Claude's competence with Java concepts.

3 / 3

Actionability

The skill provides concrete commands (mvnw compile, mvn clean verify) but lacks executable code examples directly in the skill body. All actual code patterns are deferred to the reference file, making the main skill less immediately actionable.

2 / 3

Workflow Clarity

Clear workflow with explicit validation checkpoints: compile before changes, stop if compilation fails, verify after changes. The sequence is unambiguous with a proper feedback loop for error handling.

3 / 3

Progressive Disclosure

Excellent structure with a concise overview of covered features, clear constraints section, and a single well-signaled reference to the detailed guidance file. One level deep, easy to navigate.

3 / 3

Total

11

/

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.