← ClaudeAtlas

java-project-standardlisted

Enforce a strict, model-agnostic, AI-navigable Java project standard: the Java compiler plus `-Werror` + `-Xlint:all` as the baseline, **Error Prone** (bug-pattern checks as errors, the clippy/detekt analog) and **NullAway** (JSpecify `@Nullable`, null-safety at compile time — the Kotlin null-safety / Swift optional analog) as the static guarantee, **Spotless** with google-java-format as the format gate, sealed error hierarchies + exhaustive `switch` (no silent failures), **TDD with a JaCoCo coverage floor in the gate**, Jackson at boundaries with lightweight record compact-constructor validation, a Gradle multi-module module-per-domain structure, a zero-SDK zero-framework `:domain` module behind provider interface seams with a default `MockProvider`, a manual composition root (no DI framework), a version catalog pinning every version, a CLAUDE.md in every module, and scaffold/conformance scripts. Use whenever starting or scaffolding a Java project; setting up Gradle / settings.gradle.kts / libs.versions.toml
VoldemortGin/AI-Coding-Skill-Bible · ★ 1 · Code & Development · score 72
Install: claude install-skill VoldemortGin/AI-Coding-Skill-Bible
# Java Project Standard This skill is the guiding standard for **any** plain-JVM Java work. Apply it by default; don't wait to be asked. Its spine: **trust is placed not in the model, but in the machine-checkable code that constrains it.** In Java a large part of that scaffold is the compiler — a static, non-erased-at-the-API type system, sealed types with exhaustive `switch`, and records. But `javac` alone is lax (unchecked casts warn but pass; `null` is unchecked; many bug patterns slip through), so the standard turns the knobs to the maximum and adds two tools the compiler lacks: **Error Prone** (bug-pattern checks, promoted to errors — the clippy/detekt analog) and **NullAway** (compile-time null-safety over JSpecify `@Nullable` — the Kotlin null-safety / Swift optional analog). The job here is to (a) keep the escape hatches shut and turn on `-Werror` + `-Xlint:all` + Error Prone + NullAway, (b) push every external dependency behind an interface so the model is hot-swappable, (c) organize deep with module-per-domain and name-navigable structure, and (d) mechanize the implicit knowledge a human would otherwise hold — via a zero-warning gate with a coverage floor, a per-module contract, and the format + lint gates. The agent's output ceiling equals the tightness of that loop. Baseline: **Java 21+** (LTS; targeted via `options.release = 21`, so the build is independent of the host JDK version — any JDK 21..25+ on `JAVA_HOME`), Gradle **9.x** (Kotlin DSL) multi-module + a