Official agent skill

Clarify Java Comments

by DataDog in DataDog/dd-trace-java

Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment.

OfficialApache-2.0Auto-check: notesDevelopment

Install Clarify Java Comments

skills CLI
$ npx skills add DataDog/dd-trace-java --skill clarify-java-comments -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install DataDog/dd-trace-java clarify-java-comments --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/DataDog/dd-trace-java.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/clarify-java-comments .claude/skills/clarify-java-comments && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clarify-java-comments
GitHub stars
736
Token cost
~2.3k tokens
SKILL.md length
1,190 words
Files
4 (incl. references)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment.

  • Works in 6 steps: Compare each sentence with the exact… → Check reused state, cached values,… → Verify links and tags name real types,… → …
  • Asked to simplify verbose
  • SKILL.md covers Scope the work, Route the workflow, Decide what deserves explanation and Rewrite for readers, plus 4 more sections
  • Calls java

What it does

Clarify Java Comments is an agent skill from DataDog/dd-trace-java, published by the product's own GitHub organization. Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment. Use when asked to simplify verbose or generated comments, edit documentation in a local file, class, or member, repair Javadoc markup, propose copy-ready replacements, or add GitHub suggestions to an existing pending PR review. Documentation-focused: never change executable code or turn the task into a general code review. Do not submit a review unless explicitly requested.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/github-review.md`, `references/javadoc.md` and `references/local-edit.md`).

It sits in Development, covering Technical documentation and Pull requests. It works with Java, GitHub and Datadog. The repository describes itself as: Datadog APM client for Java. The licence is Apache-2.0.

When your agent uses it

  • Asked to simplify verbose
  • Generated comments
  • Edit documentation in a local file
  • Repair Javadoc markup

Example prompts

  • “/clarify-java-comments”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Edit, Glob, Grep

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Compare each sentence with the exact source and relevant tests.
  2. Check reused state, cached values, version-dependent behavior, and benchmark
  3. Verify links and tags name real types, members, and parameters.
  4. Keep the replacement compatible with the original comment kind, surrounding
  5. For prose-only local edits, run the narrowest formatting check. When links, tags,
  6. If verification cannot run, state exactly what was not run and why. Do not turn

What it can do on your machine

Read from SKILL.md and the folder at commit 89321ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Edit
    • Glob
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • java

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Clarify Java Comments loads about 2.3k tokens when it runs, and up to ~3.8k if it reads all its reference files. Until then it costs about 131 tokens; SKILL.md has 1,190 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Edit, Glob, Grep

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from DataDog/dd-trace-java at commit 89321ee, republished under its Apache-2.0 licence (© DataDog). 1,190 words, ~2,295 tokens.

Download SKILL.mdSave it as .claude/skills/clarify-java-comments/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
clarify-java-comments
description
Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment. Use when asked to simplify verbose or generated comments, edit documentation in a local file, class, or member, repair Javadoc markup, propose copy-ready replacements, or add GitHub suggestions to an existing pending PR review. Documentation-focused: never change executable code or turn the task into a general code review. Do not submit a review unless explicitly requested.
allowed-tools
Bash, Read, Edit, Glob, Grep
user-invocable
true
context
fork

Clarify Java Comments

Produce concise documentation that preserves the contract, useful conclusions, and important hidden behavior without narrating every inference or obvious implementation step. Treat existing comments and PR descriptions as claims to verify against the current source.

Scope the work

  • Review or edit only the Javadocs and explanatory code comments changed by the diff or explicitly named by the user.
  • Read enough surrounding implementation, tests, and callers to verify every retained claim. Report an inaccurate claim instead of preserving it in smoother prose.
  • Before shortening a comment, inventory its distinct technical claims and invariants. Classify each as supported and important, obvious or redundant, or unsupported. Preserve every supported non-obvious item in the rewrite.
  • Stay documentation-focused. Do not expand into a general correctness or performance review unless a behavioral issue makes the proposed Javadoc false.

