strategy-pattern
CommunityMake algorithms swappable at runtime
Software Engineering#typescript#algorithms#rust#software-architecture#design-pattern#runtime-selection#strategy-pattern
Authorerichugy
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Encapsulates a family of algorithms behind a common interface to eliminate growing switch or if/else chains and make behavior pluggable at runtime.
Core Features & Use Cases
- Swappable Algorithms: Define interchangeable strategies that can be selected or registered at runtime to change behavior without modifying existing code.
- Language Examples: Includes patterns and guidance for both TypeScript (function- and class-based strategies) and Rust (traits and implementations).
- Practical Uses: Useful for export formatting, pricing strategies, compression selection, authentication modes, and any case where runtime behavior should be extensible.
Quick Start
Use the strategy-pattern skill to replace a type-based switch with a registry of strategy implementations and select the appropriate strategy at runtime.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: strategy-pattern Download link: https://github.com/erichugy/agentic.skills/archive/main.zip#strategy-pattern 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.