clostaunau avatar

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-code

Installs 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
1charleswiltgen avataraxiom-swiftdata-migrationcharleswiltgen/axiomUse when creating SwiftData custom schema migrations with VersionedSchema and SchemaMigrationPlan - property type changes, relationship preservation (one-to-man187skills.sh installs
2terminaluse avatarterminaluseterminaluse/agent-skillsCreate, edit, deploy, and interact with agents on TerminalUse. Use when user mentions "tu", "terminaluse", "deploy agent", "create agent", "edit agent", "update187skills.sh installs
3hiyeshu avatarcodeck-exporthiyeshu/codeckInternal publisher module for /codeck. Exports deck to PDF or PPTX with post-export QA. User-facing export requests should enter through /codeck; this skill def185skills.sh installs
4hairyf avatararch-tsdown-clihairyf/skillsTypeScript CLI starter using tsdown. Use when scaffolding or maintaining an npm CLI package with tsdown, pnpm, Vitest, and npm Trusted Publisher.180skills.sh installs
5josiahsiegel avatarado-pipeline-best-practicesjosiahsiegel/claude-plugin-marketplaceAzure DevOps pipeline best practices, patterns, and industry standards. PROACTIVELY activate for: (1) authoring or reviewing Azure DevOps YAML pipelines, (2) mu180skills.sh installs
6charleswiltgen avataraxiom-background-processingcharleswiltgen/axiomUse when implementing BGTaskScheduler, debugging background tasks that never run, understanding why tasks terminate early, or testing background execution - sys178skills.sh installs