solid-principles

仓库创建 2026年1月30日最近提交 5 个月前SkillHot 收录 23 天前
▸ 精选理由

帮助提升代码可维护性与职责划分清晰度。

这个 Skill 做什么

提供 SOLID 设计原则检查与 Java 示例,辅助重构与类设计评审。

用 SOLID 的五条原则审视类设计和重构,判断单一职责、开闭、里氏替换、接口隔离与依赖倒置是否到位。常用于代码评审或拆大类重构,会结合 Java 示例给出实操改进建议,让设计更容易维护与扩展。

▸ 展开 SKILL.md 英文原文

SOLID principles checklist with Java examples. Use when reviewing classes, refactoring code, or when user asks about Single Responsibility, Open/Closed, Liskov, Interface Segregation, or Dependency Inversion.

开发编程设计原则重构SOLID通用
692
Stars
135
Forks
18
仓库内 Skill
+20
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/decebals/claude-code-java/main/.claude/skills/solid-principles/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/decebals/claude-code-java/main/.claude/skills/solid-principles/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# SOLID Principles Skill

Review and apply SOLID principles in Java code.

## When to Use
- User says "check SOLID" / "SOLID review" / "is this class doing too much?"
- Reviewing class design
- Refactoring large classes
- Code review focusing on design

---

## Quick Reference

| Letter | Principle | One-liner |
|--------|-----------|-----------|
| **S** | Single Responsibility | One class = one reason to change |
| **O** | Open/Closed | Open for extension, closed for modification |
| **L** | Liskov Substitution | Subtypes must be substitutable for base types |
| **I** | Interface Segregation | Many specific interfaces > one general interface |
| **D** | Dependency Inversion | Depend on abst
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有