Skip to content

decebals/claude-code-java / skills/solid-principles

solid-principles

Unverified

SOLID principles checklist with Java examples. Use when a class has too many responsibilities, an abstraction leaks, or a dependency points the wrong way, and when the user asks about Single Responsibility, Open/Closed, Liskov, Interface Segregation or Dependency Inversion. For naming, duplication and method length, use clean-code instead.

FileKindSize
README.mdmarkdown1.5 KB
SKILL.mdskill md16.6 KB
# SOLID Principles

**Load**: `view .claude/skills/solid-principles/SKILL.md`

---

## Description

SOLID principles checklist with detailed Java examples. Each principle includes violation examples, refactored solutions, and detection patterns.

---

## Use Cases

- "Check this class for SOLID violations"
- "Is this class doing too much?" (SRP)
- "How do I add new types without modifying code?" (OCP)
- "Why shouldn't Square extend Rectangle?" (LSP)
- "This interface is too big" (ISP)
- "How to make this testable?" (DIP)

---

## Examples

```
> view .claude/skills/solid-principles/SKILL.md
> "Review this UserService for SOLID principles"
→ Identifies SRP violation, suggests extraction of validation and notification
```

---

## Principles Covered

| Principle | Key Question |
|-----------|--------------|
| **S**ingle Responsibility | Does it have one reason to change? |
| **O**pen/Closed | Can I extend without modifying? |
| **L**iskov Substitution | Can subtypes replace base types? |
| **I**nterface Segregation | Are clients forced to implement unused methods? |
| **D**ependency Inversion | Does it depend on abstractions? |

---

## Related Skills

- `design-patterns` - Implementation patterns
- `clean-code` - DRY, KISS, YAGNI
- `java-code-review` - Full review checklist

---

## Resources

- [SOLID (Wikipedia)](https://en.wikipedia.org/wiki/SOLID)
- [Clean Code by Robert C. Martin](https://www.oreilly.com/library/view/clean-code-a/9780136083238/)
- [SOLID Principles in Java (Baeldung)](https://www.baeldung.com/solid-principles)
algorithmic-artanthropics/skillsCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.Stars: 195kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode: the smallest change that fully solves the task, and a reply a busy human understands in one read. Use on any coding task (writing, fixing, refactoring, reviewing, choosing dependencies) and when the user says "ponytail", "be lazy", "simplest solution", "yagni", or complains about over-engineering or bloat. Levels: lite, full (default), ultra.Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-gainDietrichGebert/ponytailShow ponytail's measured savings (code, cost, speed) from the benchmark. One-shot display. Use for /ponytail-gain, "what does ponytail save", "ponytail impact".Stars: 192kUpdated Claude CodeCodexVerifiedInstall
ponytail-reviewDietrichGebert/ponytailQuality review of a change: is the logic right, is it safe, does it hold under real load, is risky code tested, is it fast enough, and is every line needed. Reads the connected code, not only the diff. Each finding is explained in plain English. Use for "review this", "code review", "review the last commit", "review my PR", "is this over-engineered", /ponytail-review.Stars: 192kUpdated Claude CodeCodexVerifiedInstall