Route the workflow

Read all references that apply to the request:

  • Javadoc tags for whole-comment rewrites or explicit tag repair.
  • Local edits before changing documentation in the checkout. A path selects a target but does not authorize an edit.
  • GitHub reviews before any GitHub review workflow. Posting, replying, editing, and submitting each require the separate authorizations defined there.

Decide what deserves explanation

Use this deletion test before shortening or removing explanatory detail: would its absence make a competent maintainer likely to miss a material constraint or have to reconstruct it through specialist knowledge or non-local investigation?

  • Keep a verified explanation when it affects the API contract, correctness, safe modification, compatibility, or performance and is not cheaply recoverable from the signature and nearby straight-line code using ordinary Java knowledge.
  • Treat behavior as non-obvious when it is implicit in the platform or runtime, such as JVM, Java Memory Model, or JIT behavior; when its cause or effect lies elsewhere, such as in a caller, lifecycle, generated bytecode, or downstream consumer; or when the local code requires specialist reasoning about synchronization, memory visibility, interleavings, type profiling, allocation, or escape analysis.
  • Preserve the shortest causal chain that explains the constraint: the condition or mechanism, the resulting effect or invariant, and why it matters to callers or future changes. Omit intermediate proof steps once that chain is understandable.
  • Omit prose that only restates names, types, syntax, or visible control flow; repeats the same contract or conclusion; catalogs irrelevant alternatives or history; or adds technical detail without a reader-relevant consequence.
  • Do not equate proximity with obviousness. Nearby code can require explanation, and distant or technical behavior should be retained only when it materially matters.

Rewrite for readers

  • Lead with the API contract or purpose. Apply the decision rule above to any explanatory detail beyond that contract.
  • Express each retained explanation as a compact causal chain rather than narrating every inference.
  • Do not remove JVM internals merely because they are arcane. When relevant, retain matters such as Java Memory Model publication and happens-before guarantees, safe traversal through retained links, HotSpot escape analysis or devirtualization, composite-key allocation, identity fast paths and boxing, atomic updater and reservation accounting, or type erasure in runtime containers such as AtomicReferenceArray. These are examples of details to preserve, not a checklist of content to invent.
  • Define specialist terms on first use. Prefer one compact explanation over a historical detour or a list of what the code does not do.
  • State a supported conclusion once. Retain only the reasoning needed to satisfy the decision rule above and make the conclusion safe to act on.
  • Use a one-line Javadoc for an obvious delegate or predicate. Use paragraphs only when they carry distinct information.
  • For benchmark documentation, separate inputs and setup from measured results and conclusions. Keep existing JMH result tables and numbers when present unless the user asks to remove them or evidence shows that they are stale or invalid. Retain the environment details needed to interpret the numbers, and remove speculation that was not measured. If results are unreliable, flag the problem instead of silently replacing the evidence with prose.
  • Prefer <pre>{@code ...}</pre> for a useful copy-ready example. Do not add an example when the signature already makes usage clear.
  • When a claim depends on JVM, library, or tool behavior outside the repository, verify it with primary sources such as OpenJDK source or the maintained project's official documentation. Do not rely on commercial aggregator sites.
  • Use plain international English. Remove stacked parentheticals, repeated claims, conversational asides, promotional adjectives, and long "not to be confused with" passages.
Show full SKILL.md (463 more words)Show less

Write for one-pass reading

A rewrite must be easier to understand, not merely shorter. Aim for an informative, concise, legible, blog-like technical style.

  • Put the main point first. Use a concrete subject and an active verb where practical.
  • Keep one idea per sentence and one purpose per paragraph. Split nested clauses and long parenthetical chains.
  • Name the relevant method, state, or JVM mechanism instead of relying on an unclear pronoun or distant antecedent.
  • Keep the connective sentence that makes a causal relationship understandable. Concision must not make the text compressed, cryptic, or abrupt.
  • Use terminology that matches the code and domain. Replace vague generated labels with names a maintainer would naturally use.
  • Read the replacement once in its surrounding context. If understanding a sentence requires backtracking to find its subject, condition, or conclusion, rewrite it.

