Use when you need to add or evaluate Maven dependencies that improve code quality — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), or architecture testing (ArchUnit) — 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. Part of cursor-rules-java project
75
—
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
Add essential Maven dependencies that enhance code quality and safety through a consultative, question-driven approach. This is an interactive SKILL.
What is covered in this Skill?
provided scope)test scope)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.
./mvnw validate or mvn validate before any changesRun ./mvnw validate or mvn validate and stop if validation fails.
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:
provided scope; recommended for new projects)test scope)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.
Selection notes:
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:
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-archunit.md.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.
Summarize what was added, why, and any recommended follow-up validations or tooling alignment.
For detailed guidance, examples, and constraints, see:
86eb63d
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.