jpa-query-reviewer

jpa-query-reviewer is a skill for Codex from Jiangxianze/spring-agent-skills. It costs 78 tokens per session (667 once invoked), scanned A, original, Apache-2.0.

A review guide for Spring Data JPA and Hibernate persistence code. These are Java tools that map application objects to database rows and create database queries.

In plain words
What is it for?
Use it to review entities, repositories, JPQL, SQL, specifications, service methods, reports, and REST responses, then choose a focused fix and add a regression test.
Why use it?
It helps find slow or incorrect database access, including too many queries, loading too much data, broken pagination, transaction mistakes, and locking problems.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to review entities, repositories, JPQL, SQL, specifications, service methods, reports, and REST responses, then choose a focused fix and add a regression test.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jiangxianze/spring-agent-skills/jpa-query-reviewer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Jiangxianze/spring-agent-skills --skill jpa-query-reviewer
Clone the repo
git clone --depth 1 https://github.com/Jiangxianze/spring-agent-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jpa-query-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/skills/jiangxianze/spring-agent-skills/jpa-query-reviewer/github.svg)](https://agentmods.dev/skills/jiangxianze/spring-agent-skills/jpa-query-reviewer)
Your own site
<a href="https://agentmods.dev/skills/jiangxianze/spring-agent-skills/jpa-query-reviewer"><img src="https://agentmods.dev/badge/skills/jiangxianze/spring-agent-skills/jpa-query-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jpa-query-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/skills/jiangxianze/spring-agent-skills/jpa-query-reviewer"><img src="https://agentmods.dev/badge/skills/jiangxianze/spring-agent-skills/jpa-query-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00078 $0.00667
Opus 5 $0.00039 $0.00333
Sonnet 5 $0.00016 $0.00133
Haiku 4.5 $0.00008 $0.00067

Measured 12d ago against content hash afde2e2d3402, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

jpa-query-reviewer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/jpa-query-reviewer/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JPA Query Reviewer

Review the complete persistence path and prove performance claims with query shape or query-count evidence.

Workflow

  1. Trace the request from controller or job through service, repository query, entity mappings, DTO mapping, and serialization. Include every lazy association touched along the path.
  2. Record the database, JPA provider and version, expected result cardinality, page size, transaction boundary, and whether Open Session in View is enabled.
  3. Inspect the generated query shape or capture a deterministic query-count test. Do not infer N+1 solely from LAZY or EAGER annotations.
  4. Review correctness before optimization: filtering, join semantics, duplicate roots, ordering, null handling, locking, and transaction scope.
  5. Review performance: N+1 access, cartesian products, over-fetching, unbounded results, count-query cost, fetch-join pagination, batch fetching, and missing projections.
  6. Select the smallest remedy that matches the use case: DTO projection, entity graph, targeted fetch join, batch size, two-step ID pagination, repository redesign, or transaction-bound mapping.
  7. Add or update a regression test that asserts result correctness and a stable query-count or query-shape budget.

Guardrails

  • Do not recommend changing every association to EAGER.
  • Do not combine collection fetch joins with database pagination without explaining provider behavior and validating the generated SQL.
  • Do not hide LazyInitializationException by enabling Open Session in View without discussing the expanded transactionless access window.
  • Do not return managed entities directly from public APIs when serialization can traverse associations unpredictably.
  • Treat @Transactional(readOnly = true) as an optimization hint and transaction boundary, not an authorization or consistency guarantee.
  • Distinguish entity count, SQL statement count, returned row count, and hydrated object count.
  • Confirm database indexes with the actual filter, join, and sort columns; JPA annotations alone do not prove an index exists in production.

Read the full file on GitHub · 52 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 52 lines · 78 tokens per session scan A afde2e2d3402

Subscribe to this mod's changes

jpa-query-reviewer is a skill published in the GitHub repository Jiangxianze/spring-agent-skills (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 78 tokens to every session and 667 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.