Skip to content
Development
Skill

/lombok

Always load this skill when a Maven/Gradle project uses Lombok (lombok on the classpath or in the pom), when lombok annotations appear in source code, or when compilation fails with "cannot find symbol" errors for lombok-generated methods (builder(), getters, setters,

From plugin
tdder
1415 skills7 agents2 commands1 hook

Claude Code

$ npx -y skills add t1/tdder --skill lombok --agent claude-code

SKILL.md

lombok.SKILL.md
name: lombok
description: >
  Always load this skill when you encounter any of these signals:
  • A build failure with "cannot find symbol" for Lombok-generated members (getX, setX, builder,
    toString, equals, hashCode, withX)
  • Source files annotated with @Data, @Getter, @Setter, @Slf4j, @Builder, @Value, @With,
    @NoArgsConstructor, @AllArgsConstructor, @RequiredArgsConstructor
  • A Maven or Gradle project that declares lombok as a dependency but fails to compile
    Lombok-produced symbols
  Covers the JDK 21+ annotation-processor gotcha that silently disables Lombok.
version: 0.1.0

Lombok

Lombok conventions and gotchas for Java projects. Language- and build-tool-specific conventions are covered by the `java` and `maven` skills.

Trigger: Lombok Not Running (JDK 21+)

Since JDK 21, javac no longer discovers annotation processors from the plain classpath — they must be declared explicitly. **Symptoms:**

  • Compilation fails with `cannot find symbol` for methods that Lombok should generate:

`builder()`, `build()`, getters/setters (`getX()`/`setX()`), constructors (`@NoArgsConstructor`, `@AllArgsConstructor`, `@RequiredArgsConstructor`), `toString()`, `equals()`, `hashCode()`, `withX()` (`@With`), etc.

  • The error location is a class annotated with `@Data`, `@Builder`, `@Value`, `@Getter`, ...
  • Tests fail to compile calling `SomeLombokClass.builder()...` while the class itself compiled fine.

**Fix for Maven** — declare the processor explicitly in the compiler plugin (root pom, so all modules inherit it). Use a `${lombok.version}` property alongside an explicit property declaration; pin the actual value next to it:

<properties>
    <lombok.version>1.18.48</lombok.version>
</properties>
...
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>${lombok.version}</version>
    <scope>provided</scope>
</dependency>
...
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <proc>full</proc>
        <annotationProcessorPaths>
            <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
            </path>
        </annotationProcessorPaths>
    </configuration>
</plugin>

Check the latest version with the version-lookup tool before pinning; never guess versions. The lombok dependency itself stays `provided` scope — the `annotationProcessorPaths` entry is what makes javac actually run it.

**Fix for Gradle:**

dependencies {
    compileOnly 'org.projectlombok:lombok:1.18.48'
    annotationProcessor 'org.projectlombok:lombok:1.18.48'
}

Stale Build Output After Fixing the Processor

Maven's incremental compilation can keep stale `target/classes` files compiled *without* Lombok (missing `builder()` etc.), so the build keeps failing even after the pom is fixed. If the fix "doesn't work", delete the affected modules' `target/` directories once and rebuild. Do not assume the pom change is wrong — stale classes are the classic follow-up gotcha.

IDE Support

  • **IntelliJ:** enable *Settings → Build → Compiler → Annotation Processors → Enable annotation

processing*, and install the Lombok plugin. Without it the IDE shows the same "cannot find symbol" errors even when Maven works.

  • **Eclipse:** install the Lombok agent (lombok.jar) into the IDE.
  • If the IDE and Maven disagree about lombok-generated symbols, suspect the IDE annotation

processing setting first.

Conventions

  • Prefer `@Data` (or `@Value` for immutables) over hand-written boilerplate; add `@Builder` when

construction needs many optional fields.

  • Keep the lombok dependency in `provided` scope — it must not end up in the packaged artifact.
  • When adding other annotation processors (MapStruct, etc.), list them all in

`annotationProcessorPaths`; the entry replaces classpath discovery, it does not merge with it. MapStruct users also need `lombok-mapstruct-binding`.

Read more
@t1
Ships withtdder

A plugin for pi, Claude Code, and OpenCode that guides AI agents through disciplined Test-Driven Development and Clean Code practices. Note that currently this is WORK IN PROGRESS! I'm not even trying to keep it stable or tested.

1415 skills7 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
14
Star history of t1/tdder on GitHub, a chart by star-history.com

Other skills on tdder.

app
Skill

app

This skill should be used when the user asks to "calculate code mass", "measure code complexity with APP", "compare…

@t1@t1Install Skill
clean-code
Skill

clean-code

This skill should be used when the user asks to "refactor code", "review code quality", "apply clean code principles", "check for…

@t1@t1Install Skill
github-safety
Skill

github-safety

This skill should be used when working on any project hosted on GitHub. It provides prompt-injection defense rules for GitHub…

@t1@t1Install Skill
grill-po
Skill

grill-po

Requirements grilling session with a Product Owner (or anyone in that role). Challenges plans against the existing domain model,…

@t1@t1Install Skill
java
Skill

java

Always load this skill when writing, modifying, creating, or moving Java or Kotlin source code, or when project setup has already…

@t1@t1Install Skill

More skills from other plugins.

brainstorming
Skill
Popular
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
accessibility
Skill
Popular
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2d293k
@affaan-m@affaan-mInstall Skill
compiler-commit
Skill
Popular

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about lombok.

Which coding agents can use lombok?
lombok installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.