本文へスキップ
Skillpedia
APIとサーバー(バックエンド)40k · #7255

java-helidon

できること

このエージェントは、Javaフレームワークである Helidon 向けに、ベストプラクティスに沿ったコードを書くのを手伝います。最新バージョン(Helidon 4)に対応したコードになり、構成も整理されます。

使う場面

  • ✓Helidon 4で新しいプロジェクトを始めるとき。
  • ✓古いプロジェクトをHelidon 4へ移行するとき。
  • ✓ベストプラクティスに沿ったコード例が必要なとき。

スキルのリンク

https://github.com/github/awesome-copilot/blob/main/skills/java-helidon/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/github/awesome-copilot/blob/main/skills/java-helidon/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“Mavenを使ってHelidon 4のプロジェクトを設定するにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

あなたのコードを最新のHelidon 4のルールと照らし合わせ、プロジェクトの整理方法、依存関係の設定方法、そして正しく動作するコードの書き方を提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Helidon Best Practices

Your goal is to help me write high-quality Helidon applications by following established best practices.

Helidon 3 → 4 API changes

Helidon 4 renamed or resignatured APIs that appear widely in their Helidon 3 form. The left column does not compile on Helidon 4. Check generated code against this table before returning it.

Do not use (Helidon 3) Use (Helidon 4)
io.helidon.common.http.Http.Status io.helidon.http.Status
io.helidon.webserver.Service io.helidon.webserver.http.HttpService
Routing.Rules, update(Routing.Rules) HttpRules, routing(HttpRules)
request.path().param("id") request.path().pathParameters().get("id")
String s = column.as(String.class) column.getString() or column.get(String.class)
dbClient.execute(exec -> ...) returning Single/Multi dbClient.execute() returning Optional<DbRow> / Stream<DbRow>
javax.* jakarta.*
helidon-microprofile-tests-junit5 helidon-microprofile-testing-junit5

Value.as(Class) in Helidon 4 returns OptionalValue<T>, not T. This is the single most common Helidon 4 compile error in generated code.

Project Setup & Structure

  • Programming Model: Determine whether the project uses Helidon SE or Helidon MP before generating code. Do not mix the two programming models unless explicitly required.
  • Java Version: Use Java 21 or later for Helidon 4 applications.
  • Build Tool: Use Maven (pom.xml) or Gradle (build.gradle) for dependency management.
  • Dependency Management: Use the Helidon BOM or platform to keep Helidon module versions aligned.
  • Package Structure: Organize code by feature or domain, such as com.example.app.order and com.example.app.customer, rather than only by technical layer.

Helidon SE

  • Explicit Composition: Construct services and dependencies explicitly in the application bootstrap layer.
  • Constructor Injection: Pass required dependencies through constructors and declare dependency fields as private final.
  • HTTP Services: Group related routes in focused HttpService implementations.
  • Business Logic: Keep business logic outside route handlers.
  • Virtual Threads: Prefer straightforward blocking code with Helidon 4 virtual-thread-based request handling. Do not introduce reactive complexity without a clear reason. Helidon 4 is not reactive; do not generate Single, Multi, or CompletionStage chains.

Helidon MP

  • Jakarta and MicroProfile: Prefer standard Jakarta EE and Eclipse MicroProfile APIs when available.
  • Dependency Injection: Use CDI with constructor injection for required dependencies.
  • Bean Scopes: Use CDI scopes such as @ApplicationScoped and @RequestScoped intentionally.
  • Normal-Scoped Beans: Add a non-private no-argument constructor to normal-scoped beans that use constructor injection, so the CDI client proxy can be created portably.
  • Business Logic: Keep Jakarta REST resource classes thin and delegate business operations to service classes.
  • Portability: Prefer portable Jakarta and MicroProfile APIs over Helidon-specific APIs when portability is important.

Configuration

  • Externalized Configuration: Store non-secret configuration in application.yaml or application.properties.
  • Helidon SE Configuration: Use Helidon Config and pass configuration values or typed configuration objects to components.
  • Helidon MP Configuration: Use MicroProfile Config for injected application settings.
  • Environment Overrides: Use environment variables or deployment-specific configuration sources for environment-dependent values.
  • Secrets Management: Never hardcode credentials, API keys, tokens, or private certificates.

Web Layer

…

よくある質問

Helidon SEとHelidon MPの違いは何ですか?

Helidon SE(Standard Edition)はより基本的で柔軟な方式です。一方、Helidon MP(MicroProfile)は、CDIやJAX-RSといったより確立された標準を使ってアプリケーションを構築します。

なぜHelidon 4のAPIを使うことが重要なのですか?

Helidon 4のAPIは、より効率的で安全になるよう更新されています。それらを使うことで、よくあるエラーを避けられ、新しいバージョンとの互換性も確保できます。

「ベストプラクティス」とは何ですか?

コードを書くうえで推奨される、最も効率的な方法のことです。プログラムが理解しやすく、保守しやすく、エラーも起きにくくなります。

詳細

作者による元の説明

Get best practices for developing applications with Helidon 4 (SE and MP). Use when working with Helidon SE or Helidon MP, HttpService routing, Helidon DB Client, MicroProfile Config, Helidon Security, or Helidon testing in Java 21+ projects.

repo: github/awesome-copilot

人気

GitHubのスター
40k
ランキング
#7255
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル