Skip to main content
skill CX Codex

170-java-documentation — Claude Code skill: Java docs generator

A step-based skill that walks an agent through writing README.md, package-info.java and Javadoc for a Maven Java project. Useful when the code exists but the docs don't.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jabrena/plinth --skill 170-java-documentation -a claude-code
Open on GitHub

What 170-java-documentation does

The skill runs as an interactive, step-by-step process. First it has the agent run ./mvnw validate or mvn validate and stop right there if validation fails. Then it reads references/170-java-documentation.md and pins down the scope: a README for a single-module or multi-module Maven project, package-info.java files, or Javadoc improvements with @param, @return and @throws tags. The last step validates the output with ./mvnw clean compile and ./mvnw javadoc:javadoc.

File handling is your call: overwrite, append, back up or skip. That matters if the README was written by hand and you don't want it replaced. The detail level for package-info is selectable too, from minimal to detailed.

The constraint is baked into the workflow itself. Nothing gets generated until the project validates, and if the scope is ambiguous or files and tooling are missing, the skill stops and asks instead of guessing. The project needs to be Maven-based, since every check goes through mvnw.

What it helps with

  • write a README for a multi-module Maven project
  • add package-info.java to packages that have none
  • fill in Javadoc @param and @throws tags
  • document Java API architecture and project workflows
  • refresh existing docs while keeping a backup of the old file

Example prompts for the agent

  • Improve the code with documentation
  • Generate README and developer documentation for this Java project
  • Refactor the code with documentation: package-info and Javadoc

How to install 170-java-documentation

1Skills CLI (Vercel)

npx skills add jabrena/plinth --skill 170-java-documentation -a claude-code

2Manually: put the files in place

~/.claude/skills/170-java-documentation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/170-java-documentation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about 170-java-documentation

How do I install 170-java-documentation in Claude?

Run npx skills add jabrena/plinth --skill 170-java-documentation -a claude-code. The skill lands in ~/.claude/skills/170-java-documentation/SKILL.md.

What does 170-java-documentation do?

It generates and improves Java project documentation: README.md, package-info.java and Javadoc. It works in steps and adapts to whatever you actually need documented.

What does the skill need to run?

A Maven project, because the checks use ./mvnw validate, ./mvnw clean compile and ./mvnw javadoc:javadoc. If validation fails, the skill stops and makes no changes.

Source text

SKILL.md · Apache-2.0
---
name: 170-java-documentation
description: Use when you need to generate or improve Java project documentation — including README.md files, package-info.java files, and Javadoc enhancements — through a modular, step-based interactive process that adapts to your specific documentation needs. This should trigger for requests such as Improve the code with documentation; Apply documentation; Refactor the code with documentation; Generate README or developer documentation for a Java project; Document Java APIs architecture or project workflows. Part of Plinth Toolkit
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# Java Documentation Generator with modular step-based configuration

Generate comprehensive Java project documentation through a modular, step-based interactive process that covers README.md, package-info.java, and Javadoc. **This is an interactive SKILL**.

**What is covered in this Skill?**

- README.md generation for single-module and multi-module Maven projects
- package-info.java creation with basic/detailed/minimal documentation levels
- Javadoc enhancement: comprehensive `@param`/`@return`/`@throws` tags
- File handling strategies: overwrite/add/backup/skip
- Final documentation validation with `./mvnw clean compile` and `./mvnw javadoc:javadoc`

## Constraints

Before applying any documentation generation, ensure the project validates. If validation fails, stop immediately — do not proceed until all validation errors are resolved.

- **MANDATORY**: Run `./mvnw validate` or `mvn validate` before applying any documentation generation
- **SAFETY**: If validation fails, stop immediately — do not proceed until all validation errors are resolved
- **BEFORE APPLYING**: Read the reference for detailed good/bad examples, constraints, and safeguards for each documentation generation pattern
- **EDGE CASE**: If request scope is ambiguous, stop and ask a clarifying question before applying changes
- **EDGE CASE**: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance

## When to use this skill

- Improve the code with documentation
- Apply documentation
- Refactor the code with documentation
- Generate README or developer documentation for a Java project
- Document Java APIs architecture or project workflows

## Workflow

1. **Validate project before documentation changes**

Run `./mvnw validate` or `mvn validate` and stop immediately if validation fails.

2. **Read documentation reference and gather scope**

Read `references/170-java-documentation.md` and identify required outputs (README, package-info, Javadoc enhancements).

3. **Generate selected documentation artifacts**

Create or update documentation using the selected file-handling strategy (overwrite/add/backup/skip).

4. **Run documentation validation checks**

Execute `./mvnw clean compile` and `./mvnw javadoc:javadoc` (or equivalent) to validate generated docs.

## Reference

For detailed guidance, examples, and constraints, see [references/170-java-documentation.md](references/170-java-documentation.md).

© Juan Antonio Breña Moral · Apache-2.0 · jabrena/plinth

Similar skills

Everything for Writing and docs →

From the same set40

130-java-testing-strategies A skill that reviews Java tests through RIGHT-BICEP, A-TRIP and CORRECT: missing cases, flaky tests, boundary conditions. CX Codex +1 377installs 132-java-testing-integration-testing A skill that gets an AI agent to set up and clean up Java integration tests: WireMock stubs, per-test isolation, no mocked HTTP clients. CX Codex +1 376installs 142-java-functional-programming A skill that pushes your AI agent to rewrite Java in a functional style: Records, pure functions, Stream API pipelines and Optional. CX Codex +1 376installs 128-java-generics A skill that reviews and refactors Java generics: raw types, unchecked casts, PECS wildcards. Handy when a generic API starts leaking type safety. CX Codex +1 370installs 322-frameworks-spring-boot-testing-integration-tests A skill for writing and reviewing Spring Boot 4.0.x integration tests: Testcontainers, persistence slices, HTTP assertions. CX Codex +1 357installs 030-architecture-adr-general Interactive skill that interviews developers to capture architecture decisions for Java projects in MADR format. Useful when choosing databases or framework stacks. CX Codex +1 351installs 151-java-performance-jmeter Sets up JMeter load testing in Java projects by creating a run-jmeter.sh script and standard test directories. CX Codex +1 349installs 313-frameworks-spring-db-migrations-flyway A skill for adding and reviewing Flyway migrations in Spring Boot: Maven dependencies, db/migration scripts, spring.flyway.* settings and migration ordering. CX Codex +1 352installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor