CtrlK
BlogDocsLog inGet started
Tessl Logo

126-java-exception-handling

Use when you need to apply Java exception handling best practices — including using specific exception types, managing resources with try-with-resources, securing exception messages, preserving error context via exception chaining, validating inputs early with fail-fast principles, handling thread interruption correctly, documenting exceptions with @throws, enforcing logging policy, translating exceptions at API boundaries, managing retries and idempotency, enforcing timeouts, attaching suppressed exceptions, and propagating failures in async/reactive code. This should trigger for requests such as Exception handling; Use try-with-resources in Java code; Create exception chaining in Java code; Apply fail-fast validation in Java code. Part of cursor-rules-java project

68

Quality

81%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

Quality

Content

62%

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

The skill has a well-structured workflow with proper validation checkpoints (compile before, verify after) and clear stop-on-failure safety constraints. However, it lacks any concrete code examples of the exception handling patterns themselves, deferring everything to the reference file, which weakens actionability. The extensive bullet list of covered topics adds verbosity without adding actionable value at the SKILL.md level.

Suggestions

Add 1-2 concrete before/after code examples of the most common patterns (e.g., try-with-resources, exception chaining) directly in the SKILL.md to improve actionability without requiring the reference file for basic cases.

Trim or remove the 'What is covered' bullet list — it duplicates the reference file's table of contents and doesn't help Claude take action. A single sentence like 'Covers 15 exception handling patterns from specific exception types to async failure propagation' would suffice.

Remove the 'When to use this skill' section as it duplicates the YAML frontmatter trigger descriptions and wastes tokens.

DimensionReasoningScore

Conciseness

The 'What is covered' bullet list is essentially a table of contents for the reference file and adds moderate bloat. The description section and 'When to use this skill' section repeat information from the YAML frontmatter. However, the workflow and constraints sections are reasonably tight.

2 / 3

Actionability

The skill provides concrete commands (mvnw compile, mvn clean verify) and a clear workflow, but lacks any executable code examples of the actual exception handling patterns. All concrete guidance is deferred to the reference file, so the SKILL.md itself gives only abstract direction like 'Refactor to specific exceptions, safe resource handling.'

2 / 3

Workflow Clarity

The workflow is clearly sequenced with four explicit steps, includes a pre-condition check (compile before changes), a stop-if-fail checkpoint, and a post-change verification step. The feedback loop of compile → stop on failure → apply → verify is well-defined for a potentially destructive refactoring operation.

3 / 3

Progressive Disclosure

The skill correctly references a single external file (references/126-java-exception-handling.md) for detailed patterns, which is good one-level-deep disclosure. However, the long bullet list of covered topics is essentially inlining a summary of the reference file's contents, which bloats the overview. Without the bundle file provided, we cannot verify the reference path exists, but the structure is reasonable.

2 / 3

Total

9

/

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.

This is a strong skill description that comprehensively lists specific Java exception handling capabilities, includes natural trigger terms users would use, and explicitly addresses both what the skill does and when it should be triggered. The only minor weakness is that it is quite verbose and could be slightly more concise, but the detail serves the purpose of disambiguation well.

DimensionReasoningScore

Specificity

The description lists numerous specific concrete actions: using specific exception types, managing resources with try-with-resources, securing exception messages, preserving error context via exception chaining, validating inputs with fail-fast principles, handling thread interruption, documenting exceptions with @throws, enforcing logging policy, translating exceptions at API boundaries, managing retries and idempotency, enforcing timeouts, attaching suppressed exceptions, and propagating failures in async/reactive code.

3 / 3

Completeness

The description clearly answers both 'what' (a comprehensive list of Java exception handling best practices) and 'when' (explicitly starts with 'Use when you need to apply Java exception handling best practices' and includes specific trigger phrases like 'This should trigger for requests such as...').

3 / 3

Trigger Term Quality

The description includes many natural keywords users would say: 'exception handling', 'try-with-resources', 'exception chaining', 'fail-fast validation', 'Java code', '@throws', 'retries', 'timeouts', 'async/reactive code'. The explicit trigger examples ('Exception handling; Use try-with-resources in Java code; Create exception chaining in Java code') further reinforce natural user language.

3 / 3

Distinctiveness Conflict Risk

The description is highly specific to Java exception handling best practices, a clear niche that is unlikely to conflict with other skills. The domain (Java), the topic (exception handling), and the numerous specific sub-topics make it very distinguishable from other skills.

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.

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.