skills/skills.volces.com/observer-pattern-implementor

observer-pattern-implementor

Installation
SKILL.md

Observer Pattern Implementor

When to Use

A data source is directly calling update methods on its consumers, making it impossible to add or remove consumers without modifying the source. Apply this skill when:

  • An abstraction has two separable aspects — a subject (data) and observers (views/reactions) — and tightly coupling them limits reuse of each independently
  • A change to one object requires notifying an unknown or variable number of other objects, and you don't want to hard-code who those are
  • Objects should be able to notify others without making assumptions about who those objects are — you want zero coupling from subject to observer

Do not apply if:

  • Only one consumer will ever exist and that is certain by design (direct call is simpler)
  • Observers trigger further changes that trigger more observers — cascade control is complex; use ChangeManager (Step 9)
  • The language/framework already provides this mechanism natively (e.g., React state, RxJS, Qt signals) — use those instead

Before starting, verify you can answer: What is the subject (the thing that changes)? What are the observers (the things that react)? What state do observers need from the subject after a change?


Installs
3
First Seen
Apr 24, 2026
observer-pattern-implementor from skills.volces.com