Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
SkillScore95Maintained
Automatic
◆Coding pack
Last verified 8/3/2026
What it changes
Passed 21 of 22 test cases with the skill, and 20 of 22 without it.
Without skill91%
With skill95%
Checks it passed that the model alone missed
Transforms the Optional returned by repository using map and orElseThrow
1 fixed20 passed either way1 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+14%
Agent turns
0%
Response time
-28%
Model gemini-3.6-flashMeasured 8/3/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
A test case the skill fixed. Same model, same prompt, with and without the skill.
Prompt
Please write a Spring Boot service method that queries a repository for a market using its slug, transforms the result into a response object, throws a domain exception if absent, and writes appropriate log entries. Include a unit test for this method.
What was checked, without and with the skill
Checked
Without skill
With skill
Uses AssertJ assertThat syntax for assertions in the test
Passed
Passed
Transforms the Optional returned by repository using map and orElseThrow
Missed
Passed
Uses SLF4J parameterized log placeholders instead of string concatenation
Passed
Passed
case-02 · gemini-3.6-flash · 8/3/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md133 linessingle file
Java Coding Standards
Standards for readable, maintainable Java (17+) code in Spring Boot services.
Core Principles
Prefer clarity over cleverness
Immutable by default; minimize shared mutable state
Fail fast with meaningful exceptions
Consistent naming and package structure
Naming
// ✅ 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;
Immutability
// ✅ 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
}