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. This should trigger for requests such as Review Java code for modern Java development; Apply best practices for modern Java development in Java code. Part of cursor-rules-java project

67

Quality

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Quality

Content

70%

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

A well-structured, lean skill body with a clear validated workflow and clean one-level progressive disclosure. The main gaps are mild redundancy between the Constraints and Workflow sections and an abstract central refactoring step that relies entirely on the reference for actionable detail.

Suggestions

De-duplicate the compile/verify commands: state them once in the Workflow and reference them from Constraints, or vice versa, to tighten token use.

Add one or two concrete before/after refactoring snippets (e.g. anonymous class → lambda) directly in the body so the core action is actionable without opening the reference, or make the delegation in step 3 more specific about which reference sections to consult.

Remove or fold the 'When to use this skill' section since its bullets repeat the description's trigger phrases.

DimensionReasoningScore

Conciseness

Mostly efficient with no concept over-explanation, but the build commands ('./mvnw compile', 'mvn clean verify') are repeated in both the Constraints and Workflow sections, and the 'When to use this skill' bullets duplicate trigger phrases already in the description, so it could be tightened.

2 / 3

Actionability

Concrete copy-paste commands are present for compile/verify, but the core refactoring step is abstract ('Refactor incrementally using appropriate language/library features') with no code examples in the body, leaving key details delegated to the reference.

2 / 3

Workflow Clarity

A clear four-step sequence with explicit validation checkpoints (compile before, verify after), a stop-on-failure feedback loop, and edge-case handling (ask a clarifying question when scope is ambiguous; report missing inputs), matching the anchor-3 example.

3 / 3

Progressive Disclosure

The body is a concise overview that signals a single one-level-deep reference ('references/141-java-refactoring-with-modern-features.md', verified present) in both the Workflow and a dedicated Reference section, with content appropriately split out.

3 / 3

Total

10

/

12

Passed

Description

90%

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

A strong, specific description with explicit what/when triggers and good natural-language trigger terms. The only weakness is the second-person 'you need' phrasing, which costs it a specificity point per the voice guideline.

Suggestions

Rewrite the opening in third person to avoid the second-person voice penalty, e.g. 'Refactors Java code to adopt modern Java features (Java 8+). Use when the user asks to modernize or review Java code for best practices.'

The trailing 'Part of cursor-rules-java project' is metadata that does not aid triggering; consider moving it into frontmatter metadata rather than the description.

DimensionReasoningScore

Specificity

Lists many 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'), which is anchor-3 material, but the opening 'Use when you need to refactor' is second-person voice, so per the guideline specificity is reduced by 1.

2 / 3

Completeness

Clearly answers both what ('refactor Java code to adopt modern Java features' with an enumerated list) and when ('Use when you need to refactor...' plus 'This should trigger for requests such as...'), matching the anchor-3 example with explicit triggers.

3 / 3

Trigger Term Quality

Good coverage of natural phrases users would say — 'refactor Java code', 'modern Java features', and explicit trigger requests 'Review Java code for modern Java development' and 'Apply best practices for modern Java development in Java code'.

3 / 3

Distinctiveness Conflict Risk

Clear niche (modern Java refactoring, Java 8+ through Java 25) with distinct triggers and a project tag ('Part of cursor-rules-java project'), making overlap with unrelated skills unlikely.

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.

Validation16 / 16 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.