定义对象间一对多的依赖关系,当对象状态改变时通知所有依赖者。在设计事件系统、MVC框架、响应式编程等场景中使用。
$npx -y skills add microwind/ai-skills --skill observer-patternInstalls into the current project.
Run `npx skills use "https://github.com/microwind/ai-skills" --skill "microwind/ai-skills/observer-pattern"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/microwind/ai-skills" that are relevant to the current task. Run `npx skills add "https://github.com/microwind/ai-skills"` and select the relevant skills, then follow their instructions.