Skip to main content
skill CX Codex

111-java-maven-dependencies — Claude Code skill: Maven deps

Adds code-quality Maven dependencies to your pom.xml: JSpecify, Error Prone with NullAway, VAVR, ArchUnit, JavaMoney. Asks what you need and installs only that.

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

What 111-java-maven-dependencies does

The skill runs a conversation instead of editing pom.xml behind your back. First it asks which dependency families you want: JSpecify for nullness annotations in provided scope, Error Prone with NullAway for compile-time null checking, VAVR for Try/Either and immutable collections, ArchUnit for architecture tests in test scope, JavaMoney for money and currency work via JSR 354 and Moneta. There is a None option and an Other option.

Follow-up questions depend on your picks. Choose Error Prone + NullAway and the skill asks for your main project package in dot notation, which NullAway needs to analyse your code. That pair also expects JSpecify unless the project already has equivalent nullness annotations. Reference files are read only for the families you selected; the rest stay untouched.

Before touching anything, the skill runs ./mvnw validate or mvn validate. If validation fails it stops and asks you to fix the project first. That ordering matters — dependency edits on top of a broken build are painful to unwind. At the end it lists what was added and which follow-up checks are worth running.

What it helps with

  • add JSpecify nullness annotations in provided scope
  • turn on Error Prone and NullAway compile-time null checking
  • bring in VAVR for Try/Either and immutable collections
  • set up ArchUnit to enforce architecture rules in tests
  • add JavaMoney for precision-safe money and currency handling

Example prompts for the agent

  • Add Maven dependencies for code quality to this project, ask me first which families I want
  • Add JSpecify and Error Prone with NullAway, my main package is com.example.myproject
  • Add ArchUnit in test scope and JavaMoney for money handling

How to install 111-java-maven-dependencies

1Skills CLI (Vercel)

npx skills add jabrena/plinth --skill 111-java-maven-dependencies -a claude-code

2Manually: put the files in place

~/.claude/skills/111-java-maven-dependencies/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/111-java-maven-dependencies/

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

Questions about 111-java-maven-dependencies

How do I install 111-java-maven-dependencies in Claude?

Run npx skills add jabrena/plinth --skill 111-java-maven-dependencies -a claude-code. The skill file then lands at ~/.claude/skills/111-java-maven-dependencies/SKILL.md.

What does 111-java-maven-dependencies do?

It walks you through a dependency-selection questionnaire for code quality and domain modeling, then adds only the chosen families to pom.xml: JSpecify, Error Prone + NullAway, VAVR, ArchUnit, JavaMoney.

What does the skill need to run?

The project has to pass ./mvnw validate or mvn validate, otherwise the skill stops. Error Prone + NullAway also needs your main package in dot notation and JSpecify, unless the project already has equivalent nullness annotations.

Source text

SKILL.md · Apache-2.0
---
name: 111-java-maven-dependencies
description: 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
license: Apache-2.0
metadata:
  author: Juan Antonio Breña Moral
  version: 0.19.0
---
# 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)

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

Similar skills

All skills for Programming languages →

From the same set40

125-java-concurrency A skill that has your coding agent review Java code for race conditions, lock contention and thread leaks, then apply modern java.util.concurrent fixes. CX Codex +1 402installs 122-java-type-design A skill that reviews and refactors Java code for type design: kills primitive obsession, builds type hierarchies, picks BigDecimal where precision matters. CX Codex +1 394installs 302-frameworks-spring-boot-rest A skill that guides an agent through designing and reviewing Spring Boot REST APIs: methods, status codes, DTOs, versioning, pagination, RFC 7807 errors. CX Codex +1 392installs 301-frameworks-spring-boot-core Enforces constructor injection and fail-fast config validation in Spring Boot 4.0.x codebases with strict Maven verification. CX Codex +1 390installs 321-frameworks-spring-boot-testing-unit-tests A skill that steers your agent through Spring Boot unit testing: Mockito without a Spring context, slice tests for controllers, parameterized tests. Useful when @SpringBootTest has spread everywhere. CX Codex +1 387installs 112-java-maven-plugins A skill that adds and configures Maven plugins in pom.xml by asking one question at a time. Useful when you need quality checks, coverage or an image build. CX Codex +1 381installs 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

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