← ClaudeAtlas

lomboklisted

Project Lombok conventions for Java/Spring Boot 3.x. Auto-loads when a file uses Lombok annotations (@Data, @Value, @Builder, @SuperBuilder, @Slf4j, @RequiredArgsConstructor, etc.) or matches `**/*.java` in projects with lombok on the build classpath. Covers the safe-annotation matrix, the JPA-entity / Jackson / MapStruct interop traps, builder patterns with inheritance and defaults, and the recommended lombok.config. Invoke whenever Java source uses any `lombok.*` import or carries a Lombok annotation — even a one-line @Slf4j edit triggers this skill per the plugin's 1% rule.
taipt1504/claudehut · ★ 1 · AI & Automation · score 64
Install: claude install-skill taipt1504/claudehut
# Lombok — annotation discipline + interop traps Lombok cuts Java boilerplate but each annotation has trade-offs and a few have hard rules ("never on JPA entities", "needs @Jacksonized for Jackson", "needs @SuperBuilder for inheritance"). This skill encodes the safe matrix. ## Quick start (decision matrix) | Use case | Annotation set | Notes | |----------|---------------|-------| | Spring service / component constructor DI | `@RequiredArgsConstructor` + `final` fields | Idiomatic for Spring Boot 3. No `@Autowired` needed. | | SLF4J logging | `@Slf4j` | One annotation = `private static final Logger log`. Use `log.info(...)` directly. | | Immutable DTO / value object | `@Value` (+ `@Builder` + `@Jacksonized` if JSON) | All fields final, class final, no setters. | | Mutable POJO (non-entity) | `@Data` OR `@Getter @Setter @ToString` | Reserve `@Data` for "I genuinely need all five generated methods". | | **JPA `@Entity`** | `@Getter @Setter @ToString(onlyExplicitlyIncluded=true) @NoArgsConstructor` + manual `equals`/`hashCode` by id or business key | **NEVER** `@Data` or naked `@EqualsAndHashCode`. See `references/jpa-interop.md`. | | Builder for flat class | `@Builder` (+ `@Builder.Default` per defaulted field) | | | Builder across inheritance | `@SuperBuilder` on EVERY level of the chain | `@Builder` does not inherit. See `references/builder-patterns.md`. | | Jackson deserialization via builder | `@Builder` + `@Jacksonized` | Avoids needing a no-args ctor. | | Null-check gen