← ClaudeAtlas

lang-java-kotlinlisted

Use when writing or reviewing Java (.java) or Kotlin (.kt) or Spring Boot code — idiomatic Java 21 / Kotlin style, Gradle/Maven, JUnit5, null-safety, and the top JVM/Spring security pitfalls. Triggers on build.gradle(.kts)/pom.xml, Spring, JPA/Hibernate, JdbcTemplate projects.
StielChancellor/VibeGod-Tech-Team · ★ 0 · AI & Automation · score 65
Install: claude install-skill StielChancellor/VibeGod-Tech-Team
# Java / Kotlin — idiomatic & safe The language lens for JVM (Java 21 / Kotlin) and Spring Boot work. Backs the build agents at Stage 6. Honors `_shared/vibegod-principles.md` (simplicity, surgical, null-safety, no silent error-swallowing, consistency, cost-awareness). Defer security depth to `secure-coding` and test discipline to `test-driven-development`. ## Fits in the pipeline Stage 6 (Build): write code to this standard. Stage 7 (per-feature QA): the code-quality-reviewer + security-engineer lenses check it against this skill. Priority: **user > skills > default.** ## Style & layout - Standard `src/main/{java,kotlin}` + `src/test/...`; package by feature. Constructor injection only (no field `@Autowired`); keep beans stateless. Immutable DTOs (Java `record`, Kotlin `data class`). - **Java 21:** records, sealed types, pattern matching, `var` for obvious locals. **Kotlin:** prefer `val`, expression bodies, data/sealed classes, extension functions — keep it idiomatic, not Java-in-Kotlin. ## Toolchain (canonical) - **Build:** Gradle (Kotlin DSL) or Maven, with a lockfile/`dependencyLocking`. - **Test:** JUnit 5 (+ AssertJ, Mockito where needed, Testcontainers for integration). - **Lint/format:** Checkstyle/Spotless (Java), ktlint/detekt (Kotlin); run in CI. ## Null-safety & error handling - **Kotlin:** lean on non-null types; avoid `!!`; use `?.`, `?:`, sealed results. **Java:** return `Optional<T>` instead of nulls at API edges; annotate with `@Nullable`/`@NonNul