claudegoodies
Skill

java-coding-standards

From affaan-m

Java coding standards for Spring Boot and Quarkus services: naming, immutability, Optional usage, streams, exceptions, generics, CDI, reactive patterns, and project layout. Automatically applies framework-specific conventions.

Applies Java naming, immutability, DI, exception, and reactive coding conventions for Spring Boot or Quarkus, detected via build file.

Use it when

  • Writing or reviewing Java code in a Spring Boot or Quarkus service
  • Checking naming conventions for controllers, resources, or DTOs
  • Reviewing Optional, streams, generics, or exception handling patterns
  • Working with Quarkus CDI scopes, Panache entities, or Uni/Multi reactive pipelines

Skip it if

  • Project isn't Spring Boot or Quarkus (no framework detection fallback beyond shared conventions)
  • Targets Java below 17 (relies on records, sealed classes, pattern matching)
  • You need enforcement/linting rather than reference examples in a skill file

Facts

Repository
affaan-m/ECC
Status
Actively maintained
Last commit

Source preview

The instructions Claude Code reads when this skill runs.

# Java Coding Standards

Standards for readable, maintainable Java (17+) code in Spring Boot and Quarkus services.

## When to Use

- Writing or reviewing Java code in Spring Boot or Quarkus projects
- Enforcing naming, immutability, or exception handling conventions
- Working with records, sealed classes, or pattern matching (Java 17+)
- Reviewing use of Optional, streams, or generics
- Structuring packages and project layout
- **[QUARKUS]**: Working with CDI scopes, Panache entities, or reactive pipelines

## How It Works

### Framework Detection

Before applying standards, determine the framework from the build file:

- Build file contains `quarkus` → apply **[QUARKUS]** conventions
- Build file contains `spring-boot` → apply **[SPRING]** conventions
- Neither detected → apply shared conventions only

## Core Principles

- Prefer clarity over cleverness
- Immutable by default; minimize shared mutable state
- Fail fast with meaningful exceptions
- Consistent naming and package structure
- **[QUARKUS]**: Favor build-time over runtime processing; avoid runtime reflection where possible

## Examples

The sections below show concrete Spring Boot, Quarkus, and shared Java examples
for naming, immutability, dependency injection, reactive code, exceptions,
project layout, logging, configuration, and tests.

## Naming

```java
// PASS: Classes/Records: PascalCase
public class MarketS
View full source on GitHub →

Other skills