111-java-maven-dependencies
Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a consultative, question-driven approach that adds only what you actually need. This should trigger for requests such as Add Maven dependencies; Add JSpecify nullness dependencies; Add Error Prone NullAway dependencies; Add VAVR functional dependencies; Add ArchUnit architecture testing dependencies; Add JavaMoney dependencies. Part of Plinth Toolkit
git clone --depth 1 https://github.com/jabrena/plinth /tmp/111-java-maven-dependencies && cp -r /tmp/111-java-maven-dependencies/skills/111-java-maven-dependencies ~/.claude/skills/111-java-maven-dependenciesSKILL.md
# Add Maven dependencies for improved code quality Add essential Maven dependencies that enhance code quality, safety, and domain modeling through a consultative, question-driven approach. **This is an interactive SKILL**. **What is covered in this Skill?** - JSpecify: (nullness annotations, `provided` scope) - Error Prone + NullAway: (enhanced static analysis with compile-time null checking) - VAVR: (functional programming with Try/Either and immutable collections) - ArchUnit: (architecture rule enforcement, `test` scope) - JavaMoney: (Money and Currency API support with JSR 354 and Moneta) ## Constraints Before adding Maven dependencies, ensure the project is in a valid state. Use a consultative, question-driven flow that adds only what the user selects. - **MANDATORY**: Run `./mvnw validate` or `mvn validate` before any changes - **SAFETY**: If validation fails, stop and ask the user to fix issues—do not proceed until resolved - **BEFORE READING DEPENDENCY REFERENCES**: Run the question flow embedded in this SKILL.md first. Ask one consolidated dependency-selection question, then ask only conditional follow-up questions required by the selected options. Read only the dependency references selected by the user's answers. Use consultative language, present trade-offs, and wait for user responses before implementing ## When to use this skill - Add Maven dependencies - Add JSpecify nullness dependencies - Add Error Prone NullAway dependencies - Add VAVR functional dependencies - Add ArchUnit architecture testing dependencies - Add JavaMoney dependencies ## Workflow 1. **Validate project before changes** Run `./mvnw validate` or `mvn validate` and stop if validation fails. 2. **Ask dependency assessment questions before reading references** Run this XML-included question flow before reading any dependency implementation reference. Ask the consolidated dependency-selection question first, wait for the user's answer, and record selected dependency families before continuing. Ask conditional follow-up questions only when required by the selected dependencies. **Question 1**: Which code-quality dependencies do you want to add? Options: - JSpecify (modern nullness annotations, `provided` scope; recommended for new projects) - Error Prone + NullAway (enhanced compiler analysis and compile-time nullness checking; requires JSpecify) - VAVR (functional programming support with Try/Either and immutable collections) - ArchUnit (architecture testing with JUnit 5, `test` scope) - JavaMoney (Money and Currency API support with JSR 354 and Moneta) - None - Other (specify) **Recommendation**: Select JSpecify for better null-safety annotations. Add Error Prone + NullAway when you want stronger compile-time analysis. Add VAVR only when functional programming patterns are useful for the project. Add ArchUnit when you want automated architecture governance. Add JavaMoney when the domain needs explicit monetary amounts, currencies, formatting, conversion, or precision-safe money calculations. **Selection notes**: - If Error Prone + NullAway is selected, also select JSpecify unless the project already has equivalent nullness annotations configured. - If None is selected, do not add dependency-family references. --- **Question 2** (conditional): What is your main project package name? **Note**: This question is asked only if Error Prone + NullAway was selected. This is needed to configure NullAway to analyze your code. For example, if your classes are in `com.example.myproject`, enter `com.example.myproject`. **Format**: Use dot notation (e.g., `com.example.myproject` or `org.mycompany.myapp`) **Example**: `com.example.myproject` After all applicable questions are answered, confirm the selections and map them to references: - If JSpecify is selected, read `references/111-java-maven-dependencies-jspecify.md`. - If enhanced compiler analysis is selected, use the Error Prone + NullAway section from `references/111-java-maven-dependencies-jspecify.md`. - If VAVR is selected, read `references/111-java-maven-dependencies-vavr.md`. - If ArchUnit is selected, read `references/111-java-maven-dependencies-archunit.md`. - If JavaMoney is selected, read `references/111-java-maven-dependencies-javamoney.md`. - Do not read or apply unselected dependency-family references. 3. **Read selected references and add only selected dependencies** Read only the selected dependency-family references, then implement only the dependencies, properties, scopes, plugin configuration, and support files chosen by the user while preserving the existing `pom.xml` structure. 4. **Report trade-offs and next checks** Summarize what was added, why, and any recommended follow-up validations or tooling alignment. ## Reference For detailed guidance, examples, and constraints, see: - [references/111-java-maven-dependencies-jspecify.md](references/111-java-maven-dependencies-jspecify.md) - [references/111-java-maven-dependencies-vavr.md](references/111-java-maven-dependencies-vavr.md) - [references/111-java-maven-dependencies-archunit.md](references/111-java-maven-dependencies-archunit.md) - [references/111-java-maven-dependencies-javamoney.md](references/111-java-maven-dependencies-javamoney.md)
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
Use when you need to generate a checklist document with embedded commands inventory, following the embedded template exactly and producing INVENTORY-COMMANDS-JAVA.md in the project root. This should trigger for requests such as Create embedded commands inventory checklist; Generate INVENTORY-COMMANDS-JAVA.md; Use @001-commands-inventory; Inventory embedded Java project commands; List command files bundled for Java agents. Part of Plinth Toolkit
Use when you need to generate a checklist document with embedded agents inventory, following the embedded template exactly and producing INVENTORY-AGENTS-JAVA.md in the project root. This should trigger for requests such as Create embedded agents inventory checklist; Generate INVENTORY-AGENTS-JAVA.md; Use @002-agents-inventory; Inventory embedded Java agent definitions; List generated agent roles for Java development. Part of Plinth Toolkit
Use when you need to generate a checklist document with Java system prompts from skills.xml, following the embedded section template and producing INVENTORY-SKILLS-JAVA.md. This should trigger for requests such as Create Java system prompts checklist; Generate INVENTORY-SKILLS-JAVA.md; Use @003-skills-inventory; Inventory Java cursor rule skills; List available Java system prompt skills. Part of Plinth Toolkit
Use when you need to install the embedded project commands into command directories (.github/commands, .claude/commands, .cursor/command, .codex/commands), selecting the destination interactively and copying the embedded command definitions from project assets. This should trigger for requests such as Install embedded commands; Bootstrap .cursor/command; Bootstrap .claude/commands; Copy project commands; Install project command suite. Part of Plinth Toolkit
Use when you need to install the embedded robot agents into .github/agents, .claude/agents, .cursor/agents, or .codex/agents, selecting the destination interactively and copying the embedded agent definitions from project assets. This should trigger for requests such as Install embedded agents; Bootstrap .github/agents; Bootstrap .cursor/agents; Bootstrap .claude/agents; Bootstrap .codex/agents; Copy robot agents. Part of Plinth Toolkit
Guides the creation of agile epics with comprehensive definition including business value, success criteria, and breakdown into user stories. Use when the user wants to create an agile epic, define large bodies of work, break down features into user stories, or document strategic initiatives. This should trigger for requests such as Create an agile epic; Write an epic; I need to create an epic; Define an epic; Epic definition. Part of Plinth Toolkit
Guides the creation of detailed agile feature documentation from an existing epic. Use when the user wants to split an epic into feature files, derive features with scope and acceptance criteria, or plan feature documentation for stakeholders or engineering. This should trigger for requests such as Create features from an epic; Split epic into features; Feature files from epic; Derive features from epic; Break down an agile epic into deliverable features. Part of Plinth Toolkit