CtrlK
BlogDocsLog inGet started
Tessl Logo

128-java-generics

Use when you need to review, improve, or refactor Java code for generics quality — including avoiding raw types, applying the PECS (Producer Extends Consumer Super) principle for wildcards, using bounded type parameters, designing effective generic methods, leveraging the diamond operator, understanding type erasure implications, handling generic inheritance correctly, preventing heap pollution with @SafeVarargs, and integrating generics with modern Java features like Records, sealed types, and pattern matching. This should trigger for requests such as Improve the code with Generics; Apply Generics; Refactor the code with Generics. Part of cursor-rules-java project

69

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.

The body is a well-structured overview with a strong validation-gated workflow and clean one-level reference disclosure. Its weaknesses are mild redundancy (compile/verify steps stated twice, triggers duplicated from the description) and abstract refactoring guidance that relies on the reference rather than inline examples.

Suggestions

Remove the duplicate compile/verify instructions — state them once in the Workflow and reference them from Constraints, or vice versa.

Replace the abstract 'Implement selected generic type and API improvements' step with one or two concrete before/after code snippets so the core task is actionable without opening the reference.

Drop the 'When to use this skill' section since its trigger phrases already appear in the frontmatter description, avoiding repetition.

DimensionReasoningScore

Conciseness

Mostly efficient with terse bullets and no concept explanations Claude already knows, but the compile/verify commands are duplicated between 'Constraints' and 'Workflow', and 'When to use this skill' repeats the description's triggers, so it could be tightened.

2 / 3

Actionability

Provides concrete executable commands ('./mvnw compile', './mvnw clean verify'), but the core refactoring guidance is abstract and deferred ('Implement selected generic type and API improvements while preserving behavior') with no inline examples, leaving key details in the reference.

2 / 3

Workflow Clarity

Clear four-step sequence with explicit validation checkpoints (compile before, verify after) and an error-recovery feedback loop ('stop immediately if compilation fails'), reinforced by the Constraints and edge-case handling.

3 / 3

Progressive Disclosure

SKILL.md is a concise overview pointing to a single one-level-deep reference (references/128-java-generics.md, a real existing file) that is clearly signaled, with content appropriately split between overview and detailed examples.

3 / 3

Total

10

/

12

Passed

Description

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.

The description is specific, complete, and distinct: it names concrete generics actions, provides explicit 'Use when' triggers plus example requests, and occupies a clear Java-generics niche. It is somewhat long due to the enumerated capability list, but each item is a concrete action rather than filler.

DimensionReasoningScore

Specificity

Lists many concrete actions — 'avoiding raw types', 'applying the PECS principle for wildcards', 'using bounded type parameters', 'leveraging the diamond operator', 'preventing heap pollution with @SafeVarargs' — matching the 'multiple specific concrete actions' anchor.

3 / 3

Completeness

Explicitly answers both what (review/improve/refactor Java generics across listed areas) and when ('Use when you need to...' plus 'This should trigger for requests such as...'), satisfying the top anchor.

3 / 3

Trigger Term Quality

Includes natural phrasings a user would actually say — 'review, improve, or refactor Java code for generics quality' and explicit triggers 'Improve the code with Generics; Apply Generics; Refactor the code with Generics'.

3 / 3

Distinctiveness Conflict Risk

Targets a clear niche — Java generics specifically — with distinct triggers ('Java code for generics quality'), making overlap with unrelated skills unlikely.

3 / 3

Total

12

/

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.