decebals/claude-code-java / skills/clean-code
clean-code
UnverifiedClean Code principles (DRY, KISS, YAGNI), naming, function design and readability. Use when code is hard to read, with long methods, unclear names, duplication or deep nesting. For how responsibilities are split across classes and which way dependencies point, use solid-principles instead.
README.md
View on GitHub# Clean Code
**Load**: `view .claude/skills/clean-code/SKILL.md`
---
## Description
Clean Code principles with Java examples: DRY, KISS, YAGNI, naming conventions, function design, code smells, and refactoring techniques.
---
## Use Cases
- "Clean this code"
- "Refactor this method"
- "Improve readability"
- "This function is too long"
- "What should I name this variable?"
- "Is this code too complex?"
---
## Examples
```
> view .claude/skills/clean-code/SKILL.md
> "This method is 100 lines, help me refactor"
→ Identifies code smells, suggests Extract Method, Guard Clauses
```
---
## Principles Covered
| Principle | Key Question |
|-----------|--------------|
| **DRY** | Is this logic duplicated elsewhere? |
| **KISS** | Is there a simpler way? |
| **YAGNI** | Do we need this now or "just in case"? |
---
## Topics
- Naming conventions (variables, methods, classes)
- Function design (size, parameters, abstraction)
- Comments (when good, when bad)
- Code smells detection
- Refactoring techniques
---
## Related Skills
- `solid-principles` - Class design principles
- `design-patterns` - Common solutions
- `java-code-review` - Full review checklist
---
## Resources
- [Clean Code by Robert C. Martin](https://www.oreilly.com/library/view/clean-code-a/9780136083238/)
- [Refactoring by Martin Fowler](https://refactoring.com/)
- [Refactoring Guru - Code Smells](https://refactoring.guru/refactoring/smells)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |