Skip to content
Skillpedia
Documentation40k · #5197

java-docs

Helps your agent document Java code. It ensures Javadoc comments are complete and follow best practices for clarity.

What it does

This agent helps add explanatory comments (called Javadoc) to your Java code. These comments make the code easier to understand for you and others.

When to use it

  • ✓When you write a new Java function.
  • ✓When you want to explain what a piece of your code does.
  • ✓When you share your code with other programmers.

Example of what to ask your AI

“Add Javadoc comments to this Java class and its methods.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

Ready-to-paste message

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/java-docs/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It analyzes your Java code and automatically inserts Javadoc comments. It follows best practices to ensure the comments are clear and useful.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add github/awesome-copilot --skill java-docs

Or download just the file:

curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/java-docs/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from 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.
FAQ

What are Javadoc comments?

These are special texts within Java code that explain what the code does, how to use it, what information it receives, and what it returns. They are used to generate automatic documentation.

Why use Javadoc?

It helps in understanding code faster, makes collaboration with other developers easier, and is essential for creating professional documentation for your software.

Do I need to document everything?

It's mandatory to document public and protected parts of the code. It's recommended to document other parts if they are complex or not obvious.

Details

Original description by the author

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

repo: github/awesome-copilot

Popularity

GitHub stars
40k
Ranking position
#5197
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills