jdbc-persistence

jdbc-persistence is a skill for Claude Code from AdamBien/airails. It costs 103 tokens per session (3,855 once invoked), scanned A, original, MIT.

A Java database persistence guide using JDBC, Java's direct interface for sending SQL to a database. It represents database rows with records and keeps SQL, parameter binding, and row conversion explicit.

In plain words
What is it for?
It helps model rows and variants, write SQL queries, bind values, convert results into Java records, and run these operations inside a transaction.
Why use it?
It avoids hidden database behavior such as generated queries, lazy loading, and change tracking, making the code's database work visible.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit It helps model rows and variants, write SQL queries, bind values, convert results into Java records, and run these operations inside a transaction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/adambien/airails/jdbc-persistence
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 AdamBien/airails --skill jdbc-persistence
Clone the repo
git clone --depth 1 https://github.com/AdamBien/airails

Made for: Claude Code.

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 jdbc-persistence

README.md
[![agentmods](https://agentmods.dev/badge/skills/adambien/airails/jdbc-persistence/github.svg)](https://agentmods.dev/skills/adambien/airails/jdbc-persistence)
Your own site
<a href="https://agentmods.dev/skills/adambien/airails/jdbc-persistence"><img src="https://agentmods.dev/badge/skills/adambien/airails/jdbc-persistence/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 jdbc-persistence

Your own site · 80×15
<a href="https://agentmods.dev/skills/adambien/airails/jdbc-persistence"><img src="https://agentmods.dev/badge/skills/adambien/airails/jdbc-persistence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,855 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.00103 $0.03855
Opus 5.5 $0.00041 $0.01542
Sonnet 5.5 $0.00021 $0.00771
Haiku 4.5 $0.00010 $0.00385

Measured 3d ago against content hash a7bcf731d918, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

jdbc-persistence 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 3d 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.

java/jdbc-persistence/SKILL.md · 123 lines

How it starts

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

Add JDBC persistence using $ARGUMENTS. Apply all rules below strictly; /bce, /java-conventions, and the stack skill hold wherever this skill is silent.

Principle

Data-Oriented Programming applied to the relational store: the record is the row shape, the sealed interface is the closed set of variants, and the control is a set of functions that move data between the two representations. Nothing is hidden — no proxies, no lazy loading, no dirty checking, no generated SQL. What the code reads is what the database executes.

  • model the data, the whole data, nothing but the data — one record per row shape, one record per projection; no record carries columns a query does not return
  • data is immutable and transparent — a change is a new record (with-style copy through the canonical constructor), then an UPDATE
  • make illegal states unrepresentable — closed sets as sealed interfaces or enums; the compiler, not a default branch, proves the column mapping complete
  • separate operations from data — SQL and binding live in the control; records carry components, invariants, domain behavior, and their own creation from a row (fromResultSet), the read-side twin of toJSON(); java.sql enters a record only through that factory

Placement (BCE)

  • entity — the records and sealed interfaces; free of annotations and SQL strings; the only java.sql types a record sees are the ResultSet and SQLException of its fromResultSet factory
  • control — classes named after their responsibilities (Customers, OrderReports), never *Repository, *Dao, *Mapper, *Store; a control holds the SQL, binding, and row collection for the queries it answers and may read or write several tables of its BC in one method; one table is written by exactly one control
  • boundary — owns the unit of work: one connection, one transaction, several control calls; never contains SQL
    • /microprofile-server: @Transactional on the boundary class, never on single methods, and @Inject of the control; the boundary never sees a DataSource or Connection — the container opens the transaction, the control's connections enlist in it, the container commits. When the project defines a @Boundary stereotype (a CDI @Stereotype carrying @ApplicationScoped and @Transactional), use it instead of an explicit @Transactional, likewise on the class; introduce the stereotype only when the project already has one or asks for it
    • /java-cli-app: the boundary opens the connection (DriverManager.getConnection(url, user, password) or a driver DataSource), sets setAutoCommit(false), passes the connection to the controls, commits; a thrown exception rolls back in a catch and rethrows. A read-only query may run with auto-commit; a boundary method that writes never does
  • connection coordinates come from configuration, never from literals: quarkus.datasource.* / MicroProfile Config on the server, /zcfg keys (db.url, db.user, db.password) in a CLI; the password never lands in a source file
  • the schema belongs to the BC: each BC ships its own DDL; a table is owned by exactly one BC
  • a reference to another BC is an id component in the referencing record, backed by a real FOREIGN KEY (see Schema); never a nested record of the other BC's entity; a join across BC boundaries is confined to read-only projections and is a coupling signal

Read the full file on GitHub · 123 lines

Files

What ships with it

1 file 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. 3d ago Changed · +103 tokens per session a7bcf731d918
  2. 5d ago Changed · -41 lines · -255 tokens per session 3f6f0a8c680f
  3. 7d ago First seen · 164 lines · 255 tokens per session scan A f30e5bf72d87

Subscribe to this mod's changes

jdbc-persistence is a skill published in the GitHub repository AdamBien/airails (62 stars, last pushed yesterday), licensed MIT. It adds 103 tokens to every session and 3,855 once invoked, about $0.0004 per session on Opus 5.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-10-31.

Related

jdbc-persistence compared with skills from other repositories

jdbc-persistence next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jdbc-persistenceAdamBien/airailsSkill62yesterdayMITA103Claude Code
k2cloudflare/skillsSkill3.3kyesterdayApache-2.0A38Claude Code
authoring-java-sdk-tasksastronomer/agentsSkill4584d agoApache-2.0A152Claude Code
database-patternsyonatangross/orchestkitSkill299yesterdayMITA32Claude Code
reactive-sync-engine-expertroedyrustam/vibes-plugSkill121yesterdayMITA38Cursor
search-engine-expertroedyrustam/vibes-plugSkill121yesterdayMITA35Cursor
loom-searchcosmix/loomSkill655d agoMITA26Claude Code, Codex