Développement Java Core

VérifiéSûr

Fournit des standards pour le développement Java fondamental : organisation du code, fonctionnalités modernes (enregistrements, filtrage par motif), optimisation des performances et vérification des implémentations. Utile pour les projets Java 17+ afin de maintenir une structure de code cohérente et d'appliquer des patterns éprouvés.

Spar Skills Guide Bot
DeveloppementIntermédiaire
11002/06/2026
Claude CodeCursorWindsurf
#java#core-java#java-17#code-organization#modern-java

Recommandé pour

Notre avis

Ce skill définit les standards de développement Java 17+ en couvrant l'organisation du code, les fonctionnalités modernes, les performances et la vérification d'implémentation.

Points forts

  • Encourage une structure de paquets cohérente et une séparation commande-requête
  • Intègre des fonctionnalités modernes comme les records et le pattern matching
  • Inclut des patterns de performance et de vérification
  • Guide l'utilisation d'objets paramètres pour les méthodes complexes

Limites

  • Nécessite Java 17 ou supérieur
  • Dépend de fichiers de standards externes à charger
  • Ne couvre pas les frameworks spécifiques (Spring, Jakarta)
Quand l'utiliser

Utilisez ce skill pour écrire ou moderniser du code Java générique avec une architecture propre et performante.

Quand l'éviter

Évitez ce skill si le projet utilise une version de Java antérieure à 17 ou si vous avez besoin de patterns spécifiques à un framework.

Analyse de sécurité

Sûr
Score qualité90/100

The skill contains no destructive or exfiltration commands; it only instructs reading internal standards files and applying Java development patterns. Bash access is allowed for typical development tasks, but the skill itself does not specify any dangerous actions.

Aucun point d'attention détecté

Exemples

Organize package structure
I have a Java project with flat package structure. Apply feature-based package organization (like de.example.portal.authentication) and refactor the existing classes accordingly.
Introduce record parameter objects
Refactor this method signature that takes 4+ parameters to use a Java record parameter object following the standard in java-core-patterns.md.
Apply command-query separation
Review this class and apply command-query separation: methods that mutate state should return void, queries should return values and have no side effects.

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 |

Skills similaires