java-generic

Configures Java 21 projects with standardized build, logging, and testing practices.

Updated May 28, 2026
One-click install
npx skills add https://github.com/susamn/skills --skill java-generic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-generic
Source: https://github.com/susamn/skills/tree/main/java-generic
Command: npx skills add https://github.com/susamn/skills --skill java-generic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Java development projects frequently suffer from inconsistent coding standards, unhandled edge cases, outdated dependencies, and poor logging practices, leading to technical debt, hard-to-maintain codebases, and avoidable production bugs.

Core Features & Use Cases

  • Modern Java Best Practices: Enforces use of Java 21 LTS features like records, sealed classes, pattern matching, and virtual threads to reduce boilerplate and improve performance.
  • Production-Grade Guardrails: Includes strict rules for SLF4J logging with Logback/Log4j2, domain-specific error handling, null safety, and dependency management to minimize production bugs.
  • Use Case: When building a new Spring Boot REST API, this skill guides you to use the Maven wrapper, structure packages in layered architecture, write descriptively named JUnit 5 tests with Mockito, and use Testcontainers for integration tests with real databases.

Quick Start

Use the java-generic skill to review your existing Java project's code, build configuration, and test suite, and apply all recommended modern Java best practices to improve code quality and align with production-grade standards.

Frequently Asked Questions about java-generic

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

FAQPage Schema
How do I enforce Java best practices for consistent code quality in a Spring Boot project?

To enforce Java best practices in a Spring Boot project, apply standardized Maven structures, SLF4J logging, and automated formatting via Spotless. This eliminates inconsistent coding standards and reduces technical debt by enforcing modern Java 21 LTS features.

What are the best practices for Java dependency management and logging to prevent production bugs?

Best practices for Java dependency and logging management involve using SLF4J with concrete backends like Logback or Log4j2 alongside strict dependency versioning. This minimizes production bugs by ensuring domain-specific error handling and null safety across the application.

How do I set up unit and integration testing for Java applications using JUnit and Mockito?

Set up Java unit and integration testing by writing descriptively named JUnit 5 tests with Mockito for mocking. For integration tests with real databases, use Testcontainers to verify behavior, satisfying production-grade testing guardrails and catching unhandled edge cases.

Does this Java development skill support Gradle project structure and Java 21 LTS features?

Yes, this Java development skill supports standardized Gradle or Maven project structures and enforces Java 21 LTS features. It guides adoption of records, sealed classes, pattern matching, and virtual threads to reduce boilerplate and improve application performance.

When should I use domain-specific exception hierarchies in Java development?

Use domain-specific exception hierarchies in Java development to handle unhandled edge cases and establish production-grade guardrails. This standardized error handling approach minimizes avoidable production bugs by ensuring errors are caught and managed consistently across the codebase.