strategy-registry
CommunityBuild extensible dispatch systems.
Author101mare
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides robust patterns for implementing the Strategy pattern with registry-based dispatch, enabling extensible systems where new handlers or strategies can be added without modifying core logic. It solves the problem of hard-to-maintain if/elif chains and promotes the Open/Closed Principle.
Core Features & Use Cases
- Extensible Dispatch: Easily add new handlers for file types, event types, or commands.
- Multiple Registry Patterns: Demonstrates dict-based, decorator-based, and auto-discovery (
__init_subclass__) registration. - Protocol Definition: Enforces a clear interface for strategies using
typing.Protocol. - Use Case: Building a plugin system for a code editor where new language support can be added by simply dropping in new handler modules.
Quick Start
Use the strategy-registry skill to implement a file handler that dispatches based on file extension.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 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-registry Download link: https://github.com/101mare/skill-library/archive/main.zip#strategy-registry 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 223,000+ vetted skills library on demand.