Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when implementing error handling, exception mappers, or error response formatting. Enforces RFC 9457 (Problem Details for HTTP APIs) using Spring's built-in ProblemDetail.
.claude/skills/rrezartprebreza-problem-details-rfc9457/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -65% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -14% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-23 | ✗→✓ | ▲ Improved | -16% | 0% |
Inspect existing advice, security entry points and API tests first. Keep one error policy per API. Success DTOs or success envelopes can coexist with Problem Details errors: RFC 9457 specifies errors, not success representations.
For an API using Problem Details, enable Spring's built-in MVC exception handling:
yamlspring: mvc: problemdetails: enabled: true
For WebFlux use spring.webflux.problemdetails.enabled and reactive exception handling; the servlet templates below are not WebFlux handlers.
Use the compiled DomainException together with ProblemDetailExceptionHandler. The handler maps all subclasses using their declared status and stable error code:
Each public class has its own file. These are API-facing exceptions with HTTP status metadata; for a framework-free domain, keep domain exceptions independent and map them in the web adapter. Do not expose arbitrary persistence or infrastructure exception messages.
The advice extends ResponseEntityExceptionHandler to preserve Spring's handling of framework exceptions. Validation returns 400 with field violations; unexpected failures return a generic 500 while retaining the full exception only in server logs. Keep nullable validation messages safe. Filter-level authentication failures need an AuthenticationEntryPoint; authorization failures need an AccessDeniedHandler. Controller advice does not cover the security filter chain.
json{ "type": "https://api.example.com/errors/order_not_found", "title": "Not Found", "status": 404, "detail": "Order not found", "instance": "/api/orders/123", "errorCode": "ORDER_NOT_FOUND" }
Use project-owned, stable URIs for custom problem types. An explicit type is optional; when omitted it defaults to about:blank. Its title should then match the HTTP status phrase. The HTTP status and the body status must agree. Use application/problem+json for JSON problems. Use extensions such as errorCode or violations for machine-readable details instead of requiring clients to parse human-readable messages.
Test actual HTTP responses for domain 404/422, validation 400, unexpected 500, and framework errors such as malformed JSON and unsupported methods. Assert content type, status, stable error codes and absence of stack traces or internal messages. Separately test filter 401/403. The repository verification fixture imports these exact templates for both Boot versions.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 5,096 | 3,332 | -35% | 1 | 1 | 0% | 783 | 1,226 | +57% | 0 | 0 | — |
case-02 | fail→pass | 28,728 | 5,060 | -82% | 1 | 1 | 0% | 4,806 | 1,672 | -65% | 0 | 0 | — |
case-03 | pass→pass | 7,427 | 6,574 | -11% | 1 | 1 | 0% | 1,241 | 1,635 | +32% | 0 | 0 | — |
case-04 | pass→pass | 7,019 | 3,325 | -53% | 1 | 1 | 0% | 1,124 | 1,232 | +10% | 0 | 0 | — |
case-05 | pass→pass | 7,581 | 4,548 | -40% | 1 | 1 | 0% | 1,276 | 1,464 | +15% | 0 | 0 | — |
case-06 | pass→pass | 13,590 | 6,842 | -50% | 1 | 1 | 0% | 2,258 | 2,001 | -11% | 0 | 0 | — |
case-07 | fail→pass | 11,873 | 5,711 | -52% | 1 | 1 | 0% | 2,018 | 1,734 | -14% | 0 | 0 | — |
case-08 | pass→pass | 44,245 | 11,463 | -74% | 1 | 1 | 0% | 3,034 | 2,641 | -13% | 0 | 0 | — |
case-09 | pass→pass | 12,572 | 8,786 | -30% | 1 | 1 | 0% | 2,168 | 2,233 | +3% | 0 | 0 | — |
case-10 | pass→pass | 15,042 | 9,237 | -39% | 1 | 1 | 0% | 2,589 | 2,522 | -3% | 0 | 0 | — |
case-11 | fail→pass | 15,547 | 9,194 | -41% | 1 | 1 | 0% | 2,344 | 2,194 | -6% | 0 | 0 | — |
case-12 | pass→pass | 6,994 | 3,621 | -48% | 1 | 1 | 0% | 1,066 | 1,326 | +24% | 0 | 0 | — |
case-13 | pass→pass | 15,505 | 6,692 | -57% | 1 | 1 | 0% | 2,581 | 1,844 | -29% | 0 | 0 | — |
case-14 | pass→pass | 14,445 | 12,318 | -15% | 1 | 1 | 0% | 2,288 | 3,084 | +35% | 0 | 0 | — |
case-15 | pass→pass | 15,372 | 11,197 | -27% | 1 | 1 | 0% | 2,598 | 2,804 | +8% | 0 | 0 | — |
case-16 | pass→pass | 9,382 | 5,835 | -38% | 1 | 1 | 0% | 1,376 | 1,902 | +38% | 0 | 0 | — |
case-17 | pass→pass | 17,127 | 11,771 | -31% | 1 | 1 | 0% | 3,334 | 3,077 | -8% | 0 | 0 | — |
case-18 | pass→pass | 12,767 | 15,619 | +22% | 1 | 1 | 0% | 1,885 | 2,082 | +10% | 0 | 0 | — |
case-19 | pass→pass | 37,216 | 25,029 | -33% | 1 | 1 | 0% | 3,631 | 4,917 | +35% | 0 | 0 | — |
case-20 | pass→pass | 17,840 | 12,467 | -30% | 1 | 1 | 0% | 3,188 | 3,202 | +0% | 0 | 0 | — |
case-21 | pass→pass | 12,269 | 8,572 | -30% | 1 | 1 | 0% | 2,134 | 2,099 | -2% | 0 | 0 | — |
case-22 | fail→pass | 45,947 | 25,456 | -45% | 1 | 1 | 0% | 4,543 | 5,215 | +15% | 0 | 0 | — |
case-23 | fail→pass | 28,440 | 20,826 | -27% | 1 | 1 | 0% | 5,941 | 4,963 | -16% | 0 | 0 | — |
case-24 | pass→pass | 25,814 | 21,420 | -17% | 1 | 1 | 0% | 5,284 | 5,575 | +6% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +21 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 9/1/2026 | +9% |
Other measured skills in the registry, with their headline benchmark lift.