
Ai Skills Conventions Lombok
- 1 installs
- 1 repo stars
- Updated August 3, 2026
- fabian-barney/ai-skills
Applies Lombok to reduce Java boilerplate (constructors, accessors, builders) while keeping risky annotations, identity semantics, and build config under explicit control.
About
Guides using Lombok to cut low-value Java boilerplate while flagging risky annotations and Spring constructor-injection defaults. A Java developer applies it when editing classes to replace handwritten accessors, builders, or loggers safely.
- Defaults Spring DI to @RequiredArgsConstructor
- References for lombok-defaults, lombok-config, and Spring DI examples
Ai Skills Conventions Lombok by the numbers
- 1 all-time installs (skills.sh)
- Ranked #79 of 89 Java & JVM skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/fabian-barney/ai-skills --skill ai-skills-conventions-lombokAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 1 |
| Last updated | August 3, 2026 |
| Repository | fabian-barney/ai-skills ↗ |
What it does
Applies Lombok to reduce Java boilerplate (constructors, accessors, builders) while keeping risky annotations, identity semantics, and build config under explicit control.
Files
<!-- markdownlint-disable MD025 -->
Purpose
Use Lombok wherever it materially reduces low-value Java boilerplate, while keeping risky annotations, identity semantics, and build configuration under explicit control.
When to Use
- use when the changed Java code can replace trivial constructors, accessors,
loggers, builders, or utility boilerplate with Lombok
- use when Spring-style constructor injection should default to
@RequiredArgsConstructor
- use
references/lombok-defaults.mdfor the preferred annotations and
forbidden shortcuts
- use
references/lombok-config.mdwhenlombok.configor copyable
annotations matter
- use
examples/spring-constructor-di.mdfor the expected class and config
shape
Inputs
- the changed Java classes and their current handwritten boilerplate
- whether Lombok is already available in the build or would need to be added
- framework context such as Spring Boot constructor DI or JPA entities
- active nullness strategy and available annotations
references/lombok-defaults.mdreferences/lombok-config.md
Workflow
1. Determine whether Lombok is available; if not and it materially reduces the current Java boilerplate, consider adding it as a dependency and enabling annotation processing. 2. Replace trivial constructors, getters, setters, loggers, builders, and utility-class boilerplate with the appropriate Lombok annotations. 3. Default Spring-style constructor injection to @RequiredArgsConstructor. 4. Prefer @Builder for complex construction and @UtilityClass for true utility classes. 5. Avoid risky annotations such as @Data, @SneakyThrows, and broad equality-generation shortcuts unless the specific use is justified and safe. 6. Never use @EqualsAndHashCode for JPA entities, and review identity/null semantics carefully before using it anywhere else. 7. Use references/lombok-config.md to keep lombok.config, lombok.copyableAnnotations, and generated-annotation settings explicit. 8. Use examples/spring-constructor-di.md when communicating the expected annotation and config shape.
Outputs
- Lombok-based boilerplate reduction for the bounded Java change
- explicit review findings when handwritten boilerplate or risky Lombok usage
remains
lombok.configguidance when framework annotations or generated markers must
be preserved
Guardrails
- do not keep handwritten constructors, ordinary getters/setters, or logger
fields when Lombok is appropriate and available
- do not use
@Data, experimental features,val,var, or@Cleanupas
the default shortcut
- do not use
@SneakyThrowswithout an explicit safety comment and bounded
rationale
- do not use
@EqualsAndHashCodeon JPA entities - do not choose Lombok nullness annotations when a stronger nullness framework
such as JSpecify is available
Exit Checks
- applicable boilerplate is Lombok-generated instead of hand-written
- risky annotations are absent or explicitly justified
- Spring constructor DI uses
@RequiredArgsConstructorby default when
applicable
lombok.configrequirements are explicit when framework propagation or
generated markers matter
Example Spring Constructor DI With Lombok
@Service
@RequiredArgsConstructor
@Slf4j
public final class InvoiceService {
private final InvoiceRepository invoiceRepository;
private final InvoiceSender invoiceSender;
public void sendPendingInvoices() {
log.info("Sending pending invoices");
invoiceSender.sendAll(invoiceRepository.findPending());
}
}lombok.addLombokGeneratedAnnotation = true
lombok.copyableAnnotations += org.springframework.beans.factory.annotation.QualifierLombok Config Notes
Distilled from the project's Lombok guidance and the issue contract.
- Keep
lombok.configcommitted and explicit. - Include
lombok.addLombokGeneratedAnnotation = true. - Configure
lombok.copyableAnnotationswhen framework-required constructor
annotations need to propagate to Lombok-generated constructors.
- Ensure annotation processing is enabled consistently in build and IDE.
- If JSpecify or another stronger nullness framework is present, use that
strategy instead of Lombok nullness annotations.
Lombok Defaults
Distilled from the project's Lombok guidance and the ai-skills-conventions-lombok issue contract.
- Use Lombok for constructors, ordinary getters/setters, loggers, builders,
and utility classes when it removes low-value boilerplate.
- Prefer
@RequiredArgsConstructorfor Spring-style constructor injection. - Prefer
@Builderover custom builder boilerplate when builder semantics are
appropriate.
- Prefer
@UtilityClassfor true utility classes. - Avoid
@Data,@SneakyThrows,@EqualsAndHashCode,val,var,
@Cleanup, and experimental features by default.
@SneakyThrowsrequires an explicit safety comment and should stay limited to
impossible exceptions or awkward interfaces.
- Never use
@EqualsAndHashCodeon JPA entities.