Reword explanatory code comments

Apply the same source-grounded rewrite to // and /* ... */ comments that narrate obvious steps, repeat conclusions, stack caveats, or otherwise read like generated verbiage.

  • Preserve the comment's form and scope; do not turn an implementation comment into Javadoc unless the user requests an API documentation change.
  • Keep comments that record an invariant, a non-obvious reason, a compatibility constraint, or a deliberate tradeoff. Remove line-by-line narration of code that is already clear.
  • Never modify suppression directives, generated markers, license text, or tooling instructions in this skill. Preserve TODO/FIXME ownership and status; rewrite only their explanatory prose when the user explicitly names it.

Check the replacement

Before presenting, applying, or posting a replacement:

  1. Compare each sentence with the exact source and relevant tests.
  2. Check reused state, cached values, version-dependent behavior, and benchmark setup; these commonly make plausible Javadoc claims false.
  3. Verify links and tags name real types, members, and parameters.
  4. Keep the replacement compatible with the original comment kind, surrounding delimiters, and repository formatting.
  5. For prose-only local edits, run the narrowest formatting check. When links, tags, or examples changed, also run the narrowest available Javadoc or doclint task and any compilation needed to resolve referenced symbols. Run Gradle with ./gradlew .... After a GitHub mutation, re-fetch and verify the exact body, path, range, commit, owning review, and expected review state.
  6. If verification cannot run, state exactly what was not run and why. Do not turn an environment or unrelated pre-existing failure into a finding about the rewrite.

If the workflow needs non-trivial scripting, use a Java 25 source-file launch script and run it directly with java --source 25 <script>.java; keep shell usage to simple commands such as gh, rg, and sed.

Report the outcome

Summarize which Javadocs or draft comments were changed or proposed, call out corrected factual claims, and state the verification performed. After suggestion-only mutations, confirm the review remains pending. After submission, report the selected event, terminal state, and submission timestamp.

© DataDog, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in .agents/skills/clarify-java-comments of DataDog/dd-trace-java.

  • SKILL.md
  • references/github-review.md
  • references/javadoc.md
  • references/local-edit.md

Open the folder on GitHubat commit 89321ee

Compare with similar skills

Clarify Java Comments next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clarify Java Comments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clarify Java Comments this skillDataDog/dd-trace-java736—~2.3kAutomated safety check: NotesApache-2.0
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT
Post Draft Reviewagent-substrate/substrate4.5k—~2.8kAutomated safety check: PassApache-2.0
CI Act Runchewiebug/GCViewer4.6k—~2.4kAutomated safety check: NotesCustom licence
Review Kedro PRkedro-org/kedro11k—~2.8kAutomated safety check: PassCustom licence
Review PRjavierbrea/eslint-plugin-boundaries997—~2.9kAutomated safety check: PassMIT

Similar skills

  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Post Draft Review

    agent-substrate/substrate

    Posts pull request review findings as GitHub draft (pending) inline comments for a human to edit and submit, instead of publishing them straight to the PR author.

    4.5k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • CI Act Run

    chewiebug/GCViewer

    Run the full build-and-deploy.yaml workflow locally via act + Docker.

    4.6k GitHub stars~2.4k tokensUpdated 3 mo ago
    DevelopmentAuto-check: notes
  • Review Kedro PR

    kedro-org/kedro

    Review a Kedro PR for checklist compliance, architecture, correctness, and clarity.

    11k GitHub stars~2.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Review PR

    javierbrea/eslint-plugin-boundaries

    Review a GitHub pull request from three perspectives — functional fit against its linked issue, code correctness/quality, and architectural boundaries — then post a single GitHub review: one general…

    997 GitHub stars~2.9k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Release

    sol4k/sol4k

    Bump the sol4k library version everywhere, open a release PR, and draft GitHub release notes.

    135 GitHub stars~949 tokensUpdated 9 days ago
    DevelopmentAuto-check passed

