Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
.claude/skills/loulanyue-java-coding-standards/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 142% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 22% | 0% |
| case-15 | ✓→✓ | = Same ✓ | 11% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 95% | 0% |
Standards for readable, maintainable Java (17+) code in Spring Boot services.
java// ✅ Classes/Records: PascalCase public class MarketService {} public record Money(BigDecimal amount, Currency currency) {} // ✅ Methods/fields: camelCase private final MarketRepository marketRepository; public Market findBySlug(String slug) {} // ✅ Constants: UPPER_SNAKE_CASE private static final int MAX_PAGE_SIZE = 100;
java// ✅ Favor records and final fields public record MarketDto(Long id, String name, MarketStatus status) {} public class Market { private final Long id; private final String name; // getters only, no setters }
java// ✅ Return Optional from find* methods Optional<Market> market = marketRepository.findBySlug(slug); // ✅ Map/flatMap instead of get() return market .map(MarketResponse::from) .orElseThrow(() -> new EntityNotFoundException("Market not found"));
java// ✅ Use streams for transformations, keep pipelines short List<String> names = markets.stream() .map(Market::name) .filter(Objects::nonNull) .toList(); // ❌ Avoid complex nested streams; prefer loops for clarity
MarketNotFoundException)catch (Exception ex) unless rethrowing/logging centrallyjavathrow new MarketNotFoundException(slug);
javapublic <T extends Identifiable> Map<Long, T> indexById(Collection<T> items) { ... }
src/main/java/com/example/app/
config/
controller/
service/
repository/
domain/
dto/
util/
src/main/resources/
application.yml
src/test/java/... (mirrors main)javaprivate static final Logger log = LoggerFactory.getLogger(MarketService.class); log.info("fetch_market slug={}", slug); log.error("failed_fetch_market slug={}", slug, ex);
@Nullable only when unavoidable; otherwise use @NonNull@NotNull, @NotBlank) on inputsRemember: Keep code intentional, typed, and observable. Optimize for maintainability over micro-optimizations unless proven necessary.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 8,897 | 6,936 | -22% | 1 | 1 | 0% | 1,647 | 2,137 | +30% | 0 | 0 | — |
case-02 | pass→pass | 7,851 | 5,170 | -34% | 1 | 1 | 0% | 1,498 | 1,823 | +22% | 0 | 0 | — |
case-15 | pass→pass | 12,094 | 7,544 | -38% | 1 | 1 | 0% | 2,059 | 2,283 | +11% | 0 | 0 | — |
case-03 | pass→pass | 4,914 | 3,584 | -27% | 1 | 1 | 0% | 816 | 1,588 | +95% | 0 | 0 | — |
case-04 | fail→pass | 24,305 | 10,368 | -57% | 1 | 1 | 0% | 1,187 | 2,873 | +142% | 0 | 0 | — |
case-05 | pass→pass | 7,447 | 3,378 | -55% | 1 | 1 | 0% | 1,336 | 1,573 | +18% | 0 | 0 | — |
case-06 | pass→pass | 11,538 | 10,109 | -12% | 1 | 1 | 0% | 2,061 | 2,823 | +37% | 0 | 0 | — |
case-07 | pass→pass | 13,316 | 8,954 | -33% | 1 | 1 | 0% | 2,493 | 2,672 | +7% | 0 | 0 | — |
case-08 | pass→pass | 10,458 | 6,695 | -36% | 1 | 1 | 0% | 1,717 | 2,063 | +20% | 0 | 0 | — |
case-09 | pass→pass | 6,588 | 3,093 | -53% | 1 | 1 | 0% | 1,076 | 1,454 | +35% | 0 | 0 | — |
case-10 | pass→pass | 13,527 | 7,650 | -43% | 1 | 1 | 0% | 2,160 | 2,274 | +5% | 0 | 0 | — |
case-25 | pass→pass | 14,415 | 11,365 | -21% | 1 | 1 | 0% | 2,898 | 3,065 | +6% | 0 | 0 | — |
case-11 | pass→pass | 13,085 | 7,707 | -41% | 1 | 1 | 0% | 2,404 | 2,309 | -4% | 0 | 0 | — |
case-12 | pass→pass | 11,993 | 9,878 | -18% | 1 | 1 | 0% | 2,008 | 2,681 | +34% | 0 | 0 | — |
case-13 | pass→pass | 12,658 | 10,036 | -21% | 1 | 1 | 0% | 2,168 | 2,524 | +16% | 0 | 0 | — |
case-14 | pass→pass | 11,944 | 8,184 | -31% | 1 | 1 | 0% | 2,000 | 2,362 | +18% | 0 | 0 | — |
case-16 | pass→pass | 12,575 | 5,568 | -56% | 1 | 1 | 0% | 2,307 | 1,946 | -16% | 0 | 0 | — |
case-17 | pass→pass | 8,095 | 6,568 | -19% | 1 | 1 | 0% | 1,679 | 2,116 | +26% | 0 | 0 | — |
case-18 | pass→pass | 11,664 | 12,542 | +8% | 1 | 1 | 0% | 1,829 | 3,020 | +65% | 0 | 0 | — |
case-19 | pass→pass | 12,932 | 11,802 | -9% | 1 | 1 | 0% | 2,288 | 3,128 | +37% | 0 | 0 | — |
case-20 | pass→pass | 3,871 | 3,017 | -22% | 1 | 1 | 0% | 690 | 1,472 | +113% | 0 | 0 | — |
case-21 | pass→pass | 4,263 | 2,451 | -43% | 1 | 1 | 0% | 634 | 1,314 | +107% | 0 | 0 | — |
case-22 | pass→pass | 9,017 | 6,997 | -22% | 1 | 1 | 0% | 1,670 | 2,024 | +21% | 0 | 0 | — |
case-23 | pass→pass | 9,588 | 9,400 | -2% | 1 | 1 | 0% | 1,770 | 2,669 | +51% | 0 | 0 | — |
case-24 | pass→pass | 15,522 | 12,226 | -21% | 1 | 1 | 0% | 2,852 | 3,070 | +8% | 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. 25 cases were attempted, and 24 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +8 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.
Other measured skills in the registry, with their headline benchmark lift.