Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Thalarch Kotlin Jpa

ASecurity

Kotlin-specific JPA/Hibernate persistence engineering for entities, repositories, relationships, fetch plans, transactions, equality/identity, uniqueness constraints, optimistic locking, and N+1 or LazyInitialization diagnostics.

2 stars
0 votes
0 copies
1 views
Added 9/19/2026
ai-agentsjavakotlinsqlspringgitapidatabasebackend

Works with

api

Security Analysis

A100/100

Scanned 9/19/2026

$npx -y skills add LUC4N3X/antigravity-thalarch --skill thalarch-kotlin-jpa --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Thalarch Kotlin Jpa?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Thalarch Kotlin Jpa
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/luc4n3x-thalarch-kotlin-jpa/badge)](https://www.skillsdirectory.com/skills/luc4n3x-thalarch-kotlin-jpa)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: thalarch-kotlin-jpa
description: "Kotlin-specific JPA/Hibernate persistence engineering for entities, repositories, relationships, fetch plans, transactions, equality/identity, uniqueness constraints, optimistic locking, and N+1 or LazyInitialization diagnostics."
license: Apache-2.0
metadata:
  upstream: https://github.com/Kotlin/kotlin-agent-skills/tree/main/skills/kotlin-backend-jpa-entity-mapping
  upstream-author: JetBrains
  modification-notice: Modified for Thalarch; see THIRD_PARTY_NOTICES.md.
---

# Thalarch Kotlin JPA

Kotlin and ORM semantics interact in ways that generic Java/JPA advice can miss. Treat entity
identity, proxying, nullability, generated IDs, lazy associations, equality and serialization as
one contract.

If the current host exposes the official Kotlin/JetBrains
`kotlin-backend-jpa-entity-mapping` skill and the task matches it, prefer loading that skill for
platform-specific guidance. This Thalarch skill remains the scope/evidence/verification envelope.

## 1. Prove the persistence stack

Before editing, confirm from build files and imports:

- Kotlin version and compiler plugins;
- JPA package (`javax.persistence` vs `jakarta.persistence`);
- ORM/framework and version (Hibernate/Spring Data/etc.);
- no-arg/all-open/JPA plugins or equivalent proxy support;
- database/migration stack;
- serialization/API mapping conventions;
- project entity equality/ID conventions.

Do not impose a new entity style if the repository already has a deliberate, working convention.

## 2. Entity identity is the primary invariant

For every entity define explicitly:

- what identifies a persisted instance;
- what identifies an unsaved instance;
- whether equality is ID-based, business-key-based, or intentionally reference-based;
- whether hash code stays safe when persistence state changes;
- how proxies/subclasses interact with equality;
- whether lazy state can be touched by `equals`, `hashCode`, `toString`, logging or serialization.

Do not use Kotlin `data class` for a JPA entity by default. Generated all-property equality,
`copy()`, destructuring and mutable ORM state often create the wrong semantics. If a project uses
data-class entities intentionally, verify the exact equality/proxy/lifecycle contract before
changing it.

Generated database IDs should model the actual unsaved state; do not invent sentinel values such
as `0` unless the repository/database contract deliberately uses them.

## 3. Nullability and construction

Kotlin non-null types must reflect what is true across the complete ORM lifecycle, not merely the
database schema.

Check:

- constructor requirements;
- proxy/no-arg construction;
- generated ID lifecycle;
- ORM-populated fields;
- nullable DB columns;
- framework reflection/serialization behavior;
- `lateinit` usage and access-before-initialization risk.

A non-null database column does not automatically prove the field is non-null during every entity
construction/hydration phase.

## 4. Relationships and fetch plans

Default assumptions are not evidence. Inspect actual queries/logs/tests when fetch behavior matters.

For associations review:

- owning vs inverse side;
- bidirectional graph synchronization;
- cascade semantics;
- orphan removal lifecycle;
- collection type and equality requirements;
- pagination combined with collection fetches;
- DTO projection vs entity loading;
- serialization/logging accidentally touching lazy state;
- transaction boundary around lazy access.

Do not “fix” lazy-loading symptoms by making everything eager.

For N+1 claims, show the query pattern before and after when practical.

## 5. Uniqueness and idempotency

Application-level duplicate checks are useful for clean errors but are not sufficient for
concurrent correctness.

When a uniqueness/idempotency invariant belongs in the database:

- enforce it with a real unique constraint/index appropriate to the schema;
- optionally add the application pre-check for user-facing error quality;
- handle the race where two requests pass the pre-check concurrently;
- verify transaction/error translation behavior.

## 6. Transactions and concurrency

Inspect the real framework interception model and version.

Check:

- transaction scope;
- proxy/self-invocation traps;
- read-modify-write races;
- lost updates;
- `@Version`/optimistic locking where appropriate;
- bulk update/delete behavior that bypasses managed state/callbacks;
- retry semantics and idempotency.

Do not add retries around transactional writes without proving repeated execution is safe.

## 7. DTO/entity boundary

Do not expose persistence entities directly through external APIs by default. Preserve the
repository's existing boundary, and when a task crosses transport/persistence layers explicitly
review:

- lazy state exposure;
- recursive relationships;
- JSON field stability;
- entity mutation by deserialization;
- versioned API compatibility;
- domain/transport validation.

## 8. Verification

Use evidence at the layer where the risk lives:

- compile affected Kotlin/JVM target;
- focused entity/repository tests;
- real database/ORM integration tests for query/transaction/constraint semantics;
- SQL/query-count evidence for N+1/fetch claims;
- concurrent test for uniqueness/lost-update bugs when practical;
- migration/schema validation when annotations imply schema changes.

A mocked repository test cannot prove ORM identity, SQL, transaction or constraint behavior.

## Completion report

State:

- persistence stack/version evidence;
- identity/equality strategy reviewed;
- fetch/transaction/schema changes;
- queries/integration checks run;
- remaining production-scale assumptions marked `UNVERIFIED`.

Attribution

LUC4N3XLUC4N3X
View sourceSee grades on GitHubMore from LUC4N3X →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1074701 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

696481 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3351 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

691 votes
View all in ai-agents →