lang-java

Standardize Java code with Google Java Style and Java 17+ idioms.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-java
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/lang-java
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-java

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you keep Java code consistent, modern, and easy to maintain by encoding the style and tooling rules a team should follow every time code is written or reviewed.

Core Features & Use Cases

  • Style Enforcement: Applies Google Java Style guidance so formatting and idioms stay uniform across the codebase.
  • Modern Java Practices: Encourages Java 17+ features such as records, sealed classes, switch expressions, streams, and try-with-resources.
  • Quality Tooling: Aligns work with formatter, linting, static analysis, and testing expectations like google-java-format, Checkstyle, SpotBugs, JUnit 5, and Mockito.
  • Use Case: Use this Skill when reviewing a service, CLI, or library implementation to ensure the code follows the same standards as the rest of the project and avoids unsafe null handling.

Quick Start

Apply the Java skill to review or draft this code so it follows the repository’s Java standards and modern tooling expectations.

Frequently Asked Questions about lang-java

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

FAQPage Schema
How do I enforce Google Java Style formatting and modern Java idioms in my codebase?

Google Java Style enforcement standardizes formatting and modern Java idioms across your codebase. It ensures uniform style, encourages Java 17+ features like records and switch expressions, and aligns with tooling expectations like Checkstyle and SpotBugs.

What is the best way to review Java code for unsafe null handling and compliance?

Reviewing Java code for compliance involves checking against Google Java Style and modern conventions. This process ensures code avoids unsafe null handling by enforcing Optional usage, try-with-resources, and Java 21 virtual-thread guidance during refactoring.

Does this Java code review approach work with JUnit 5 and Mockito testing expectations?

Yes, this Java code review approach works with JUnit 5 and Mockito testing expectations. It aligns your code with quality tooling standards, ensuring your application, CLI, or library implementation follows project testing and static analysis rules.

How do I apply Java 17+ features like sealed classes and virtual threads correctly?

Applying Java 17+ features correctly involves using records, sealed classes, switch expressions, and streams properly. This guidance enforces modern language conventions, including try-with-resources and Java 21 virtual-thread usage for backend application development.

Can I use static analysis tooling like Checkstyle and SpotBugs with this Java formatting standard?

Yes, you can use static analysis tooling like Checkstyle and SpotBugs with this Java formatting standard. It aligns your work with formatter, linting, and static analysis expectations, ensuring your code follows repository standards and avoids unsafe null handling.