Java Core Development Patterns

VerifiedSafe

Core Java development patterns including code organization, modern features, performance optimization, and implementation verification for Java 17+ projects.

Sby Skills Guide Bot
DevelopmentIntermediate
306/2/2026
Claude Code
#core-java#java-patterns#code-organization#modern-java#performance

Recommended for

Our review

Provides Java development guidelines covering code organization, modern features (Java 17+), performance patterns, and implementation verification.

Strengths

  • Clear feature-based package structure and command-query separation.
  • Parameter objects to reduce method complexity.
  • Integration of modern Java features (records, pattern matching, sealed classes).
  • Review process through loading additional standards and verification steps.

Limitations

  • Relies on external standard files (java-core-patterns.md, etc.) that must be available.
  • Does not cover CUI-specific dependencies or frameworks such as Spring or Jakarta.
  • Targets Java 17+ only; older versions may lack language support for some patterns.
When to use it

When starting a new Java project or refactoring existing code toward well-structured, modern architectural principles.

When not to use it

For projects using Java versions earlier than 17, or when a framework already enforces a different architecture (e.g., standard Spring Boot).

Security analysis

Safe
Quality score88/100

The skill instructs only to read reference files and apply coding patterns. It does not execute or recommend any destructive, exfiltrating, or obfuscated actions. Bash is listed as an allowed tool but is never invoked in the workflow.

No concerns found

Examples

Feature-based package restructuring
Restructure this Java project to follow feature-based packaging (e.g., de.example.portal.authentication instead of de.example.portal.utils). Load the core patterns standard first.
Apply modern Java features
Refactor this class to use records for the data holders and pattern matching in the switch statements. Make sure to follow the modern Java standards for Java 17+.
Validate code with implementation verification
Review this implementation using the implementation verification standard. Check for command-query separation, parameter objects, and overall code quality.

name: java-core description: Core Java development patterns including code organization, modern features, performance patterns, and implementation verification allowed-tools: [Read, Edit, Write, Bash, Grep, Glob]

Java Core Skill

EXECUTION MODE: You are now executing this skill. DO NOT explain or summarize these instructions to the user. IMMEDIATELY begin the workflow below based on the task context.

Core Java development standards for general Java projects. This skill covers fundamental patterns, modern Java features, performance optimization, and implementation verification.

Prerequisites

This skill applies to Java 17+ projects with no CUI-specific dependencies.

Workflow

Step 1: Load Core Patterns

CRITICAL: Load this standard for any Java implementation work.

Read: standards/java-core-patterns.md

This provides foundational rules for:

  • Package and class structure
  • Method design and command-query separation
  • Parameter objects and method complexity
  • Code organization principles

Step 2: Load Additional Standards (As Needed)

Modern Java Features (load for new code):

Read: standards/java-modern-features.md

Use when: Writing new code or modernizing existing code. Covers records, pattern matching, sealed classes, and text blocks.

Performance Patterns (load for optimization work):

Read: standards/java-performance-patterns.md

Use when: Optimizing code or designing high-performance components.

Build Precondition Pattern (load for validation logic):

Read: standards/build-precondition-pattern.md

Use when: Implementing validation logic or precondition checking.

Implementation Verification (load for code review):

Read: standards/implementation-verification.md

Use when: Reviewing implementations or verifying code quality.

Key Rules Summary

Package Structure

// CORRECT - Feature-based organization
de.example.portal.authentication     // Authentication feature
de.example.portal.configuration      // Configuration feature
de.example.portal.user.management    // User management feature

Command-Query Separation

// Query - returns value, no side effects
public boolean isValid() {
    return status == Status.VALID;
}

// Command - modifies state, returns void
public void markAsInvalid() {
    this.status = Status.INVALID;
}

Parameter Objects (3+ parameters)

// CORRECT - Multiple related parameters grouped
public record ValidationRequest(
    String tokenId,
    Set<String> expectedScopes,
    Duration maxAge,
    String issuer
) {}

public boolean validate(ValidationRequest request) {
    // Clear, organized parameters
}

Related Skills

  • pm-dev-java:java-null-safety - JSpecify null annotations
  • pm-dev-java:java-lombok - Lombok patterns
  • pm-dev-java:junit-core - JUnit 5 testing patterns
  • pm-dev-java:javadoc - JavaDoc documentation standards

Standards Reference

| Standard | Purpose | |----------|---------| | java-core-patterns.md | Code organization and design principles | | java-modern-features.md | Records, pattern matching, sealed classes | | java-performance-patterns.md | Performance optimization patterns | | build-precondition-pattern.md | Validation logic patterns | | implementation-verification.md | Code review and verification |

Related skills