anantbhandarkar/make-it-right/mir-backend-jvm-quarkus

Claude Code and agent skill by anantbhandarkar/make-it-right

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Make It Right (Quarkus module). Quarkus 3.x (LTS 3.33) + Hibernate ORM/Panache + Quarkus REST (formerly RESTEasy Reactive) + Mutiny footguns. Covers: build-time DI (reflection must be registered with @RegisterForReflection or it fails only at native runtime), the Quarkus REST execution model (the return type picks the thread — Uni/Multi/CompletionStage run on the Vert.x event loop, everything else on a worker thread), blocking inside Mutiny pipelines, @RunOnVirtualThread, build-time vs runtime config keys and secrets baked into a native binary, native-image gotchas, and Quarkus security (deny-unannotated-endpoints defaulting to false, CORS config, the quarkus-rest-csrf extension, Panache active-record mass assignment, and the path-normalization authorization-bypass advisories against quarkus.http.auth.permission policies). Chains: mir-backend -> mir-backend-jvm -> this, which adds only Quarkus library mechanics. TRIGGER only when the JVM backend stack is Quarkus — building, reviewing, or debugging a Quarkus REST resource, CDI bean, Panache entity, Mutiny pipeline, HTTP security policy, or native image build. SKIP for Spring Boot (mir-backend-jvm-spring), Micronaut (mir-backend-jvm-micronaut), standalone Vert.x, Helidon, Ktor, every other non-Quarkus JVM framework, and every non-JVM runtime.

Install

npx vskill@latest install anantbhandarkar/make-it-right/mir-backend-jvm-quarkus

SKILL.md

The same SKILL.md was published earlier as anantbhandarkar/make-it-right/mir-backend-jvm-quarkus.

/mir-backend-jvm-quarkus · Make It Right (Quarkus)

Bottom tier of the chain: mir-backend (generic gates) → mir-backend-jvm (JVM runtime model) → this (Quarkus library mechanics). Run the gates first; load the JVM runtime tier for threading, GC, and container-heap concerns; reach for this at Gate 5 (design mechanics), Gate 6 (implementation), and Gate 7 review. Runtime-level concerns (virtual-thread pinning, pool sizing, GC tuning, `-XX:MaxRAMPercentage`, ThreadLocal hygiene, JMM visibility) live in `mir-backend-jvm` — not here.

Stack assumed: Quarkus 3.x · CDI (ArC) · Quarkus REST (or the classic imperative stack) · Hibernate ORM with Panache · SmallRye Mutiny · GraalVM CE / Mandrel for native image.

Version status, verified 13 Aug 2026:

LineStatusUse it when
Quarkus 3.33 LTSCurrent LTS, patches to 25 Mar 2027Production default
Quarkus 3.27 LTSOlder LTS, support ends 24 Sep 2026Migrate off it now
3.38.xLatest non-LTS minor (new minors every 4–6 weeks)Only if you track releases continuously — a non-LTS minor is supported only until the next one
Quarkus 4.0Beta 1 targeted Sep 2026 (JPMS modularization, JLink images)Not yet

Java baseline is 17, with 21 and 25 supported. The Leyden AOT cache needs Java 25; @RunOnVirtualThread wants Java 24+ (see §2).

Naming: the reactive REST stack was renamed Quarkus REST (quarkus-rest, quarkus-rest-jackson). quarkus-resteasy-reactive coordinates are legacy — the same rename hit the CSRF extension (quarkus-csrf-reactive → quarkus-rest-csrf). Code generated from older training data will name extensions that no longer match the current artifact ids.

The Quarkus footguns AI walks into most

1. Build-time DI — missing beans fail at build, not runtime (mostly)

Quarkus resolves CDI beans at build time using ArC (a build-time CDI implementation). Most injection errors surface as build failures, which is good. But AI regularly writes code that assumes runtime reflection is available, then ships a native image that fails on first deployment.

java
// WRONG — a class only accessed via reflection (e.g., Jackson deserialization target,
// JPA converter, or a dynamically-loaded strategy) is silently excluded in native image
public class PayloadConverter implements AttributeConverter<Payload, String> { ... }
// RIGHT — register for reflection explicitly
@RegisterForReflection
public class PayloadConverter implements AttributeConverter<Payload, String> { ... }
// For third-party classes you can't annotate, use a @RegisterForReflection holder:
@RegisterForReflection(targets = { ThirdPartyClass.class, AnotherClass.class })
public class ReflectionConfig {}

