Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
SkillScore100Maintained
Automatic
◆Coding pack
Last verified 8/22/2026
What it changes
Passed 24 of 24 test cases with the skill, and 22 of 24 without it.
Without skill92%
With skill100%
Checks it passed that the model alone missed
The code contains no setter methods.
The custom exception extends `RuntimeException`.
The response creates or throws a domain-specific exception type like `CustomerNotFoundException`.
2 fixed23 passed either way0 still failing0 broke
Pass-rate lift
+8 pp
Tokens
+23%
Agent turns
0%
Response time
-27%
Model gemini-3.6-flashMeasured 8/22/2026v725 of 25 cases passed with skill · 24 comparable
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
Create a Java 17 data transfer object named `UserProfileDto` to carry `id`, `name`, and `email`. I am thinking of using a standard Java class with private mutable fields, getters, setters, and an empty no-arg constructor so callers can modify fields after creation. Show me how to structure this type.
What was checked, without and with the skill
Checked
Without skill
With skill
The response declares `UserProfileDto` using a Java record.
Passed
Passed
The code contains no setter methods.
Missed
Passed
case-01 · gemini-3.6-flash · 8/22/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md148 linessingle file
Java Coding Standards
Standards for readable, maintainable Java (17+) code in Spring Boot services.
When to Activate
Writing or reviewing Java code in Spring Boot projects
Enforcing naming, immutability, or exception handling conventions
Working with records, sealed classes, or pattern matching (Java 17+)
Reviewing use of Optional, streams, or generics
Structuring packages and project layout
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) {}
Idiomatic Kotlin patterns, best practices, and conventions for building robust, efficient, and maintainable Kotlin applications with coroutines, null safety, and DSL builders.