Strategy Pattern

Use the Strategy pattern when you have multiple algorithms for the same task and want to select o... Use when designing system architecture. Architecture category skill.

majiayu000 Updated 567 repo stars

File contents

Strategy Pattern

Use the Strategy pattern when you have multiple algorithms for the same task and want to select one at runtime. Instead of complex if/else chains, define a common interface and implement it with different strategies. This enables adding new behaviors without modifying existing code. Common uses: payment processors, shipping calculators, validation rules.

majiayu000/claude-skill-registry-data/tree/main/development/strategy-pattern-omniaffix-dave-sessionguardian commit 0a42a4e606

Frequently asked questions

npx skillmds@latest add majiayu000/strategy-pattern