本文へスキップ
Skillpedia
ドキュメント作成40k · #7254

java-docs

できること

このエージェントは、Javaコードに説明用のコメント(Javadocと呼ばれます)を追加するのに役立ちます。このコメントがあると、あなた自身や他の人がコードを理解しやすくなります。

使う場面

  • ✓新しいJava関数を書いたとき。
  • ✓コードのある部分が何をするのかを説明したいとき。
  • ✓コードを他のプログラマーと共有するとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“このJavaクラスとそのメソッドにJavadocコメントを追加してください。”

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

仕組み

Javaコードを解析し、Javadocコメントを自動的に挿入します。コメントが分かりやすく役立つものになるよう、ベストプラクティスに従います。

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

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

Java Documentation (Javadoc) Best Practices

  • Public and protected members should be documented with Javadoc comments.
  • It is encouraged to document package-private and private members as well, especially if they are complex or not self-explanatory.
  • The first sentence of the Javadoc comment is the summary description. It should be a concise overview of what the method does and end with a period.
  • Use @param for method parameters. The description starts with a lowercase letter and does not end with a period.
  • Use @return for method return values.
  • Use @throws or @exception to document exceptions thrown by methods.
  • Use @see for references to other types or members.
  • Use {@inheritDoc} to inherit documentation from base classes or interfaces.
    • Unless there is major behavior change, in which case you should document the differences.
  • Use @param <T> for type parameters in generic types or methods.
  • Use {@code} for inline code snippets.
  • Use <pre>{@code ... }</pre> for code blocks.
  • Use @since to indicate when the feature was introduced (e.g., version number).
  • Use @version to specify the version of the member.
  • Use @author to specify the author of the code.
  • Use @deprecated to mark a member as deprecated and provide an alternative.
よくある質問

Javadocコメントとは何ですか?

Javaコードの中に書く特別なテキストのことです。コードが何をするのか、どのように使うのか、どんな情報を受け取り、何を返すのかを説明します。これをもとに自動でドキュメントを生成することもできます。

なぜJavadocを使うのですか?

コードを素早く理解する助けになり、他の開発者との共同作業がしやすくなります。また、ソフトウェアの本格的なドキュメントを作成するうえで欠かせません。

すべてのコードにドキュメントを書く必要がありますか?

publicおよびprotectedの部分には、ドキュメントを書くことが必須です。それ以外の部分は、複雑だったり一見して分かりにくかったりする場合に書くことをおすすめします。

詳細

作者による元の説明

Ensure that Java types are documented with Javadoc comments and follow best practices for documentation.

repo: github/awesome-copilot

人気

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

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

0

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

コメント

  • …

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

似ているスキル