Quarkus Application Development
GitHubOfficialFirst committed by jduboisDistributed by GitHub
- Skill
- Tool integration
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to developing application code within a Quarkus project. It covers the integration of essential extensions such as Hibernate ORM with Panache, REST services, security via OIDC, observability, and messaging with Kafka. The skill emphasizes adherence to Quarkus-specific patterns, such as build-time CDI resolution, proper configuration management, and the use of Dev Services for testing, while ensuring developers avoid common pitfalls like blocking the event loop or hard-coding secrets.
What it does
- Guides the addition of Quarkus extensions using standard CLI commands.
- Provides patterns for REST API development, including validation and exception handling.
- Offers best practices for CDI bean management and configuration using @ConfigMapping.
- Outlines implementation strategies for observability, resilience, and scheduling.
- Ensures secure development by advising against hard-coded secrets and promoting OIDC integration.
- Helps troubleshoot common Quarkus-specific issues like bean removal and event loop blocking.
When to use it
- When implementing new features or modifying existing logic in a Quarkus application.
- When integrating new infrastructure dependencies like Kafka or OIDC.
- When configuring application properties or setting up observability and fault tolerance.
- When debugging issues related to CDI, bean scopes, or blocking operations.
Advantages
- Promotes consistent use of Quarkus-idiomatic code and Jakarta EE standards.
- Reduces development time by providing verified patterns for common integration tasks.
- Helps maintain application performance by highlighting event loop and blocking constraints.
- Ensures project stability by leveraging build-time validation and proper configuration management.
Usage examples
- “How do I add a REST endpoint that uses Hibernate Panache to fetch data from a database?”
- The agent will guide you to add the quarkus-hibernate-orm-panache extension, define a PanacheEntity, and create a REST resource that injects the repository or uses the active record pattern.
- “I need to add a scheduled task that runs every hour. How should I implement this?”
- The agent will advise using the @Scheduled annotation on a bean method and suggest configuring the interval or cron expression via application properties.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/github/quarkus-application-development/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip quarkus-application-development.zip -d .agents/skills
Documentation by jdubois
Quarkus Application Development
Scope: application code inside an existing Quarkus project. Project creation is create-quarkus-project; Dev Services and tests are quarkus-dev-services-and-testing; native and container images are quarkus-native-and-container; core JPA mapping and query design can use the optional java-hibernate-jpa skill if installed (otherwise see the Hibernate ORM guide, https://quarkus.io/guides/hibernate-orm, and the Jakarta Persistence docs).
Agent rules
Detect first: read
pom.xml/build.gradleforquarkus.platform.version, the Java release, and the extensions already present. Keep the version; use what the project already uses (for examplequarkus-resteasy*stays if present).Add extensions with
quarkus extension add <name>or./mvnw quarkus:add-extension -Dextensions=<name>; never guess artifact ids or versions by hand (the platform BOM manages them). List candidates withquarkus extension list --installable --search=<text>.Ask the user before adding Kafka, OIDC/Keycloak or any new infrastructure dependency (they start containers in dev/test and change deployment needs).
Never use the Spring compatibility extensions (
quarkus-spring-*) unless the project already does.Verify with dev mode (
./mvnw quarkus:dev, then/q/dev-ui) and./mvnw verify; write a@QuarkusTestper feature. Do not claim something works without running it.Use
jakarta.*imports, records for DTOs, thin resources delegating to services.Never hard-code secrets or add credentials to
application.properties; seereferences/config-cdi.md.
Quick decisions
| Need | Use | Details |
|---|---|---|
| JSON REST API | quarkus-rest-jackson, quarkus-hibernate-validator, quarkus-smallrye-openapi | references/rest.md |
| Typed config | @ConfigMapping; @ConfigProperty for single values | references/config-cdi.md |
| Beans | @ApplicationScoped (default), @Singleton only for plain stateless holders | references/config-cdi.md |
| Database | quarkus-hibernate-orm-panache + JDBC driver, repository pattern | references/persistence.md |
| Async / blocking | Imperative by default; @RunOnVirtualThread or Uni when needed | references/reactive-messaging.md |
| Messaging | quarkus-messaging-kafka (SmallRye Reactive Messaging) | references/reactive-messaging.md |
| AuthN/AuthZ | quarkus-oidc, @RolesAllowed | references/security-oidc.md |
| Ops | quarkus-smallrye-health, quarkus-micrometer-registry-prometheus, quarkus-opentelemetry, quarkus-smallrye-fault-tolerance | references/observability-resilience.md |
| Outbound HTTP, scheduling, caching | quarkus-rest-client-jackson, quarkus-scheduler, quarkus-cache | references/observability-resilience.md |
Pitfalls that cost time
Quarkus resolves CDI at build time: an unused bean may be removed. Beans only looked up programmatically need
@Unremovable.Do not read or write public fields of a normal-scoped bean (
@ApplicationScoped) from another bean or test: you hit the client proxy, not the instance (verified: a counter field read through the proxy returned 0). Use methods.Do not block on the event loop (
@NonBlockingmethods,Uni/Multireturn types running on I/O threads). Remove any existing@NonBlockingfrom the method (combining it with@Blockingor@RunOnVirtualThreadfails the build), then add@Blockingor@RunOnVirtualThread(seereferences/reactive-messaging.md).Changes to build-time properties need a rebuild; run-time properties can be overridden by env vars (
QUARKUS_DATASOURCE_JDBC_URL).Do not configure URLs for databases/brokers/Keycloak in
%dev/%test: that disables Dev Services.drop-and-createschema management is for dev/test only; use Flyway or Liquibase for production.
Verified on Quarkus 3.40.1 and 3.27.6 (Java 21 target, Maven) with a scaffolded app and mvn verify (15 tests: REST+validation+mapper, OpenAPI, config mapping, Panache on PostgreSQL Dev Services, Kafka Dev Service round trip, Keycloak Dev Service tokens, health, metrics, fault tolerance, cache, scheduler). Re-check names against the project's version.
Files
- ATTRIBUTION.mdAdded by AutoGineer893 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md4.5 KiB
- references/config-cdi.md5.5 KiB
- references/observability-resilience.md4.5 KiB
- references/persistence.md4.9 KiB
- references/reactive-messaging.md4.2 KiB
- references/rest.md2.8 KiB
- references/security-oidc.md3.1 KiB
references/observability-resilience.md
Observability, resilience, REST Client, scheduler, cache
All items below were exercised on Quarkus 3.40.1 and 3.27.6 unless marked "not verified".
Health (quarkus-smallrye-health)
Endpoints: /q/health, /q/health/live, /q/health/ready, /q/health/started. Custom checks are CDI beans:
@Readiness // or @Liveness / @Startup (org.eclipse.microprofile.health)
@ApplicationScoped
public class Ready implements HealthCheck {
public HealthCheckResponse call() { return HealthCheckResponse.up("demo"); }
}Verified: /q/health/ready returned 200 with the check name. Extensions such as the JDBC datasource add their own readiness checks. Keep liveness trivial (no dependency checks, or the platform restarts pods during outages); put dependency checks in readiness.
Metrics (quarkus-micrometer-registry-prometheus)
Prometheus scrape at /q/metrics. Inject MeterRegistry for custom meters (registry.counter("demo.fallback").increment() appeared as demo_fallback_total, verified). HTTP server and JVM meters are on by default. Use @Counted/@Timed (Micrometer annotations) where they are enough. Expose /q/metrics and /q/health only to the cluster/monitoring network (a separate management interface: quarkus.management.enabled=true, not verified here).
OpenTelemetry (quarkus-opentelemetry)
Only traces are on by default. Metrics and logs are tech preview and disabled at build time: set quarkus.otel.metrics.enabled=true and quarkus.otel.logs.enabled=true to export them (checked against the Quarkus OpenTelemetry guide). HTTP, REST Client, JDBC (with quarkus.datasource.jdbc.telemetry=true) and messaging are instrumented. Point it at a collector with quarkus.otel.exporter.otlp.endpoint=http://collector:4317 (verified only that without a collector the app logs "Failed to export ... Connection refused" to localhost:4317 but works). Add custom spans with @WithSpan or inject Tracer. In dev mode, Quarkus Dev Services for observability (Grafana LGTM, quarkus-observability-devservices-lgtm) can supply a backend; not verified here. Do not set both Micrometer and OTel metrics export without a reason.
Fault tolerance (quarkus-smallrye-fault-tolerance)
@Retry(maxRetries = 2) @Fallback(fallbackMethod = "fb")
public String flaky() { throw new IllegalStateException(); }
String fb() { return "fallback"; }Verified: the method executed 3 times (1 + 2 retries) and the fallback value was returned. Also @Timeout, @CircuitBreaker, @Bulkhead, @RateLimit (SmallRye extension). They are CDI interceptors on bean methods; ArC also intercepts self-invocation. Works with Uni return types (asynchronous, non-blocking). Always set a @Timeout on remote calls; do not retry non-idempotent operations.
REST Client (quarkus-rest-client-jackson)
@RegisterRestClient(configKey = "echo")
@Path("/greetings")
public interface EchoClient {
@GET @Path("/{n}") Greeting get(@PathParam("n") String n);
}quarkus.rest-client.echo.url=${ECHO_URL:http://localhost:8081}
quarkus.rest-client.echo.read-timeout=5000Inject with @RestClient EchoClient echo; (org.eclipse.microprofile.rest.client.inject.RestClient). Verified: bean injection and startup (the call itself was not exercised). Combine with @Timeout/@Retry; throw domain exceptions with @ClientExceptionMapper. In tests, stub the remote service with WireMock via a test resource (see quarkus-dev-services-and-testing).
Scheduler (quarkus-scheduler)
@Scheduled(every = "1s") or @Scheduled(cron = "{app.cron}") on a bean method (verified: ticks incremented). Use concurrentExecution = SKIP to avoid overlaps. The scheduler is per instance; in a cluster use the quarkus-quartz extension with a shared JDBC store and quarkus.quartz.clustered=true (it defaults to false, so a JDBC store alone leaves schedulers uncoordinated), or a distributed lock, to run a job once. Scheduled methods run on a worker thread unless @NonBlocking/returns Uni; use @RunOnVirtualThread for blocking IO.
Cache (quarkus-cache)
@CacheResult(cacheName = "slow")
public String slow(String k) { ... }Verified: two calls with the same key executed the method once. Configure with quarkus.cache.caffeine."slow".maximum-size=10 and expire-after-write=60S. Also @CacheInvalidate, @CacheInvalidateAll, @CacheKey. Interceptor-based; ArC also intercepts self-invocation. Caches are per-instance in memory; use quarkus-redis-cache for shared caches (not verified here).
Requirements and compatibility
Written for: GitHub Copilot
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- First committed by
jdubois
- Publisher
- GitHub (Official)
- Distributed by
- GitHub
- Source
- github/awesome-copilot · skills/quarkus-application-development · commit 797337f
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Contributors
- jdubois
AutoGineer is not affiliated with or endorsed by jdubois or GitHub.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download quarkus-application-development.zip