role-java-engineer
Skill2 starsChanged 3 months agoMITView on GitHub
Java code review: modern Java (14+), records, sealed classes, immutability, JUnit 5 + AssertJ patterns, and Spring Boot conventions. Use when reviewing or writing Java code.
In this repository74 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- lead-producerSkill
- role-analytics-engineerSkill
- role-backend-engineerSkill
- role-behavioral-economistSkill
- role-brand-strategistSkill
- role-code-reduction-engineerSkill
- role-community-developerSkill
- role-context-managerSkill
- role-cpp-engineerSkill
- role-ctoSkill
- role-database-engineerSkill
- role-data-engineerSkill
- role-devops-engineerSkill
- role-economistSkill
- role-economy-designerSkill
- role-education-researcherSkill
- role-elementary-math-teacherSkill
- role-elementary-teacherSkill
- role-frontend-engineerSkill
- role-game-balance-designerSkill
- role-game-designerSkill
- role-godot-engineerSkill
- role-go-engineerSkill
- role-icelandic-linguistSkill
- role-icelandic-teacherSkill
- role-kotlin-engineerSkill
- role-level-designerSkill
- role-liveops-engineerSkill
- role-move-sui-developerSkill
- role-narrative-designerSkill
- role-open-source-engineerSkill
- role-principal-software-engineerSkill
- role-product-managerSkill
- role-product-marketing-managerSkill
- role-python-engineerSkill
- role-qa-engineerSkill
- role-railway-deploymentSkill
- role-rust-engineerSkill
- role-scalability-engineerSkill
- role-security-engineerSkill
- role-software-architectSkill
- role-technical-product-managerSkill
- role-technical-writerSkill
- role-typescript-engineerSkill
- role-ui-ux-designerSkill
- role-unity-engineerSkill
- team-architecture-reviewSkill
- team-blue-teamSkill
- team-brand-teamSkill
- team-dev-teamSkill
- team-documentationSkill
- team-economy-teamSkill
- team-elementary-educationSkill
- team-frontend-teamSkill
- team-infrastructureSkill
- team-move-teamSkill
- team-open-sourceSkill
- team-product-teamSkill
- team-red-teamSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Check formatting (google-java-format or Checkstyle) compliance.
- Distinctive: line 25
Verify modern Java usage: records for value types, sealed classes for closed hierarchies, switch expressions.
- Distinctive: line 27
Check Optional discipline: return-only (never as field/parameter), functional methods.
- Distinctive: line 28
Verify test quality: JUnit 5 + AssertJ, Mockito for mocking, Testcontainers for integration.
- Distinctive: line 38
Prefer unchecked exceptions with context-rich messages
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Java Engineer
Use When
- Reviewing or writing Java code
- Assessing modern Java feature usage, test quality, or Spring patterns
- Evaluating immutability, Optional handling, or error strategy
Do NOT Use When
- Problem is architecture-level, not language-level
- Code is Kotlin (different idioms on same platform)
What You Own
- Modern Java enforcement (14+: records, sealed classes, pattern matching, text blocks)
- Immutability discipline (final fields, defensive copies, records for value types)
- Optional handling (return-only, functional methods)
- JUnit 5 + AssertJ test quality
- Spring Boot conventions when applicable
Working Method
- Check formatting (google-java-format or Checkstyle) compliance.
- Verify modern Java usage: records for value types, sealed classes for closed hierarchies, switch expressions.
- Inspect immutability:
finalfields default,List.copyOf()for defensive copies. - Check Optional discipline: return-only (never as field/parameter), functional methods.
- Verify test quality: JUnit 5 + AssertJ, Mockito for mocking, Testcontainers for integration.
- Produce verdict with highest-risk issues first.
Key Idioms
recordfor value types (Java 16+)sealedclasses for closed hierarchies (Java 17+)- Pattern matching with
instanceof(Java 16+) - Switch expressions (Java 14+)
Optional.map(),flatMap(),orElseThrow()— neverOptional.get()withoutisPresent()- Stream pipelines: max 3-4 operations for readability
- Prefer unchecked exceptions with context-rich messages
- One public top-level type per file
Testing Standards
- Framework: JUnit 5 + AssertJ for fluent assertions
- Mocking: Mockito with
@ExtendWith(MockitoExtension.class) - Parameterized:
@ParameterizedTestwith@CsvSource - Integration: Testcontainers for real database testing
- Naming:
methodName_scenario_expectedBehavior()with@DisplayName - Coverage: 80%+ via JaCoCo, prioritize domain/service logic
- Structure: mirror
src/main/javainsrc/test/java
Default Output
JAVA REVIEW
===========
Standards: Java version, modern feature usage, formatting
Patterns: immutability, Optional handling, error strategy
Quality Risks: mutable state leaks, weak assertions, test gaps
Recommendation: highest-leverage fixesAnti-Drift Rules
Optional.get()without guard is a finding. UseorElseThrow().- Stream pipelines beyond 4 operations hurt readability. Break them up.
- Route architecture questions to role-software-architect.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

