effective-java

Generate and review Java code using Effective Java patterns and best practices.

35|10|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/booklib-ai/skills --skill effective-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effective-java
Source: https://github.com/booklib-ai/skills/tree/main/skills/effective-java
Command: npx skills add https://github.com/booklib-ai/skills --skill effective-java

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Developers often struggle to consistently apply the best practices from Effective Java across projects, leading to verbose, brittle, or unsafe code. This Skill provides a structured approach to generate and critique Java code in alignment with Bloch's patterns and guidelines, reducing defects and design drift.

Core Features & Use Cases

  • Generate Java code that adheres to key patterns (static factories, Builder, immutability, and safe interfaces) for new modules.
  • Review existing code to identify and fix common pitfalls (telescoping constructors, raw types, missing equals/hashCode, and unsafe mutability).
  • Use cases include designing APIs, reviewing concurrent components, and ensuring robust exception handling and serialization practices.

Quick Start

Generate a defensive, immutable value object using Builder and verify it with a code review for naming, documentation, and null checks.

Frequently Asked Questions about effective-java

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

FAQPage Schema
How do I generate Java code that follows Effective Java best practices?

This Skill generates Java code by applying patterns from Effective Java, ensuring adherence to static factories, Builder patterns, immutability, and defensive copies for robust API surfaces.

What's the best way to review existing Java code for common design pitfalls?

The best way to review Java code for design pitfalls is checking it against the 90 Effective Java items to catch telescoping constructors, raw types, missing equals/hashCode, and unsafe mutability.

When do I need to use the builder pattern for Java method design?

You need the builder pattern in Java when designing classes with many parameters, preventing telescoping constructors while ensuring validated parameters and defensive copies.

Can this Skill check Java concurrency and exception handling in production projects?

Yes, it can review Java concurrency and exception handling in production projects by validating code designs against Effective Java guidelines for robust component behavior.

How do I create a defensive immutable value object in Java?

To create a defensive immutable value object in Java, apply the Builder pattern, add defensive copies, and validate parameters to ensure safe API surfaces and prevent design drift.