What problem does it solve?
This Skill ensures that your Java code adheres to clean code principles, making it more readable, maintainable, and efficient.
Core Features & Use Cases
- Naming Conventions: Enforce proper naming for classes, methods, variables, and constants.
- Method Length and Single Responsibility: Guide methods to be concise and focused on a single task.
- Optional Handling: Recommend using
orElseThrow(), orElse(), ifPresent(), or map() instead of .get().
- Exception Hierarchy: Suggest building an abstract exception hierarchy for better error management.
- Constants: Encourage the use of named constants instead of magic numbers or strings.
- Use Case: If you are working on a Java project and want to improve the quality of your code, this Skill can help you apply clean code principles to your codebase.
Quick Start
Run the clean-code skill to analyze your Java project and get suggestions for code improvements.