clean-code

Apply Clean Code principles to Java codebases and code reviews.

700|137|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/decebals/claude-code-java --skill clean-code-decebals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/decebals/claude-code-java/tree/main/.claude/skills/clean-code
Command: npx skills add https://github.com/decebals/claude-code-java --skill clean-code-decebals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Clean Code principles help developers write readable, maintainable, and scalable Java code by addressing common pitfalls like duplication, over-complexity, and unclear naming.

Core Features & Use Cases

  • DRY, KISS, and YAGNI guidance to reduce duplication and over-engineering.
  • Naming conventions, function design, and comments that improve clarity.
  • Refactoring strategies with concrete before/after examples for real-world code.

Quick Start

Refactor this Java method to follow clean-code principles and explain the changes.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor a Java method to follow clean code principles?

To refactor Java code for clean code, apply DRY, KISS, and YAGNI principles to reduce duplication and over-engineering. This Skill provides concrete before/after examples, addressing naming conventions, method size, and code smells to improve overall readability and maintainability.

What are common code smells in Java and how do I fix them?

Common Java code smells include unclear naming, over-complexity, and code duplication. You fix them by applying clean code principles like DRY to eliminate redundancy and KISS to simplify logic, resulting in maintainable and readable codebases.

Does this clean code guidance work for general code reviews or just refactoring?

This clean code guidance works for both general Java code reviews and refactoring scenarios. It handles naming conventions, method size evaluation, and provides concrete refactoring suggestions with code snippets to ensure clarity and maintainability during the review process.

What is the best way to apply DRY, KISS, and YAGNI in Java development?

The best way to apply DRY, KISS, and YAGNI in Java is to actively identify and remove duplication, reduce over-complexity, and avoid over-engineering features. This approach ensures your codebase remains scalable, readable, and maintainable.

Can I get concrete before and after examples for Java refactoring?

Yes, you can receive concrete before and after examples for Java refactoring. The guidance provides specific refactoring suggestions and code snippets where appropriate, demonstrating how to transform messy code into maintainable Java.

When should I not use YAGNI when refactoring Java code?

You should not strictly apply YAGNI when the Java architecture explicitly requires built-in extensibility for documented future requirements. However, to maintain clean code, YAGNI generally prevents over-engineering by advising against adding functionality before it is actually needed.