java-conventions

Enforce Log4j2, constructor injection, and JUnit5/AssertJ in Java modules.

30|5|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/bjcoombs/ai-native-toolkit --skill java-conventions-bjcoombs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-conventions
Source: https://github.com/bjcoombs/ai-native-toolkit/tree/main/skills/assess/tests/fixtures/lean_with_skills/.claude/skills/java-conventions
Command: npx skills add https://github.com/bjcoombs/ai-native-toolkit --skill java-conventions-bjcoombs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the inconsistency in Java codebase architecture and testing patterns by providing a standardized set of rules for logging, dependency injection, and testing.

Core Features & Use Cases

  • Standardized Logging: Enforces the use of Log4j2 for consistent application logging.
  • Dependency Management: Mandates constructor injection to improve code testability and dependency visibility.
  • Testing Protocol: Ensures all modules use JUnit5 and AssertJ, requiring a successful build verification before code submission.

Quick Start

Apply the java-conventions skill to review the current project structure and ensure all classes follow the defined logging and injection standards.

Frequently Asked Questions about java-conventions

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

FAQPage Schema
How do I enforce Java best practices for logging and dependency injection?

Yes, JUnit5 is mandated for Java testing protocols alongside AssertJ. Enforcing these frameworks standardizes test suites and requires a successful Maven build verification before code submission to maintain codebase consistency.

What's the best way to standardize Java codebase architecture across multiple modules?

The best way to standardize a Java codebase is to apply rules enforcing specific frameworks like Log4j2 and JUnit5. Mandating constructor injection also improves dependency visibility and testability across all maintained modules.

Does Maven build verification work with JUnit5 and AssertJ testing protocols?

Maven build verification works directly with JUnit5 and AssertJ protocols by requiring a successful build before code submission. This integration ensures all Java modules adhere to defined testing standards and maintain consistency.

Why should I use constructor injection over other dependency injection patterns in Java?

Constructor injection should be used to improve code testability and dependency visibility in Java. Enforcing this specific dependency injection pattern addresses inconsistencies in codebase architecture and ensures standardized development practices.

How do I review a Java project for Log4j2 logging and dependency injection compliance?

To review a Java project for compliance, apply standardized conventions to check the project structure. Ensure all classes follow defined logging standards using Log4j2 and implement constructor injection for dependency management.