/java:java-build-standardsfrom java
Use when editing pom.xml, build.gradle or lombok.config in a project that follows the java-standards opt-in. Covers choosing and parameterizing dependency versions, declaring the Java version, Eclipse JDT formatting, Spring Modulith and ArchUnit together, the OpenAPI contract check, coverage gates and configuring Lombok with MapStruct through one lombok.config (rules B1 to B10).
Ships in java. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Before applying this skill, read .claude/java-standards.json at the
repository root. If it doesn't exist, or the file you're working on is
outside its include/exclude scope, follow the conventions of the
surrounding code instead.
Break a rule only with a concrete reason, and write that reason down. At
Stop, the java plugin blocks on violations in lines you changed; mark a
justified exception with // java-rules:allow <ID> <reason>.
B1. Choose versions deliberately. Before adding a library, check which version fits the project. Prefer the version managed by the framework BOM.
B2. Parameterized versions. A version outside the BOM is always a property
named <artifactId>.version, and the dependency refers to that property. In
Gradle, declare it in the version catalog under the artifact ID.
<properties>
<zjsonpatch.version>0.6.4</zjsonpatch.version>
</properties>
<dependency>
<groupId>io.github.vishwakarma</groupId>
<artifactId>zjsonpatch</artifactId>
<version>${zjsonpatch.version}</version>
</dependency>
B3. Enforce at build time. Whatever can be enforced at build time is enforced there for reproducibility: OpenAPI generation, tests, formatting, architecture.
B4. Declare the Java version. Always state the required Java version in the
build file. With the Spring Boot parent, set java.version. Add an enforcer
rule so the wrong JDK fails fast.
<properties>
<java.version>25</java.version>
</properties>
B5. Automated formatting.
ratchetFrom, which
works per file.B6. The formatter serves the reader. Formatted code should read naturally. When the output for a block is harder to read than the hand-written version, turn the formatter off for that block and keep the block short. Enable the markers first: "Turn formatter on/off with markers" in IntelliJ, and the off/on tags in the Eclipse formatter profile that Spotless uses.
// @formatter:off
private static final Map<ProjectStatus, Set<ProjectStatus>> TRANSITIONS = Map.of(
DRAFT, Set.of(ACTIVE, ARCHIVED),
ACTIVE, Set.of(ARCHIVED),
ARCHIVED, Set.of());
// @formatter:on
B7. Enforce the architecture. Use both: Spring Modulith verifies the boundaries between features (see D2), and ArchUnit enforces layering, visibility, domain purity and the absence of package cycles inside each feature (see D8). Both run as unit tests.
B8. Protect the API contract. Generate the OpenAPI specification during the build. Fail the build if it differs from the committed file, and check for breaking changes.
B9. A coverage gate that means something. Measure branch coverage on
business logic, and exclude only generated code. The lombok.config of B10
marks Lombok's output as generated, and the gate excludes *MapperImpl classes.
B10. Lombok and MapStruct together. The two are always used together, so
configure them as a pair on the compiler's annotation processor path, including
the binding artifact. Set Spring as the component model and constructor
injection as the strategy. Unmapped targets are compile errors. Keep lombok
out of the packaged application.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-binding.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<arg>-Amapstruct.defaultComponentModel=spring</arg>
<arg>-Amapstruct.defaultInjectionStrategy=constructor</arg>
<arg>-Amapstruct.unmappedTargetPolicy=ERROR</arg>
</compilerArgs>
</configuration>
</plugin>
One lombok.config at the root of the project configures Lombok for the
coverage gate (B9), NullAway (J20) and builders (J26):
config.stopBubbling = true
lombok.addLombokGeneratedAnnotation = true
lombok.addNullAnnotations = jspecify
lombok.builder.className = Builder
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub leonardo-marziali/agentic-development-kit --plugin java13 skills in this plugin
/checkUse when the user asks to "check the Java standard", "run the java rules", "check these Java files", "run NullAway / ArchUnit on this", or wants pre-existing Java files checked, not just the lines a session changed. Reports every finding of the plugin's source rules, build-file rules, NullAway and ArchUnit./formatUse when the user asks to "format Java", "format these Java files", "run the Eclipse formatter", or wants Java files the session never touched formatted. Formats whole Java files with the plugin's Eclipse JDT engine and the project's formatter profile, including pre-existing files./java-ddd-eventsUse when modelling bounded contexts, aggregates, value objects, domain services, ports and adapters, state machines, events, messaging or scheduled jobs in a project that follows the java-standards opt-in. Covers the ubiquitous language, bounded contexts and anti-corruption layers, the hexagonal core with driving and driven ports enforced by ArchUnit, aggregate boundaries, references by identity, one aggregate per transaction, optimistic locking on the root, read models that bypass the aggregate, plain-Java domain classes, creation factories, step builders, early identity and reconstitution, explicit state machines, value objects, domain and integration events, the transactional outbox, idempotent consumers, versioned schemas and safe scheduled jobs (rules D1 to D29).Other plugins' skills for the same job