oldzoomer/oldzoomer-java-assistant icon
public
Published on 6/5/2025
oldzoomer's Java Assistant

Specialized in Java development, with Spring Framework support

Rules
Prompts
Context

No Models configured

- Methods should do one thing — follow the Single Responsibility Principle (SRP).
- Favor meaningful method and variable names that clearly express intent.
- Limit method parameters to 3 or fewer — use objects or builders for complex inputs.
- Write small, focused classes that adhere to the "one class, one responsibility" principle.
- Use Streams and Optional for cleaner, more declarative code when working with collections and nullable values.
- Prefer constructor injection over field injection for better testability and immutability.
- Use proper logging (e.g., SLF4J) instead of System.out.println().
- Wrap controller responses in ResponseEntity for more control over HTTP status codes.
- Catch specific exceptions instead of using generic 'Exception' in try-catch blocks.
- Use Lombok annotations like @Data, @Value, and @Builder to reduce boilerplate code.
- Keep controllers lean — delegate business logic to service classes.
- Follow standard Spring Boot project structure: separate packages for controllers, services, repositories, and models.
- Write unit tests for services and integration tests for controllers, using @WebMvcTest or @SpringBootTest.
- Apply @Transactional on service methods dealing with database changes to ensure consistency.
Spring Framework (Core) Docshttps://docs.spring.io/spring-framework/reference/
Spring Boot Docshttps://docs.spring.io/spring-boot/
Spring Data JPA Docshttps://docs.spring.io/spring-data/jpa/reference/
Spring Security Docshttps://docs.spring.io/spring-security/reference/
Java docshttps://docs.oracle.com/en/java/javase/21/docs/api/
Hibernate docshttps://docs.jboss.org/hibernate/orm/6.6/userguide/html_single/
JUnit5 docshttps://junit.org/junit5/docs/current/user-guide/
Mapstruct docshttps://mapstruct.org/documentation/stable/reference/html/
Mapstruct Spring Extensions docshttps://mapstruct.org/documentation/spring-extensions/reference/html/

Prompts

Learn more
Analyze the code and error. Suggest and implement a fix using best practices.
Analyze the code and error. Suggest and implement a fix using best practices.
Analyze the code and error. Suggest and implement a fix using best practices.
Write tests
Write tests using other test files as example
Write tests following these guidelines:
- Add type hints for all fixture arguments.
- Use other similar test files as example to keep repository style consistent.
Small Improvement
Make a small incremental improvement
What's one most meaningful thing I could do to improve the quality of this code? It shouldn't be too drastic but should still improve the code.

Context

Learn more
@code
Reference specific functions or classes from throughout your project
@docs
Reference the contents from any documentation site
@terminal
Reference the last command you ran in your IDE's terminal and its output
@problems
Get Problems from the current file
@folder
Uses the same retrieval mechanism as @Codebase, but only on a single folder
@codebase
Reference the most relevant snippets from your codebase
@open
Reference the contents of all of your open files
@url
Reference the markdown converted contents of a given URL
@currentFile
Reference the currently open file
@repo-map
Reference the outline of your codebase

No Data configured

MCP Servers

Learn more

No MCP Servers configured