
Java Best Practices
This is a comprehensive reference guide for writing maintainable Java code, covering SOLID principles, Clean Code practices, and modern Java features like Optional, streams, and lambdas. Use it during code reviews or when refactoring legacy code that's gotten messy. The examples are practical, showing both bad and good implementations side by side for things like Single Responsibility and Open/Closed principles. It also covers Spring Framework patterns, JUnit 5 testing, Mockito mocking, and common anti-patterns to avoid. The skill assumes you know Java 8+ and OOP basics. It's designed to be referenced by code review agents but works just as well as a checklist when you're questioning whether your class is doing too much or if there's a cleaner way to handle that growing if-else chain.
- skills.sh installs
- 189
- GitHub stars
- 1
- last updated
- Aug 21, 2026
Install
$ npx -y skills add clostaunau/holiday-card --skill java-best-practices --agent claude-codeInstalls into .claude/skills of the current project.
Files
Java Best Practices
Purpose
This skill provides comprehensive best practices for Java development, serving as a reference guide during code reviews and architectural decisions. It covers SOLID principles, DRY, Clean Code, Java-specific patterns, testing strategies, and common anti-patterns.
When to use this skill:
- Conducting code reviews of Java projects
- Writing new Java code
- Refactoring existing Java code
- Evaluating architecture and design decisions
- Teaching Java best practices to team members
- Working with Spring Framework applications
Context
High-quality Java code is essential for building maintainable, scalable, and robust applications. This skill documents industry-standard practices that emphasize:
- SOLID Principles: Foundation for well-designed object-oriented code
- Clean Code: Readable, maintainable, and self-documenting code
- Java-Specific Features: Proper use of modern Java features (8+)
- Testability: Code that's easy to test and verify
- Performance: Efficient use of Java language and JVM features
- Spring Framework: Best practices for Spring-based applications
Sponsors
Details
- Repository
- github.com/clostaunau/holiday-card
- Categories
- Testing & QA, Code Review & Quality, AI & Agent Building, Debugging, Java & JVM
- First seen
- Jun 3, 2026