Also register resources, and any dynamic proxy no extension owns:

properties
# Static resources included in the native image
quarkus.native.resources.includes=templates/*.html,certs/*.pem

@RegisterRestClient interfaces are proxied by the REST Client extension — you do not register those yourself. For an unrelated runtime-generated proxy, supply GraalVM proxy metadata under META-INF/native-image, or emit a NativeImageProxyDefinitionBuildItem from an extension. `--initialize-at-build-time` controls class-initialization timing and is not proxy registration — reaching for it here is a common wrong turn.

Build-time vs runtime config: Quarkus bakes some config values into the native binary at build time (tagged @ConfigProperty defaults that affect build-time extensions — e.g., datasource URL during codegen). If you change a build-time key at container start-time only, the native image ignores it. Runtime config keys (most application keys) are read at startup and work as expected. Check the Quarkus config reference for which keys are STATIC_INIT vs RUNTIME_INIT. The same mechanism has a security consequence — a credential supplied at build time is baked into the artifact and cannot be rotated at start-up. See Security below.

2. Blocking the Vert.x I/O thread — the rule is the return type, not the annotation

Quarkus's reactive core runs on a Vert.x event loop. Quarkus REST picks the thread from the method signature, and most existing advice gets the direction backwards:

Method signatureRuns onConsequence
Uni, Multi, CompletionStage, Publisher, Kotlin suspendI/O thread (event loop)Any blocking call inside stalls every request on that loop
Anything else (Report, String, Response, void)Worker threadBlocking is expected and safe. @Blocking here is a no-op
Annotated @BlockingWorker threadForces a reactive-returning method off the loop
Annotated @NonBlockingI/O threadForces a plain-returning method onto the loop — now it must not block
Annotated jakarta.transaction.TransactionalWorker threadJTA needs blocking, so it implies @Blocking

So the real defect is the opposite of the usual advice: the trap is blocking work inside a method that returns `Uni`/`Multi`, not a plain method missing @Blocking.

java
// WRONG — returns Uni, so this runs on the event loop, and the JDBC call blocks it
@GET @Path("/report")
public Uni<Report> getReport() {
return Uni.createFrom().item(reportRepository.buildHeavyReport()); // blocking JDBC on the loop
}
// WRONG — @NonBlocking moves a blocking method onto the loop
@GET @Path("/report")
@NonBlocking
public Report getReport() { return reportRepository.buildHeavyReport(); }
// RIGHT — plain return type; Quarkus already dispatches this to the worker pool
@GET @Path("/report")
public Report getReport() { return reportRepository.buildHeavyReport(); }
// RIGHT — stay reactive all the way down
@GET @Path("/report")
public Uni<Report> getReport() { return reportRepository.buildHeavyReportAsync(); }

Annotations resolve most-specific-first: method, then class, then Application. A class-level @NonBlocking silently puts every plain-returning method on the event loop.

`@RunOnVirtualThread` swaps the worker pool for one virtual thread per request, and the advice around it changed with the JDK:

java
@GET @Path("/report")
@RunOnVirtualThread // blocking code, one virtual thread per request
public Report getReport() { return reportRepository.buildHeavyReport(); }
  • On Java 21–23, synchronized inside such a method pins the carrier thread, and JDBC drivers older than PostgreSQL 42.6.0 pinned frequently. That was the reason to avoid virtual threads for JDBC work.
  • On Java 24+ (JEP 491) synchronized no longer pins, and most JDBC drivers stop pinning. If you are adopting @RunOnVirtualThread, run on 24+ (25 for LTS).
  • Quarkus ships a pinning-detection extension built on JFR events; it works on 21 and 24+. Do not reach for -Djdk.tracePinnedThreads — it was removed in JDK 24 and now prints nothing (see mir-backend-jvm §2).
  • Virtual threads do not raise your database's connection limit. Keep the datasource pool bounded and expect it, not the thread count, to be the ceiling.
3. Mutiny async composition: blocking inside Uni/Multi pipelines

SmallRye Mutiny is Quarkus's reactive library. AI writes Mutiny chains that look reactive but smuggle blocking calls inside lambdas.

java
// WRONG — blocking call inside Uni.createFrom().item() runs on the calling (I/O) thread
Uni<Order> getOrder(Long id) {
return Uni.createFrom().item(() -> jdbcOrderRepo.findById(id)); // BLOCKS I/O thread
}
// RIGHT — use Uni.createFrom().item().runSubscriptionOn(executor) to offload
Uni<Order> getOrder(Long id) {
return Uni.createFrom().item(() -> jdbcOrderRepo.findById(id))
.runSubscriptionOn(Infrastructure.getDefaultWorkerPool());
}
// PREFERRED — use Hibernate Reactive / Panache Reactive so the call is truly non-blocking
Uni<Order> getOrder(Long id) {
return Order.findById(id); // Panache reactive — no blocking I/O
}

Never call `.await().indefinitely()` or `.await().atMost(...)` on the I/O thread. These are blocking terminal operations and will deadlock or degrade the event loop. They are acceptable only in tests or main-thread startup code.

`Multi` back-pressure: if you produce a Multi faster than the subscriber consumes it and don't apply onOverflow(), items are silently dropped or the pipeline throws MissingBackPressureFailure. Always declare overflow strategy explicitly when producing unbounded streams.

4. Panache and the active record gotcha: query inside a transaction

Panache's active record pattern (Entity.find(...), Entity.persist()) is convenient but the entity methods execute within the current transaction context (or no transaction if called outside one). AI forgets to annotate service methods @Transactional when multiple Panache calls must be atomic.

java
// WRONG — no transaction boundary. persist() is NOT an auto-committed mini-transaction:
// Hibernate ORM requires an active transaction, so the write either throws or is
// silently never flushed. Either way the transfer does not happen and nothing says so.
public void transfer(Long fromId, Long toId, BigDecimal amount) {
Account from = Account.findById(fromId);
from.balance = from.balance.subtract(amount);
from.persist();
Account to = Account.findById(toId);
to.balance = to.balance.add(amount);
to.persist();
}
// RIGHT
@Transactional
public void transfer(Long fromId, Long toId, BigDecimal amount) { ... }

For reactive Panache, the transaction must be reactive too: use @WithTransaction (Hibernate Reactive Panache) or Panache.withTransaction(() -> ...).

5. Dev Services: they don't exist in production

Quarkus Dev Services automatically starts containers (PostgreSQL, Redis, Kafka…) in dev and test modes via Testcontainers. This is great for fast iteration but causes AI to omit real datasource configuration, assuming Dev Services will always be available.

properties
# WRONG — no production datasource config; works in dev, fails on deploy
# (application.properties is empty of datasource settings)
# RIGHT — always provide production config in application.properties;
# Dev Services kick in only when no matching config is found
%prod.quarkus.datasource.db-kind=postgresql
%prod.quarkus.datasource.username=${DB_USER}
%prod.quarkus.datasource.password=${DB_PASSWORD}
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://${DB_HOST}:5432/${DB_NAME}

Use profile-prefixed keys (%prod., %staging.) to keep dev/prod configs clearly separated. The absence of %prod. keys is a common cause of "works locally, broken in CI" issues.

6. Native image: initialization order and static initializers

The direction most write-ups get wrong: GraalVM Native Image initializes application classes at run time by default. Build-time initialization is opt-in — and Quarkus opts a large set of framework classes in. So the hazard is not "every static initializer runs at build time"; it is that a class Quarkus (or your own --initialize-at-build-time) promoted to build-time initialization captures environment variables, clock, randomness, filesystem, or network state into the binary.

java
// WRONG — static initializer contacts a service at build time
public class ConfigClient {
private static final String remoteValue = fetchFromConfigServer(); // runs at build!
}
// RIGHT — initialize lazily at runtime
public class ConfigClient {
private static volatile String remoteValue;
public static String get() {
if (remoteValue == null) remoteValue = fetchFromConfigServer();
return remoteValue;
}
}
// OR force runtime init in build config
quarkus.native.additional-build-args=--initialize-at-run-time=com.example.ConfigClient

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
15
7-day trend score
14

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/anantbhandarkar/make-it-right/mir-backend-jvm-quarkus/badge)](https://verified-skill.com/skills/anantbhandarkar/make-it-right/mir-backend-jvm-quarkus)

Something wrong with this skill or its page? Tell us.