本文へ移動
cccskills
無料GitHub で公開

java-docs

Java Javadoc best practices. Use when adding or reviewing documentation for Java types, methods, packages, and public APIs.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md5.6 KB
  • CHANGELOG.md4.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Java Documentation (Javadoc) Best Practices

Optimized for current Java LTS releases, JavaDoc doclint, Maven or Gradle builds, and module-aware API documentation.

  • 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.

  • Leverage native parallel subagent dispatch and 200k+ context windows where available.

Documentation Stack Reference

Inherit the shared stack from documentation-patterns: source-of-truth discovery, audience framing, structure selection, verification, and freshness checks. Keep this skill focused on Java API documentation specifics instead of restating the full stack.

Anti-Patterns

  • Repeating the method signature in prose: JavaDoc is most useful when it adds intent, constraints, and failure semantics.
  • Leaving exceptions or side effects undocumented: Callers cannot use the API safely if the contract is only visible in code.
  • Publishing examples that no longer compile: Broken snippets damage trust faster than missing snippets.

Verification Protocol

Before claiming "skill applied successfully":

  1. Pass/fail: The Java Docs output identifies audience, purpose, source of truth, and freshness requirements.
  2. Pass/fail: Shared documentation-stack guidance is referenced instead of duplicating another documentation skill.
  3. Pass/fail: Claims, links, commands, examples, and screenshots are verified or explicitly marked unverified.
  4. Pressure-test scenario: Apply the skill to a doc request with a stale command, missing owner, and conflicting audience.
  5. Success metric: Zero undocumented assumptions; every reader-facing claim is sourced or scoped.

Before and After Example

// Before
/** Gets a user. */
User getUser(String id);

// After
/**
 * Loads a user by identifier.
 *
 * @param id stable user identifier from the identity provider
 * @return persisted user record when found
 * @throws UserNotFoundException when the identifier does not resolve
 */
User getUser(String id);

Documents inputs, outputs, and failure conditions so the API contract is clear to callers and reviewers.

Common Pitfalls

  • Explaining what the method name already says: JavaDoc should capture intent, constraints, and side effects, not repeat the signature.
  • Leaving exceptions undocumented: Callers cannot use the API safely if failure modes are only visible in implementation.
  • Letting examples lag behind the code: Outdated snippets make the docs look trustworthy while teaching the wrong contract.
<!-- MCP:START --> <!-- PORTABILITY:START -->

Cross-Client Portability

This skill is written to stay usable across GitHub Copilot, Claude Code, and Codex.

  • GitHub Copilot: keep the folder in a Copilot-visible skill path or wrap the workflow in project instructions when folder discovery is unavailable.
  • Claude Code: keep the folder in a local skills directory or a compatible plugin source.
  • Codex: install or sync the folder into $CODEX_HOME/skills/java-docs and restart Codex after major changes.
<!-- PORTABILITY:END -->

MCP Availability And Fallback

Preferred MCP Server: None required

  • Fallback prompt: "Use the Java Documentation (Javadoc) Best Practices skill without MCP. Rely on the local SKILL.md, bundled references or scripts, and manual verification. Show the exact commands, evidence, and final checks you used before concluding."
  • If the current host does not expose a matching server, use the bundled references, scripts, native toolchain, and manual workflow already described in this skill.
  • Treat direct local verification, rendered output, logs, tests, or screenshots as the fallback evidence path before completion.
<!-- MCP:END -->

Related Skills

  • java-junit: Use it when the workflow also needs JUnit 5 testing practices in Java.
  • documentation-authoring: Use it when the workflow also needs drafting structured technical or product documents.
  • documentation-quality: Use it when the workflow also needs documentation review standards and quality gates.
  • code-quality: Use it when the workflow also needs two-stage review (spec compliance first, then code quality), maintainability, and refactoring guidance.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

AI-powered adeno-associated virus (AAV) vector design for gene therapy including capsid engineering, promoter selection, and tropism optimization.

日本語の概要は準備中です。原文の説明を表示しています。

bg-szy/TOP-SKILLS62026年9月8日 更新

Improve the clarity and voice of AI-assisted academic writing (papers, theses, rebuttals) and

日本語の概要は準備中です。原文の説明を表示しています。

bg-szy/TOP-SKILLS62026年9月8日 更新

12-agent academic paper writing pipeline. 11 modes (full/plan/outline/revision/revision-coach/abstract/lit-review/format-convert/citation-check/disclosure/rebuttal-audit). 6 paper types, 5 citation formats, bilingual abstracts, LaTeX/DOCX-via-Pandoc/PDF output. Style Calibration + Writing Quality Check + Anti-Patterns with IRON RULE markers. Triggers: write paper, academic paper, guide my paper, parse reviews, audit my rebuttal, check my response draft, AI disclosure, 寫論文, 學術論文, 引導我寫論文, 審查意見, 評估回覆, 논문 작성, 초록 작성, 논문 수정, 논문 계획을 도와줘, 심사 의견 반영, 답변서 점검, AI 사용 고지.

日本語の概要は準備中です。原文の説明を表示しています。

bg-szy/TOP-SKILLS62026年9月8日 更新

Systematic writing framework for philosophy and interdisciplinary academic papers from optimized outline to submission-ready manuscript. Use when users want to: (1) write a paper from a detailed outline, (2) ensure quality control during writing, (3) maintain consistency across chapters, (4) prepare a submission-ready manuscript, or (5) systematically execute a planned paper. Triggered by phrases like 'write the paper from this outline,' 'compose the full manuscript,' 'execute the outline,' or when users have completed strategic planning (academic-paper-strategist skill) and are ready to write. Takes optimized outline as input; outputs complete manuscript with iterative quality checks.

日本語の概要は準備中です。原文の説明を表示しています。

bg-szy/TOP-SKILLS62026年9月8日 更新

Multi-perspective academic paper review with dynamic reviewer personas. Runs a 5-seat, role-separated review panel (Journal-Fit Reviewer + 3 peer-review roles + Devil's Advocate) with field-specific expertise; role separation is not a claim of independent error processes. Supports full review, re-review (verification), quick assessment, methodology focus, Socratic guided, and calibration modes. Triggers on: review paper, peer review, manuscript review, referee report, review my paper, critique paper, simulate review, editorial review, calibrate reviewer, reviewer calibration, measure reviewer accuracy, 審查論文, 論文審查, 模擬審查, 同儕審查, 幫我審這篇, 以審查人角度評估, 審查者校準, 논문 심사, 동료 심사, 모의 심사, 심사자 관점에서 평가, 심사자 보정.

日本語の概要は準備中です。原文の説明を表示しています。

bg-szy/TOP-SKILLS62026年9月8日 更新

Systematic strategic planning framework for philosophy and interdisciplinary academic papers targeting preprint platforms (PhilArchive, arXiv, PhilSci-Archive). Use when users want to: (1) plan a paper on a specific topic, (2) identify research gaps and assess originality, (3) develop optimized paper outlines, (4) prepare for preprint submission, or (5) understand platform requirements and writing standards. Triggered by phrases like 'plan a paper on,' 'help me design a paper about,' 'identify research gaps in,' 'is this idea original,' or when users need structured research planning. The skill guides through three phases: Platform Analysis (identifying target venue and studying sample papers), Theoretical Framework (AI-driven literature search and gap identification), and Outline Optimization (structured design with reviewer-perspective self-assessment). Each phase includes quality evaluation standards and validation checkpoints.

日本語の概要は準備中です。原文の説明を表示しています。

bg-szy/TOP-SKILLS62026年9月8日 更新

bg-szy のスキルをすべて見る

このスキルの問題を報告する