Use when you need to design, review, or improve validation in Spring Boot applications — including Bean Validation on request DTOs, @Valid/@Validated at API boundaries, constraint groups, custom constraints, @ConfigurationProperties validation, nested DTO validation, and consistent validation error handling. This should trigger for requests such as Add validation support in Spring Boot; Review Spring Boot validation rules; Improve request validation in Spring Boot REST APIs; Add custom Bean Vali
SkillScore86Maintained
Automatic
◆Coding pack
Last verified 8/20/2026
What it changes
Passed 16 of 19 test cases with the skill, and 16 of 19 without it.
Without skill82%
With skill86%
Checks it passed that the model alone missed
Configures both `min` and `max` parameters on the constraint annotation.
1 fixed18 passed either way3 still failing0 broke
Pass-rate lift
+5 pp
Tokens
+7%
Agent turns
0%
Response time
-18%
Model gemini-3.6-flashMeasured 8/20/2026v119 of 22 cases passed with skill · 19 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
A developer wants to ensure a string field `bio` has at most 500 characters and a list field `tags` has between 1 and 10 elements. What single constraint annotation works for both string length and collection size checking?
What was checked, without and with the skill
Checked
Without skill
With skill
Annotates target fields with `@Size`.
Passed
Passed
Configures both `min` and `max` parameters on the constraint annotation.
Missed
Passed
case-19 · gemini-3.6-flash · 8/20/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md53 lines2 files
Spring Boot Validation Guidelines
Apply Spring Boot validation best practices at API boundaries.
What is covered in this Skill?
Bean Validation annotations on DTOs and command models
@Valid / @Validated on controllers and method parameters
Validation groups for create/update workflows
Custom constraint annotations and validators
Consistent 400 error responses for validation failures
Scope: Apply recommendations based on the reference rules and good/bad examples.
Constraints
Before applying validation changes, ensure the project compiles. After improvements, run full verification.
MANDATORY: Run ./mvnw compile or mvn compile before applying any change
SAFETY: If compilation fails, stop immediately
VERIFY: Run ./mvnw clean verify or mvn clean verify after applying improvements
BEFORE APPLYING: Read the reference for detailed rules and examples
When to use this skill
Add validation support in Spring Boot
Review Spring Boot validation rules
Improve request validation in Spring Boot REST APIs
Add custom Bean Validation constraints in Spring Boot
Validate configuration properties in Spring Boot
Improve nested DTO validation in Spring Boot
Workflow
Read reference and assess project context
Read references/303-frameworks-spring-boot-validation.md and inspect the current project setup before proposing changes.
Use when you need to use Spring Data JDBC with Java records — including entity design with records, repository pattern, immutable updates, aggregate relationships, custom queries, transaction management, and avoiding N+1 problems. This should trigger for requests such as Review Java code for Spring Data JDBC; Apply best practices for Spring Data JDBC in Java code; Model Spring Data JDBC aggregates with Java records; Review Spring Data JDBC repositories and aggregate boundaries; Improve optimisti