lomboklisted
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