java-coding-guideline

Enforces Java coding standards for imports, naming, exceptions, resource handling, and concurrency.

2|1|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/gabia/agent-skills --skill java-coding-guideline-gabia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-coding-guideline
Source: https://github.com/gabia/agent-skills/tree/main/skills/java-coding-guideline
Command: npx skills add https://github.com/gabia/agent-skills --skill java-coding-guideline-gabia

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses inconsistencies and potential errors in Java code by enforcing a comprehensive set of coding standards, ensuring maintainability, readability, and robustness.

Core Features & Use Cases

  • Standardization: Enforces consistent formatting, naming conventions, and best practices across all Java projects.
  • Readability: Promotes clear and concise code through rules on vertical spacing, import statements, and comment usage.
  • Robustness: Guides developers on proper exception handling, resource management (try-with-resources), and nullability annotations.
  • Modern Practices: Encourages the use of modern Java features like java.time and composition over inheritance.
  • Use Case: When starting a new Java project or reviewing existing code, load this skill to ensure adherence to established best practices, reducing bugs and improving team collaboration.

Quick Start

Apply the java-coding-guideline skill to review the provided Java code for adherence to best practices.

Frequently Asked Questions about java-coding-guideline

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

FAQPage Schema
What are the best practices for handling exceptions and nullability in Java?

Java coding standards address common pitfalls by enforcing conventions for imports, naming, and concurrency. They promote robust code through composition over inheritance and the java.time API.

How do I enforce Java coding standards for imports and immutability?

To review Java code for best practices, load the coding guidelines and apply them to your codebase. This checks adherence to naming conventions, exception handling, and modern Java features like java.time.

Can I use modern Java features like java.time while following these coding guidelines?

No external dependencies are required to apply these Java coding standards. The guidelines operate as standalone rules covering concurrency, exceptions, and resource handling without needing external libraries.

Why should I use composition over inheritance in Java code review?

These Java coding guidelines address common development pitfalls by enforcing proper resource management with try-with-resources, guiding exception handling, and standardizing vertical spacing and comments.