Chain of Responsibility
OfficialDecouple requests with a flexible handler chain.
Software Engineering#middleware#decoupling#handler#software-design#design-pattern#request-chain#chain-of-responsibility
Authormicrowind
Version1.0.0
Installs0
System Documentation
What problem does it solve?
将请求沿着一组处理者逐一传递,解耦请求发起者与具体处理者,避免硬编码的直接调用,从而提升系统的可扩展性与维护性。
Core Features & Use Cases
- 解耦与灵活性:请求发送者与处理链解耦,便于动态新增、移除或重新排序处理者。
- 可扩展的处理链:可以在不修改发起端的情况下增添新的 ConcreteHandler 实现。
- 默认与回退处理:链中可以设定默认处理或回退逻辑,确保请求不丢失。
- 常见用例包括日志路由、身份验证与授权、输入校验,以及按步骤执行的工作流。
Quick Start
构建一个处理链,将请求从头节点逐个传递给后续处理者,直到被某个处理者处理。
Dependency Matrix
Required Modules
None requiredComponents
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: Chain of Responsibility Download link: https://github.com/microwind/ai-skills/archive/main.zip#chain-of-responsibility Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.