用面向对象设计原则审视系统架构、模块边界与组件关系优化方案。
该技能材料显示其为纯提示词/设计理念文档,不要求密钥、无远程端点、无代码执行或数据访问说明。基于当前材料,整体风险较低,主要需留意仓库许可证未声明且社区/维护信号较弱。
材料明确标注无需任何密钥或环境变量,未见凭证收集、存储或滥用路径。
材料标注无远程端点,且属于 prompt-only 技能;未见将用户数据发送到外部服务的描述。
从描述与 README 看,该技能提供的是面向对象设计思维框架,不涉及本机起进程、执行脚本或调用系统能力。
未声明读取或写入本地文件、数据库、剪贴板或其他资源;按现有材料看不具备数据访问能力。
来源为 GitHub 且开源,可一定程度审计,降低了风险;但许可证未声明、0 star、维护状态未知,供应链可信度与持续维护信号偏弱,建议人工复核仓库内容与提交历史。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "design-philosophy-object-oriented" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/amplifier-bundle-systems-design/main/skills/design-philosophy-object-oriented/SKILL.md 2. 保存为 ~/.claude/skills/design-philosophy-object-oriented/SKILL.md 3. 装好后重载技能,告诉我可以用了
请用面向对象设计原则评审这套系统的模块划分,重点检查 SOLID、封装、组合优于继承,以及职责是否清晰。请指出主要问题、潜在风险,并给出重构建议。 系统说明:一个订单系统包含 OrderManager、PaymentManager、InventoryManager、NotificationManager,多个模块彼此直接调用,部分子类通过继承复用大量行为。
一份架构评审意见,说明职责边界问题、设计原则违背点,以及可执行的重构方向。
我正在设计一个消息分发组件,团队建议使用观察者模式和工厂模式。请从面向对象设计哲学出发,分析这些模式是否真的合适,什么时候会过度设计,并给出更简单或更稳健的替代方案。
一份模式适用性分析,包含采用条件、误用风险和可替代设计思路。
请根据责任驱动设计、封装、多态和 actor model 的思想,帮我分析以下组件关系是否合理,并提出解耦建议:用户服务负责鉴权、缓存、日志、通知发送和用户资料更新;通知服务还直接读取用户数据库。
一份组件关系分析,指出耦合点、职责过载问题,并给出更清晰的边界划分建议。
OO principles as thinking tools for code organization, module boundaries, and component relationships.
Object-oriented design is not about classes and inheritance. It is about managing the cost of change by localizing decisions behind stable interfaces. Every OO principle exists to answer one question: when a requirement changes, how many places in the code must change with it?
Good OO design means a single requirement change touches one or two files. Bad OO design means shotgun surgery across a class hierarchy that was supposed to make things "extensible."
The principles below are thinking tools, not commandments. Each one has a failure mode that is just as common as the problem it solves. Know both.
SOLID is a diagnostic framework. When code is hard to change, one of these principles usually explains why. But applying them prophylactically — before you feel the pain — produces the kind of over-abstracted architecture that makes senior engineers weep.
The principle: A class should have one reason to change. "Reason to change" means one stakeholder or one axis of requirements evolution.
When it helps:
When it hurts:
The practical test: Look at your git history. If a class changes in every commit for unrelated reasons, it has too many responsibilities. If you're always changing three classes together in lockstep, they may have been split incorrectly — they share a responsibility.
The principle: Software entities should be open for extension but closed for modification. You should be able to add new behavior without editing existing, working code.
When it helps:
StripePayment, PayPalPayment without touching the payment processing core.When it hurts:
PaymentStrategy interface with a factory and a registry. You need an if statement and the willingness to refactor later.The practical test: You need OCP when you've added the third variant of something. The first is just code. The second might be an if/else. The third is when you extract the pattern. Not before.
The principle: If S is a subtype of T, then objects of type T can be replaced with objects of type S without altering the correctness of the program. Subtypes must honor the behavioral contract of their parent, not just the type signature.
When it helps:
…
帮助设计可离线运行的边缘系统,处理同步、冲突恢复与弱网故障场景。
帮助设计与评估企业系统集成方案,覆盖遗留改造、网关、事件与失效模式。
用于按七步法系统审查架构设计,识别风险、权衡并产出改进建议。
用 Unix/Linux 设计哲学评估系统方案的可组合性、简洁性与关注点分离。
帮助用户设计或评估基于 Azure 的系统架构与运维方案
帮助设计和评估多租户SaaS的平台隔离、计量计费与稳定性方案
用领域驱动设计方法梳理复杂业务域、服务边界与系统架构决策。
用于按九阶段方法系统化推进架构设计、权衡取舍与迁移规划。
帮助用户设计系统、服务与技术架构,并梳理接口、数据模型和服务边界。
帮助你选择合适的架构原语,并判断某种设计模式是否真正适用。
帮助开发者设计、实现并重构六边形架构系统,确保边界清晰且易于测试。