codingby loulanyue
JPA/Hibernate Patterns
loulanyue/jpa-patterns
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
What it changes
Passed 21 of 22 test cases with the skill, and 19 of 22 without it.
Without skill86%
With skill95%
Checks it passed that the model alone missed
- Sets spring.datasource.hikari.minimum-idle to 5
- Sets spring.datasource.hikari.maximum-pool-size to 20
- Sets spring.datasource.hikari.validation-timeout to 5000
and 1 more in the full report
2 fixed19 passed either way1 still failing0 broke
- Pass-rate lift
- +9 pp
- Tokens
- +25%
- Agent turns
- 0%
- Response time
- -33%
Model gemini-3.6-flashMeasured 8/22/2026v621 of 22 cases passed with skill
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
PromptProvide standard production HikariCP property settings for maximum pool size and connection timeout in Spring Boot application configuration.
What was checked, without and with the skill| Checked | Without skill | With skill |
|---|
| Sets spring.datasource.hikari.maximum-pool-size to 20 | Missed | Passed |
|---|
| Sets spring.datasource.hikari.connection-timeout to 30000 | Passed | Passed |
|---|
What's inside
The instructions your model reads when the skill loads.
SKILL.md152 linessingle file
JPA/Hibernate Patterns
Use for data modeling, repositories, and performance tuning in Spring Boot.
When to Activate
- Designing JPA entities and table mappings
- Defining relationships (@OneToMany, @ManyToOne, @ManyToMany)
- Optimizing queries (N+1 prevention, fetch strategies, projections)
- Configuring transactions, auditing, or soft deletes
- Setting up pagination, sorting, or custom repository methods
- Tuning connection pooling (HikariCP) or second-level caching
Entity Design
@Entity
@Table(name = "markets", indexes = {
@Index(name = "idx_markets_slug", columnList = "slug", unique = true)
})
@EntityListeners(AuditingEntityListener.class)
public class MarketEntity {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, length = 200)
private String name;
@Column(nullable = false, unique = true, length = 120)
private String slug;
@Enumerated(EnumType.STRING)
private MarketStatus status = MarketStatus.ACTIVE;
@CreatedDate private Instant createdAt;
@LastModifiedDate private Instant updatedAt;
}
Enable auditing:
Track record
Benchmark
21 / 22
test cases passed, vs 19 / 22 without
Adoption
- Users
- 0
- Times used
- 0
Safety and source details
SkillSafety
✓ 3 of 3 passed✓Code scan15 of 15 checks clean
0 critical · 0 warning · 0 info — scanner v4 — 8/3/2026
View 15 scanner checks
live_secretremote_code_executionreverse_shelldata_exfiltrationssrf_metadataagent_snoopinganti_refusaldestructive_commandsobfuscated_unicodeunicode_homoglyphopaque_blobsuspicious_urltool_overreachtrigger_abuseprompt_injection_phrasing
✓IntentSafe
LLM judge · does the skill do what it claims
✓ContentClean
LLM judge · policy & harmful-content review
Source
Importedloulanyue / awesome-claude-notes
docs/ja-JP/skills/jpa-patterns/SKILL.md
View on GitHub ↗License MITImported 8/3/2026Version v6