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.
npx skills add jabrena/plinth --skill 170-java-documentation -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/170-java-documentation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/170-java-documentation/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 170-java-documentation -a codex2Manually: put the files in place
.agents/skills/170-java-documentation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 170-java-documentation -a cursor2Manually: put the files in place
.cursor/skills/170-java-documentation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jabrena/plinth 170-java-documentation2Manually: put the files in place
.github/skills/170-java-documentation/SKILL.md1Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 170-java-documentation -a gemini-cli2Platform CLI
gemini skills install https://github.com/jabrena/plinth --path skills/170-java-documentationManually: put the files in place
.devin/skills/170-java-documentation/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jabrena/plinth --skill 170-java-documentation -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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