create-quarkus-project
它能做什么
这个代理会帮你创建一个全新的 Quarkus 项目。它可以用你需要的工具来搭建项目,比如数据库和 API 功能。
适用场景
- ✓当你想开始一个新的 Quarkus 应用时。
- ✓当你需要一个基础的 REST API 时。
- ✓当你想为项目添加数据库或安全等功能时。
技能链接
https://github.com/github/awesome-copilot/blob/main/skills/create-quarkus-project/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个 Quarkus 项目,并加入 REST、PostgreSQL 和 security 扩展。”
每周 5 个新技能,1 分钟读完。
工作原理
它会使用 Quarkus CLI 或 Maven 插件等工具生成初始项目结构。你可以选择要包含哪些 “extensions”(扩展,即额外功能)。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Create a Quarkus Project
1. Detect the environment
java -version # Java 17, 21 or 25 (Quarkus 3.40 recommends 25, 3.27 recommends 21)
quarkus --version # optional Quarkus CLI
./mvnw -v || mvn -v # or ./gradlew -v
If the folder already contains a Quarkus project (io.quarkus.platform BOM, quarkus-maven-plugin, or io.quarkus Gradle plugin), do NOT scaffold: read its Quarkus version and keep it. For a new project, use the stream marked recommended on https://code.quarkus.io/api/streams (an LTS stream; see also https://quarkus.io/support/), and do not invent a patch version: let the tool pick it. Quarkus 4.0 is still a beta, so do not use it unless asked. If an extension is missing from the recommended stream, the CLI silently picks an older stream; check quarkus.platform.version in the generated build file.
2. Scaffold (pick one)
Quarkus CLI (install via https://quarkus.io/get-started/ , e.g. SDKMAN sdk install quarkus):
quarkus create app com.example:demo \
--extension='rest-jackson,hibernate-orm-panache,jdbc-postgresql,hibernate-validator,smallrye-health' \
--java=21 --maven # or --gradle
No CLI: Maven plugin (pin the version to the current release from https://quarkus.io/guides/maven-tooling, replace QUARKUS_VERSION below with it):
mvn io.quarkus.platform:quarkus-maven-plugin:QUARKUS_VERSION:create \
-DprojectGroupId=com.example -DprojectArtifactId=demo \
-Dextensions='rest-jackson,hibernate-orm-panache,jdbc-postgresql' \
-DbuildTool=maven # or gradle
Or generate from the https://code.quarkus.io web UI / REST API (https://code.quarkus.io/d?g=com.example&a=demo&e=rest-jackson&b=MAVEN) and unzip.
3. Choose extensions
| Need | Extension |
|---|---|
| REST + JSON | rest-jackson (Quarkus REST; not legacy resteasy) |
| Database ORM | hibernate-orm-panache, jdbc-postgresql |
| Validation | hibernate-validator |
| Health / metrics | smallrye-health, micrometer-registry-prometheus |
| Auth | oidc or smallrye-jwt |
| OpenAPI | smallrye-openapi |
| REST client | rest-client-jackson |
| Container | container-image-jib (or container-image-docker) |
Add later with quarkus extension add <name> or ./mvnw quarkus:add-extension -Dextensions=<name>; quarkus extension list --installable lists options.
4. Layout and run
src/main/java/... # resources, services, entities
src/main/resources/application.properties
src/main/docker/ # Dockerfile.jvm, Dockerfile.native, ...
src/test/java/... # @QuarkusTest / @QuarkusIntegrationTest
./mvnw quarkus:dev # or: quarkus dev / ./gradlew quarkusDev
Generated tests include a *IT class that Maven skips by default (<skipITs>true</skipITs> in the template); run it with ./mvnw verify -DskipITs=false or -Dnative. Dev mode gives live reload, Dev UI at http://localhost:8080/q/dev-ui, Dev Services (auto containers), and continuous testing (press r). Package: ./mvnw package (runnable target/quarkus-app/quarkus-run.jar).
References
- Configuration
- Database (Dev Services, Hibernate, Flyway/Liquibase)
- Security basics
- Container images
- Local runtime insights (BootUI)
Verified (scaffold, ./mvnw verify, ./gradlew build, dev mode, Dev Services PostgreSQL, JDK 26 with Java 25 release) on Quarkus 3.40.1 (current recommended LTS stream) and ./mvnw verify on 3.27.6 (older LTS).
Related skills: quarkus-dev-services-and-testing, quarkus-native-and-container.
Upstream sources (read before upgrading)
Fetch the page for the target version; prefer it over this skill when they conflict.
quarkus update(automated upgrade, uses OpenRewrite): https://quarkus.io/guides/update-quarkus- Migration guides, one wiki page per minor: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.20 (change the version)
- Release announcements: https://quarkus.io/blog/
- LTS policy and current LTS: https://quarkus.io/blog/lts-releases/
常见问题
什么是 “extensions”?
扩展就像可以添加到 Quarkus 项目中的预制功能包,比如数据库支持、安全功能或特定的 API。
之后如何添加更多扩展?
你可以使用类似 `quarkus extension add <extension-name>` 或 `./mvnw quarkus:add-extension -Dextensions=<extension-name>` 的命令来添加。
我需要哪个 Java 版本?
一般推荐使用较新的 Java 版本,比如 Java 21 或 25,具体取决于你使用的 Quarkus 版本。
详情
作者的原始描述
Create a new Quarkus project (Maven or Gradle) with the Quarkus CLI, code.quarkus.io API or Maven plugin, choose extensions, and run it in dev mode. Use when asked to scaffold, bootstrap or start a Quarkus application or REST API.
repo: github/awesome-copilot
热度
- GitHub 星标
- 40k
- 排名
- #7141
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
acquire-codebase-knowledge
40k帮你的智能体理解并编写现有代码项目的文档。它有助于新成员快速上手,或者快速了解项目架构。
acreadiness-assess
40k让你的智能体评估一个项目对 AI 的准备程度,并生成报告。它有助于了解项目在使用 AI 工具方面的准备情况。
acreadiness-generate-instructions
40k帮你的智能体根据评估结果编写 AI 工具的指令文件。它有助于改善 AI 与代码的交互方式,并弥补已发现的不足。
acreadiness-policy
40k让你的智能体协助制定或应用 AI 项目评估的政策。它有助于规范项目的评估方式,并确保合规。