
JPA/Hibernate Patterns
Guides an agent through JPA/Hibernate entity design, queries, transactions, and tuning in Spring Boot
- Repository
- affaan-m/ECC
- Stars
- 295,127
- Licence
- MIT
- Files
- 1 file
What it does
This is a reference guide that teaches an AI agent established best practices for working with JPA and Hibernate, the Java libraries that map Spring Boot application code to database tables. Once installed, the agent follows the guide when designing entities and relationships, avoiding N+1 query problems, choosing fetch strategies and pagination, setting up transactions, auditing and indexes, and tuning HikariCP connection pools. The skill contains only instructions and code examples; it does not run any programs itself.
Great for
- Java developers building or reviewing Spring Boot applications that use JPA or Hibernate
- Teams tuning slow database queries or connection pool settings in an existing Spring Boot service
- Developers who want an agent to follow consistent data-access conventions
Skip it if
- Non-Java projects or stacks that do not use JPA/Hibernate, since the patterns will not apply
- Production databases changed directly from agent suggestions without review, because the advice includes pool sizes and index choices that depend on the workload and should be checked against real metrics
Try asking
- “Design a JPA entity for an orders table with audit timestamps and a unique slug”
- “Find and fix N+1 query problems in my MarketEntity repository”
- “Add paginated, read-only service methods for listing active markets”
- “Recommend HikariCP pool settings for my Spring Boot PostgreSQL service”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 1 original files, the MIT licence and an attribution note.
jpa-patterns.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip jpa-patterns.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip jpa-patterns.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent your actual entity classes and a sample slow query so it can apply the patterns to your code rather than generic examples
- Ask the agent to explain the SQL it expects to run, then confirm with the Hibernate SQL logs the skill recommends
- Treat the pool sizes and cache advice as starting points and validate them under your own load
What's inside
- SKILL.md
Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.