Skip to main content
在 Manus 中运行任何 Skill
一键导入

oop-principles

星标4
分支0
更新时间2026年6月26日 09:05

Evaluate code against Dave Thomas's OO principles, SOLID principles, and the Tell Don't Ask rule. Routes to `design-patterns/` and `solid/` sub-skills. TRIGGER when: class has only static methods; class has a single public method + constructor; code uses GoF pattern names (Decorator/Factory/Strategy/Builder/Command/Observer); class is invalid until setters are called; data class with only constructor + properties; external code reads getters to make decisions (Tell Don't Ask); user asks "is this OOP design smell?", "is this a class design issue?", "is this an OOP anti-pattern?", "should this be a class or a function?", or "why does my code feel procedural?". DO NOT USE when: the smell is at the function/method level (long method, primitive obsession, feature envy on values, etc.) — that is `refactoring`'s domain. Activate here only for *class-shape* issues.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

文件资源管理器
10 个文件
SKILL.md
readonly