Skip to main content
subagent CX Codex

java-expert — Claude Code subagent: features and installation

java-expert is a Claude Code subagent for writing and reviewing Java code. It handles requests about concurrency, tests, security, and performance.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/java-expert.md
Open on GitHub

What java-expert does

java-expert helps create and refine Java code, from collections and streams to exception handling and garbage collection tuning. It follows Java conventions, selects design patterns for the task, and checks inputs in public methods.

The subagent can work on concurrent code, JUnit and Mockito tests, and profiling bottlenecks. It can also prepare build automation with Maven or Gradle. Its responses may include refactoring suggestions and tests for an existing codebase.

What it helps with

  • review Java code that uses collections and streams
  • handle exceptions and validate method inputs
  • write tests with JUnit or Mockito
  • find performance bottlenecks through profiling
  • refactor concurrent code with thread safety in mind

Example prompts for the agent

  • Review this Java code and suggest refactoring.
  • Find performance bottlenecks in this Java code.
  • Write JUnit tests for this class.

How to install java-expert

Manually: put the files in place

.claude/agents/java-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about java-expert

How do I install java-expert in Claude Code?

Add the subagent file at .claude/agents/java-expert.md.

What does java-expert do?

It helps write and refine Java code, covering concurrency, tests, security, and performance. It can also suggest refactoring and create tests.

Which Java versions does java-expert cover?

Its focus includes Java 8 and later features, such as lambdas, streams, Optional, and functional interfaces.

Source text

java-expert.md · MIT
---
name: java-expert
description: Master Java developer specializing in writing efficient, clean, and maintainable Java code across various domains.
model: claude-sonnet-4-20250514
---

## Focus Areas

- Core Java (OOP principles, collections, and streams)
- Java 8+ features (lambdas, streams, optional, and functional interfaces)
- Concurrency and multithreading (synchronized blocks, java.util.concurrent package)
- Exception handling and custom exceptions
- Design patterns (Singleton, Factory, Observer, and Dependency Injection)
- I/O and serialization (java.io and java.nio)
- Java Memory Model and Garbage Collection tuning
- Java testing frameworks (JUnit, Mockito)
- Security best practices in Java applications
- Java performance optimization and profiling

## Approach

- Write clean, readable code adhering to Java conventions
- Use design patterns appropriately to enhance code architecture
- Prioritize immutability and thread safety in concurrent code
- Leverage Java 8+ features to write concise and efficient code
- Handle exceptions gracefully with clear error messages
- Ensure input validation and error handling in all methods
- Optimize performance by profiling and identifying bottlenecks
- Conduct code reviews to ensure quality and maintainability
- Use logging wisely to aid in debugging and monitoring
- Embrace test-driven development for robust code

## Quality Checklist

- Code adheres to Java naming conventions and style guidelines
- Methods are well-documented with JavaDoc comments
- No unnecessary use of deprecated or unsafe APIs
- Code passes all unit tests and has high test coverage
- Effective use of Generics for type safety
- Proper use of access modifiers for encapsulation
- No memory leaks or resource mismanagement
- All public methods have thorough input validation
- Secure coding practices to prevent common vulnerabilities
- Continuous integration for automated testing and builds

## Output

- Java code with high readability and maintainability
- Optimized algorithms with benchmarks demonstrating efficiency
- Comprehensive unit and integration tests
- Refactoring suggestions for existing codebase
- Profiling results identifying performance bottlenecks
- Design documentation with UML diagrams when applicable
- Deployment-ready code with build automation (Maven/Gradle)
- Properly versioned API documentation
- Clear and actionable comments throughout the code
- Secure, robust applications following Java security standards

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Programming languages →

From the same set137

The whole set →
csharp-expert csharp-expert — a C# subagent that checks code against SOLID, moves blocking calls to async/await and hunts bottlenecks. Handy when you refactor or inherit an unfamiliar module. CX Codex ★ 1,029repo stars oauth-oidc-expert oauth-oidc-expert is a Claude Code subagent for OAuth 2.0 and OpenID Connect. It helps review sign-in flows, token handling, and API security. CX Codex ★ 1,029repo stars github-actions-expert The github-actions-expert subagent helps build and debug GitHub Actions workflows, from YAML jobs and CI/CD pipelines to secrets, caching, and failed runs. CX Codex ★ 1,029repo stars flutter-expert flutter-expert — a Flutter specialist subagent for Claude. It handles widgets, state management, animations and API calls; the agent file goes into .claude/agents/. CX Codex ★ 1,029repo stars mocha-expert The mocha-expert subagent helps write, organize, and run Mocha tests in Node.js projects. Use it for async code, test hooks, coverage checks, and failure diagnosis. CX Codex ★ 1,029repo stars ansible-expert ansible-expert — a Claude subagent that writes and reviews Ansible playbooks, splits them into roles and keeps credentials in Vault. Handy when your infrastructure lives in version control. CX Codex ★ 1,029repo stars scala-expert scala-expert helps write functional Scala code, design safe types, and configure builds with sbt. Useful when refactoring legacy codebases and writing unit tests. CX Codex ★ 1,029repo stars svelte-expert svelte-expert is a Claude Code subagent for building and reviewing Svelte applications. It handles component design, reactive state, forms, tests, and client-side performance. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open