
Clean Code
This is a solid reference for making code readable and maintainable. It walks you through DRY, KISS, and YAGNI with side-by-side examples of violations and refactored versions, mostly in Java. The naming conventions section is genuinely helpful, covering everything from why "d" is a terrible variable name to why booleans should start with is/has/can. The function design guidance keeps it practical, like keeping methods small and maintaining a single level of abstraction. Use this when you're refactoring messy code or doing code reviews. It won't teach you advanced patterns, but it will stop you from writing the kind of code that makes your teammates groan.
- skills.sh installs
- 427
- GitHub stars
- 771
- last updated
- Feb 8, 2026
Install
$ npx -y skills add decebals/claude-code-java --skill clean-code --agent claude-codeInstalls into .claude/skills of the current project.
Files
Clean Code Skill
Write readable, maintainable code following Clean Code principles.
When to Use
- User says "clean this code" / "refactor" / "improve readability"
- Code review focusing on maintainability
- Reducing complexity
- Improving naming
Core Principles
| Principle | Meaning | Violation Sign |
|---|---|---|
| DRY | Don't Repeat Yourself | Copy-pasted code blocks |
| KISS | Keep It Simple, Stupid | Over-engineered solutions |
| YAGNI | You Aren't Gonna Need It | Features "just in case" |
DRY - Don't Repeat Yourself
"Every piece of knowledge must have a single, unambiguous representation in the system."
Violation
// ❌ BAD: Same validation logic repeated
public class UserController {
public void createUser(UserRequest request) {
if (request.getEmail() == null || request.getEmail().isBlank()) {
throw new ValidationException("Email is required");
}
if (!request.getEmail().contains("@")) {
throw new ValidationException("Invalid email format");
}
// ... create user
}
Sponsors
Details
- Repository
- github.com/decebals/claude-code-java
- Categories
- Code Review & Quality, Java & JVM, Design & UI/UX
- License
- MIT
- First seen
- Jun 11, 2026
More from decebals/claude-code-java
All 18- Concurrency Review384
- Solid Principles384
- Architecture Review374
- Design Patterns372
- Spring Boot Patterns358
- Java Migration357
- Security Audit347
- Performance Smell Detection341
- Test Quality336
- Api Contract Review315
- Maven Dependency Audit308
- Logging Patterns300
- Jpa Patterns297
- Changelog Generator251
- Git Commit249
- Issue Triage240
- Java Code Review1.1K