Agent skill

Jpa Hibernate Optimization

by Hack23 in Hack23/cia

Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies

Apache-2.0Auto-check passedDatabases

Install Jpa Hibernate Optimization

skills CLI
$ npx skills add Hack23/cia --skill jpa-hibernate-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Hack23/cia jpa-hibernate-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Hack23/cia.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/jpa-hibernate-optimization .claude/skills/jpa-hibernate-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
jpa-hibernate-optimization
GitHub stars
239
Token cost
~531 tokens
SKILL.md length
39 words
Files
1
Skills in repo
78
Repo updated
First seen
Licence
Apache-2.0

At a glance

Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies

  • Tasks that involve ORMs and data access
  • SKILL.md covers Purpose, When to Use, Entity Optimization and Query Optimization, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Query optimization

What it does

Jpa Hibernate Optimization is an agent skill from Hack23/cia. Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies

Its SKILL.md is about 530 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering ORMs and data access, Query optimization and Database schema design. The repository describes itself as: Citizen Intelligence Agency. Open-source intelligence platform analyzing Swedish political activities using AI and data visualization. Tracks politicians, government… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve ORMs and data access
  • Tasks that involve Query optimization
  • Tasks that involve Database schema design

Example prompts

  • “/jpa-hibernate-optimization”

What it can do on your machine

Read from SKILL.md and the folder at commit 6a9797b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • hibernate.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Jpa Hibernate Optimization loads about 531 tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 39 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~531

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Hack23/cia at commit 6a9797b, republished under its Apache-2.0 licence (© Hack23). 39 words, ~531 tokens.

Download SKILL.mdSave it as .claude/skills/jpa-hibernate-optimization/SKILL.md (or your agent's skills folder).
name
jpa-hibernate-optimization
description
Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies
license
Apache-2.0

JPA/Hibernate Optimization Skill

Purpose

Optimize database access with proper entity design, query optimization, and caching.

When to Use

  • ✅ Designing entity relationships
  • ✅ Optimizing slow queries
  • ✅ Preventing N+1 queries
  • ✅ Implementing caching

Entity Optimization

java
@Entity
@Table(name = "politician", indexes = {
    @Index(name = "idx_politician_party", columnList = "party"),
    @Index(name = "idx_politician_district", columnList = "district")
})
@Cacheable
@org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Politician {
    @Id
    private String id;
    
    @Column(name = "first_name", nullable = false, length = 50)
    private String firstName;
    
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "party_id")
    private Party party;
    
    @OneToMany(mappedBy = "politician", cascade = CascadeType.ALL, orphanRemoval = true)
    @BatchSize(size = 20)
    private List<VotingRecord> votingRecords;
}

Query Optimization

java
// Use JOIN FETCH to prevent N+1
@Query("SELECT p FROM Politician p JOIN FETCH p.party WHERE p.district = :district")
List<Politician> findByDistrictWithParty(@Param("district") String district);

// Use DTOs for read-only queries
@Query("SELECT new com.hack23.cia.dto.PoliticianSummary(p.id, p.firstName, p.lastName) " +
       "FROM Politician p WHERE p.active = true")
List<PoliticianSummary> findActivePoliticiansSummary();

// Pagination for large result sets
Page<Politician> findByParty(String party, Pageable pageable);

Second-Level Cache

yaml
spring:
  jpa:
    properties:
      hibernate:
        cache:
          use_second_level_cache: true
          region:
            factory_class: org.hibernate.cache.jcache.JCacheRegionFactory
        javax:
          cache:
            provider: org.ehcache.jsr107.EhcacheCachingProvider

References

© Hack23, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/skills/jpa-hibernate-optimization of Hack23/cia.

Open the folder on GitHubat commit 6a9797b

Compare with similar skills

Jpa Hibernate Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Jpa Hibernate Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Jpa Hibernate Optimization this skillHack23/cia239—~531Automated safety check: PassApache-2.0
Jpa Patternsaffaan-m/ECC274k5 repos~1.2kAutomated safety check: PassMIT
Prisma Expertdavila7/claude-code-templates32k6 repos~2.6kAutomated safety check: PassMIT
Performancekid-sid/claude-spellbook189—~3.8kAutomated safety check: PassMIT
Relational Data Modelingpproenca/dot-skills214—~2.4kAutomated safety check: PassMIT
DB SculptorEliasOulkadi/shokunin114—~3.1kAutomated safety check: NotesMIT

Similar skills

  • Jpa Patterns

    affaan-m/ECC

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    274k GitHub starsUsed in 5 repos~1.2k tokens
    DatabasesAuto-check passed
  • Prisma Expert

    davila7/claude-code-templates

    Prisma ORM expert for schema design, migrations, query optimization, relations modeling, and database operations.

    32k GitHub starsUsed in 6 repos~2.6k tokens
    DatabasesAuto-check passed
  • Performance

    kid-sid/claude-spellbook

    A skill your agent uses when diagnosing a slow HTTP endpoint or high-latency service — profiling, adding an application-level cache, offloading CPU-bound work to threads or workers, or defining a…

    189 GitHub stars~3.8k tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Relational Data Modeling

    pproenca/dot-skills

    Corrects the wrong defaults a model has when designing a relational schema — the DDL decisions an experienced engineer makes differently.

    214 GitHub stars~2.4k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Database guidance for PostgreSQL, MongoDB, Redis and Oracle plus Neon, Supabase and Firestore: schema design, indexing, query tuning and cloud database choice.

    1.2k GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed

More from Hack23/cia

All 78 skills in this repo
  • WCAG 2.1 AA compliance, ARIA attributes, keyboard navigation, screen reader optimization for accessible political data platforms

    239 GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Advanced chart types, D3.js/Vaadin Charts patterns, political data visualization, time series analysis

    239 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • AI Governance

    Hack23/cia

    AI governance, EU AI Act compliance, OWASP LLM security, responsible AI practices for GitHub Copilot agents

    239 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • API Integration

    Hack23/cia

    External API integration patterns, retry logic, circuit breakers, caching, rate limiting for government data APIs

    239 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • AWS CloudWatch metrics, alarms, dashboards, log insights, and application monitoring for the CIA platform

    239 GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • AWS security best practices, VPC security, IAM, KMS, CloudTrail, GuardDuty for CIA platform deployment

    239 GitHub stars~2.3k tokensUpdated today
    Auto-check passed

Categories

Questions about Jpa Hibernate Optimization

What does Jpa Hibernate Optimization do?

Optimize JPA/Hibernate: entity design, query performance, N+1 prevention, caching strategies. Jpa Hibernate Optimization is an agent skill from Hack23/cia.

When should I use Jpa Hibernate Optimization?

Jpa Hibernate Optimization fits situations like: tasks that involve ORMs and data access; tasks that involve Query optimization; tasks that involve Database schema design.

How do I install Jpa Hibernate Optimization in Claude Code?

Run `npx skills add Hack23/cia --skill jpa-hibernate-optimization -a claude-code`. Or copy the skill folder (.github/skills/jpa-hibernate-optimization in Hack23/cia) into .claude/skills/jpa-hibernate-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Jpa Hibernate Optimization in Codex?

Run `npx skills add Hack23/cia --skill jpa-hibernate-optimization -a codex`. Or copy the skill folder (.github/skills/jpa-hibernate-optimization in Hack23/cia) into .agents/skills/jpa-hibernate-optimization in your project. Codex loads it when a task matches its description.

Can I use Jpa Hibernate Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Hack23/cia --skill jpa-hibernate-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/jpa-hibernate-optimization, .gemini/skills/jpa-hibernate-optimization, .github/skills/jpa-hibernate-optimization and .opencode/skills/jpa-hibernate-optimization in your project.

What does Jpa Hibernate Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Jpa Hibernate Optimization is instructions for the agent only.

Does Jpa Hibernate Optimization access the network?

SKILL.md names 1 domain. As links in the text: hibernate.org. This is read from the text; nothing was executed.

Is Jpa Hibernate Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Jpa Hibernate Optimization use?

Jpa Hibernate Optimization is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Jpa Hibernate Optimization use?

About 531 tokens (SKILL.md is roughly 2.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Jpa Hibernate Optimization?

Skills that share tags, products or a category with Jpa Hibernate Optimization: Jpa Patterns (affaan-m/ECC, 274k stars), Prisma Expert (davila7/claude-code-templates, 32k stars), Performance (kid-sid/claude-spellbook, 189 stars) and Relational Data Modeling (pproenca/dot-skills, 214 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Jpa Hibernate Optimization?

Hack23 (a GitHub organization) maintains it in Hack23/cia, which has 239 GitHub stars. The repository holds 78 skills in this directory. The repository was last updated on October 6, 2026.

Source: Hack23/cia on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.