411-frameworks-quarkus-jdbc — Claude Code skill for Quarkus JDBC
A skill for programmatic JDBC in Quarkus: Agroal DataSource, parameterized SQL, transactions, batching and Dev Services. Useful when reviewing data access.
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a claude-codeWhat 411-frameworks-quarkus-jdbc does
The skill covers data access in Quarkus through an injected javax.sql.DataSource backed by Agroal. It ships reference rules with good and bad code examples: PreparedStatement with bind parameters instead of string concatenation, mapping ResultSet rows into Java records via a dedicated method, and single-row queries through Optional<T> rather than assuming rs.next() succeeds.
Transactions get their own section: @Transactional service boundaries, propagation types such as TxType.REQUIRES_NEW for independent commits, and the CDI self-invocation trap where a transactional method is called past the injected proxy. There is also SQLException translation into domain exceptions with a catch-translate-rethrow shape, streaming large result sets with setFetchSize, and addBatch / executeBatch for bulk inserts.
Before touching anything, the skill insists the project compiles: run ./mvnw compile or mvn compile first, and if the build fails it stops until you fix the errors. After the changes it asks for ./mvnw clean verify or mvn clean verify. On a repo with a broken build, that gate means the skill never gets going.
What it helps with
- replace concatenated SQL with bind parameters
- fix self-invocation that silently skips
@Transactional - turn
SQLExceptioninto domain exceptions - stream a large result set without running out of memory
- batch bulk inserts with addBatch and executeBatch
Example prompts for the agent
- Review JDBC and SQL data access in this Quarkus project
- Improve transactions and parameter binding for Quarkus JDBC
- Review Agroal DataSource usage in this module
How to install 411-frameworks-quarkus-jdbc
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a claude-code2Manually: put the files in place
~/.claude/skills/411-frameworks-quarkus-jdbc/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/411-frameworks-quarkus-jdbc/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a codex2Manually: put the files in place
.agents/skills/411-frameworks-quarkus-jdbc/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a cursor2Manually: put the files in place
.cursor/skills/411-frameworks-quarkus-jdbc/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 411-frameworks-quarkus-jdbc2Manually: put the files in place
.github/skills/411-frameworks-quarkus-jdbc/SKILL.md1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a gemini-cli2Platform CLI
gemini skills install https://github.com/jabrena/plinth --path skills/411-frameworks-quarkus-jdbcManually: put the files in place
.devin/skills/411-frameworks-quarkus-jdbc/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about 411-frameworks-quarkus-jdbc
How do I install 411-frameworks-quarkus-jdbc in Claude?
Run npx skills add jabrena/plinth --skill 411-frameworks-quarkus-jdbc -a claude-code. The skill lands at ~/.claude/skills/411-frameworks-quarkus-jdbc/SKILL.md.
What does 411-frameworks-quarkus-jdbc do?
It walks through programmatic JDBC patterns in Quarkus: DataSource usage, parameterized SQL, transactions, batching and Dev Services for dev and test databases. It works from a reference file with code examples.
What does the skill need before it runs?
A project that compiles. The skill runs ./mvnw compile or mvn compile first and stops on build errors until they are resolved.
Source text
SKILL.md · Apache-2.0
--- name: 411-frameworks-quarkus-jdbc description: Use when you need programmatic JDBC in Quarkus — Agroal DataSource, parameterized SQL, transactions, batching, and Dev Services. This should trigger for requests such as Review JDBC or SQL data access in a Quarkus project; Improve transactions and parameter binding for Quarkus JDBC; Translate SQLException to domain exceptions or stream large result sets; Fix CDI self-invocation bypassing @Transactional in Quarkus; Review Agroal DataSource usage in Quarkus JDBC. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.19.0 --- # Quarkus JDBC — programmatic SQL Apply programmatic JDBC patterns in Quarkus with safe SQL and clear transactions. **What is covered in this Skill?** - Injected javax.sql.DataSource (Agroal-backed) and try-with-resources for Connection / PreparedStatement - PreparedStatement with bind parameters — never string concatenation - Mapping ResultSet rows to Java records (dedicated mapRow method) - Safe single-row queries with Optional<T>; never assume rs.next() succeeds - SQLException translation to domain exceptions (catch-translate-rethrow) - Streaming large result sets with setFetchSize to avoid OOM - Batch updates with addBatch / executeBatch for bulk inserts - @Transactional service boundaries and propagation types (TxType.REQUIRES_NEW for independent commits) - CDI self-invocation pitfall: always call transactional methods through the injected proxy - Dev Services for databases in dev/test - When to prefer Panache (`@412`) vs raw JDBC **Scope:** Apply recommendations based on the reference rules and good/bad code examples. ## Constraints Compile before JDBC refactors; verify after changes. - **MANDATORY**: Run `./mvnw compile` or `mvn compile` before applying any change - **PREREQUISITE**: Project must compile before applying JDBC improvements - **SAFETY**: If compilation fails, stop immediately - **BLOCKING CONDITION**: Compilation errors must be resolved by the user before proceeding - **VERIFY**: Run `./mvnw clean verify` or `mvn clean verify` after applying improvements - **BEFORE APPLYING**: Read the reference for detailed rules and examples ## When to use this skill - Review JDBC or SQL data access in a Quarkus project - Improve transactions and parameter binding for Quarkus JDBC - Translate SQLException to domain exceptions or stream large result sets - Fix CDI self-invocation bypassing @Transactional in Quarkus - Review Agroal DataSource usage in Quarkus JDBC ## Workflow 1. **Read reference and assess project context** Read `references/411-frameworks-quarkus-jdbc.md` and inspect the current project setup before proposing changes. 2. **Gather scope and decide target improvements** Identify requested outcomes, constraints, and the minimum safe set of changes to apply. 3. **Apply framework-aligned changes** Implement or refactor configuration/code following the reference patterns and project conventions. 4. **Run verification and report results** Execute appropriate build/tests and summarize what changed, what was verified, and any follow-up actions. ## Reference For detailed guidance, examples, and constraints, see [references/411-frameworks-quarkus-jdbc.md](references/411-frameworks-quarkus-jdbc.md).
© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth