Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)40k · #7377

quarkus-application-development

Skill này làm gì

Agent này giúp viết mã cho ứng dụng Quarkus. Nó có thể thêm các tính năng như REST API, truy cập cơ sở dữ liệu, bảo mật và giao tiếp với các ứng dụng khác, đồng thời giữ sự nhất quán với dự án hiện có.

Khi nào nên dùng

  • ✓Khi thêm một tính năng mới vào dự án Quarkus.
  • ✓Khi sửa đổi một phần hiện có của ứng dụng Quarkus.
  • ✓Khi tích hợp một dịch vụ hoặc tính năng mới vào ứng dụng Quarkus.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/quarkus-application-development/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/quarkus-application-development/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy thêm một REST API để quản lý người dùng, có kiểm tra dữ liệu và tài liệu tự động.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent phân tích dự án Quarkus của bạn để hiểu các công nghệ nào đang được dùng. Sau đó, nó thêm các extension cần thiết và viết mã theo những thực hành tốt nhất của Quarkus.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

  1. Detect first: read pom.xml/build.gradle for quarkus.platform.version, the Java release, and the extensions already present. Keep the version; use what the project already uses (for example quarkus-resteasy* stays if present).
  2. 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 with quarkus extension list --installable --search=<text>.
  3. Ask the user before adding Kafka, OIDC/Keycloak or any new infrastructure dependency (they start containers in dev/test and change deployment needs).
  4. Never use the Spring compatibility extensions (quarkus-spring-*) unless the project already does.
  5. Verify with dev mode (./mvnw quarkus:dev, then /q/dev-ui) and ./mvnw verify; write a @QuarkusTest per feature. Do not claim something works without running it.
  6. Use jakarta.* imports, records for DTOs, thin resources delegating to services.
  7. Never hard-code secrets or add credentials to application.properties; see references/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 (@NonBlocking methods, Uni/Multi return types running on I/O threads). Remove any existing @NonBlocking from the method (combining it with @Blocking or @RunOnVirtualThread fails the build), then add @Blocking or @RunOnVirtualThread (see references/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-create schema 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.

Câu hỏi thường gặp

Quarkus “extension” là gì?

Extension là các gói bổ sung chức năng cụ thể cho ứng dụng Quarkus, chẳng hạn hỗ trợ cơ sở dữ liệu, API web hoặc nhắn tin.

Agent biết dùng phiên bản Quarkus nào?

Nó kiểm tra tệp cấu hình của dự án (pom.xml hoặc build.gradle) để dùng đúng phiên bản Quarkus đã được khai báo.

Agent có thể tạo một dự án Quarkus mới không?

Không, agent này dùng để làm việc trên các dự án Quarkus đã có. Để tạo dự án mới, bạn cần dùng công cụ hoặc lệnh khác.

Chi tiết

Mô tả gốc của tác giả

Write Quarkus application code: REST with Quarkus REST, validation, exception mappers, OpenAPI, configuration, CDI (ArC), Hibernate ORM with Panache, Mutiny and virtual threads, Reactive Messaging with Kafka, OIDC security, health, metrics, OpenTelemetry, fault tolerance, REST Client, scheduler and cache. Use when implementing or changing features in an existing Quarkus project.

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7377
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự