java-coding-standards

Standardize Java code across Spring Boot services with naming, immutability, and structure guidelines.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/MBarry01/dousell-immo --skill java-coding-standards-mbarry01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-coding-standards
Source: https://github.com/MBarry01/dousell-immo/tree/main/.claude/skills/java-coding-standards
Command: npx skills add https://github.com/MBarry01/dousell-immo --skill java-coding-standards-mbarry01

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent Java code across Spring Boot services leads to reduced readability, harder maintenance, and slower onboarding; this Skill provides a shared standard to align naming, immutability, Optional usage, streams, exceptions, generics, and project layout.

Core Features & Use Cases

  • Naming conventions: PascalCase for classes/records, camelCase for methods and fields, UPPER_SNAKE_CASE for constants.
  • Immutability and robust types: prefer records and final fields; promote clear, immutable data structures.
  • Optional usage and streams: guidelines for safe Optional usage and readable stream pipelines.
  • Exceptions and generics: domain-specific exceptions; avoid raw types; clear generic signatures.
  • Project structure & guidelines: recommended package layout and module organization.
  • Use Case: refactor a Spring service to align with the standard and improve readability.

Quick Start

Refactor new and existing Spring Boot modules to follow the defined naming, immutability, and API design rules.

Frequently Asked Questions about java-coding-standards

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

FAQPage Schema
What are the standard Java naming conventions for Spring Boot services?

Standard Java naming conventions for Spring Boot services use PascalCase for classes and records, camelCase for methods and fields, and UPPER_SNAKE_CASE for constants to improve readability and maintenance.

How do I use Optional safely in Java Spring Boot applications?

To use Optional safely in Java Spring Boot applications, follow established guidelines that promote readable stream pipelines and safe Optional handling rather than returning null, preventing runtime exceptions.

What is the recommended project structure for a Spring Boot codebase?

The recommended project structure for a Spring Boot codebase follows a standardized Maven or Gradle package layout and module organization to streamline onboarding and simplify maintenance.

How do I enforce immutability rules when refactoring Java code?

To enforce immutability rules when refactoring Java code, prefer using records and final fields to create clear, immutable data structures that prevent unwanted state modifications across services.

What is the best way to handle exceptions in Spring Boot modules?

The best way to handle exceptions in Spring Boot modules is to use domain-specific exceptions rather than generic ones, ensuring clearer error tracking and robust application behavior.

Do I need to avoid raw types when writing Java generics in Spring applications?

You need to avoid raw types when writing Java generics in Spring applications to ensure clear generic signatures and robust typing, aligning with standard coding practices.