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
NewMaintained
Automatic
◆Coding pack
Last verified 8/20/2026
What it changes
Passed 14 of 19 test cases with the skill, and 15 of 19 without it.
Without skill77%
With skill73%
Checks it passed that the model alone missed
Specifies running Maven compile using ./mvnw compile or mvn compile before modifying code
1 fixed15 passed either way4 still failing2 broke
Pass-rate lift
-5 pp
Tokens
-6%
Agent turns
0%
Response time
-34%
Model gemini-3.6-flashMeasured 8/20/2026v116 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
What verification step is required before applying code modifications when refactoring Spring Data JDBC entities in a Maven project?
What was checked, without and with the skill
Checked
Without skill
With skill
Specifies running Maven compile using ./mvnw compile or mvn compile before modifying code
Missed
Passed
case-22 · 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.md59 lines2 files
Spring Data JDBC with Records
Apply Spring Data JDBC guidelines with Java records.
What is covered in this Skill?
Records for entity classes (immutable, constructor-friendly)
@Table for naming when record name differs from the table name
@Embedded to inline value-object columns into the parent row without a separate table
Repository pattern
Immutable updates with static factories for new rows and with* helpers for updates
save() INSERT vs UPDATE semantics driven by @Id nullability
Aggregate boundaries: one repository per aggregate root, Set for one-to-many inside the root, foreign keys between aggregates
Custom queries with @Query and named parameters (no user-input concatenation)
Transaction management (@Transactional on services; readOnly where appropriate)
Single query loading (N+1 avoidance)
Scope: Apply recommendations based on the reference rules and good/bad code examples.
Constraints
Before applying any Spring Data JDBC changes, ensure the project compiles. If compilation fails, stop immediately. After applying 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 good/bad patterns
EDGE CASE: If request scope is ambiguous, stop and ask a clarifying question before applying changes
EDGE CASE: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance
When to use this skill
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 optimistic locking or domain events in Spring Data JDBC
Use when you need to add or review Mongock MongoDB data migrations in a Spring Boot application — including Maven coordinates, Spring Data MongoDB drivers, migration scan packages, @ChangeUnit classes, lock/transaction settings, and optional policy-approved MongoDB integration verification. This should trigger for requests such as Add Mongock migrations in Spring Boot; Review Spring MongoDB data migrations; Configure Mongock change units for Spring Data MongoDB; Create Mongock change units for S