More from DataDog/dd-trace-java

All 9 skills in this repo
  • Apm Integrations

    DataDog/dd-trace-java

    Official

    Write a new library instrumentation end-to-end. An agent skill from DataDog/dd-trace-java.

    736 GitHub stars~3.7k tokensUpdated today
    Auto-check: notes
  • Perf Review

    DataDog/dd-trace-java

    Official

    Performance-overhead review of a code diff / branch / PR for the dd-trace-java tracer.

    736 GitHub stars~3.6k tokensUpdated today
    Auto-check: notes
  • Resolve Muzzle CI

    DataDog/dd-trace-java

    Official

    Diagnose and resolve dd-trace-java CI failures from a module's muzzle task or the runMuzzle aggregate.

    736 GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Fix Continuation Leakage

    DataDog/dd-trace-java

    Official

    Diagnose and fix scope or continuation lifecycle failures in dd-trace-java instrumentation tests.

    736 GitHub stars~1.6k tokensUpdated today
    Auto-check: notes
  • Techdebt

    DataDog/dd-trace-java

    Official

    Review a code diff / branch / PR for technical debt — code duplication, unnecessary complexity / over-engineering, and redundant or dead code.

    736 GitHub stars~565 tokensUpdated today
    Auto-check: notes
  • Migrate Groovy To Java

    DataDog/dd-trace-java

    Official

    Converts Spock/Groovy test files in a Gradle module to equivalent JUnit 5 Java tests.

    736 GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Categories

Questions about Clarify Java Comments

What does Clarify Java Comments do?

Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment. Clarify Java Comments is an agent skill from DataDog/dd-trace-java, published by the product's own GitHub organization. Clarify or review Java Javadocs, Javadoc tags, and explanatory code comments for legibility, accuracy, and source alignment.

When should I use Clarify Java Comments?

Clarify Java Comments fits situations like: asked to simplify verbose; generated comments; edit documentation in a local file; repair Javadoc markup.

How do I install Clarify Java Comments in Claude Code?

Run `npx skills add DataDog/dd-trace-java --skill clarify-java-comments -a claude-code`. Or copy the skill folder (.agents/skills/clarify-java-comments in DataDog/dd-trace-java) into .claude/skills/clarify-java-comments in your project. Claude Code loads it when a task matches its description.

How do I install Clarify Java Comments in Codex?

Run `npx skills add DataDog/dd-trace-java --skill clarify-java-comments -a codex`. Or copy the skill folder (.agents/skills/clarify-java-comments in DataDog/dd-trace-java) into .agents/skills/clarify-java-comments in your project. Codex loads it when a task matches its description.

Can I use Clarify Java Comments in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add DataDog/dd-trace-java --skill clarify-java-comments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clarify-java-comments, .gemini/skills/clarify-java-comments, .github/skills/clarify-java-comments and .opencode/skills/clarify-java-comments in your project.

What does Clarify Java Comments need to run?

Going by SKILL.md and its folder, Clarify Java Comments needs the command-line tools its instructions call (java). Its frontmatter pre-approves these tools: Bash, Read, Edit, Glob, Grep.

Does Clarify Java Comments access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Clarify Java Comments safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Clarify Java Comments use?

Clarify Java Comments is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clarify Java Comments use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Clarify Java Comments?

Skills that share tags, products or a category with Clarify Java Comments: Creating Description For Gh PR (redis/jedis, 12k stars), Post Draft Review (agent-substrate/substrate, 4.5k stars), CI Act Run (chewiebug/GCViewer, 4.6k stars) and Review Kedro PR (kedro-org/kedro, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clarify Java Comments?

DataDog (a GitHub organization, an official publisher) maintains it in DataDog/dd-trace-java, which has 736 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: DataDog/dd-trace-java on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.