java-coding-standards

Enforce Java coding standards in Spring Boot services.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Michae2xl/claude-skills-michael --skill java-coding-standards-michae2xl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-coding-standards
Source: https://github.com/Michae2xl/claude-skills-michael/tree/main/skills/java-coding-standards
Command: npx skills add https://github.com/Michae2xl/claude-skills-michael --skill java-coding-standards-michae2xl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures that Java code in Spring Boot services adheres to established coding standards, enhancing readability, maintainability, and consistency.

Core Features & Use Cases

  • Naming Conventions: Enforces PascalCase for classes and records, camelCase for methods and fields, and UPPER_SNAKE_CASE for constants.
  • Immutability: Promotes the use of records and final fields to minimize shared mutable state.
  • Optional Usage: Encourages the use of Optional for find* methods and map/flatMap for handling nulls.
  • Streams Best Practices: Recommends using streams for transformations and avoiding complex nested streams.
  • Exception Handling: Provides guidance on using unchecked exceptions for domain errors and creating domain-specific exceptions.
  • Generics and Type Safety: Advocates for avoiding raw types and using bounded generics.
  • Project Structure: Defines a recommended project layout for Maven/Gradle-based Spring Boot services.
  • Formatting and Style: Offers guidelines on coding style, including spacing, file structure, and code organization.
  • Code Smells: Identifies and advises on avoiding common code smells like long parameter lists and deep nesting.
  • Logging: Suggests best practices for logging with context.
  • Null Handling: Recommends using Bean Validation for inputs and accepting @Nullable only when necessary.
  • Testing Expectations: Outlines testing expectations with JUnit 5, AssertJ, and Mockito.

Quick Start

Use the java-coding-standards skill to review your Spring Boot service code and ensure it adheres to Java coding standards.

Frequently Asked Questions about java-coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Java coding standards in a Spring Boot service?

To enforce Java coding standards in a Spring Boot service, you review codebases for naming conventions, immutability, Optional usage, streams, exceptions, and project layout. This ensures readability, maintainability, and consistency across Java 17+ services.

What are the best practices for Optional and null handling in Java?

Best practices for Optional and null handling in Java encourage using Optional for find* methods with map/flatMap, applying Bean Validation for inputs, and accepting @Nullable only when strictly necessary to minimize shared mutable state.

Does this Java coding standard review require a specific Java version?

Yes, this Java coding standard review requires a Java 17+ codebase. It also necessitates existing knowledge of Spring Boot frameworks to properly evaluate domain-specific exceptions and project layout.

How should exceptions be handled in Spring Boot services?

Exception handling in Spring Boot services should use unchecked exceptions for domain errors and create domain-specific exceptions. This approach prevents deep nesting and manages code smells effectively within your project structure.

What testing expectations are outlined for Java code reviews?

Testing expectations for Java code reviews outline using JUnit 5, AssertJ, and Mockito. These frameworks verify that your Spring Boot services adhere to established coding standards and maintain robust functionality.