johnnystefan/test-saas-business/pattern-strategy
Claude Code and agent skill by johnnystefan/test-saas-business
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Teaches and applies the Strategy behavioral design pattern — defining a family of algorithms, encapsulating each one, and making them interchangeable at runtime. Trigger: When implementing interchangeable algorithms, sorting strategies, or payment methods.
Install
npx vskill@latest install johnnystefan/test-saas-business/pattern-strategySKILL.md
The same SKILL.md was published earlier as johnnystefan/test-saas-business/pattern-strategy.
Skill: Implement Strategy Pattern
Purpose
Defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
Procedural Instructions
- Identify Variant Algorithms: Look for a class that performs a task in multiple different ways.
- Declare Strategy Interface: Define a common method for executing the algorithm.
- Implement Concrete Strategies: Place each variation of the algorithm into its own class.
- Update Context: The original class stores a reference to a Strategy and delegates work to it.
- Set Strategy at Runtime: Provide a setter in the Context so the client can swap strategies.
TypeScript Example
Payoff
- Flexibility: Switch algorithms used inside an object at runtime.
- Isolation: Separates the implementation details of an algorithm from the code that uses it.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/design-patterns/behaviorals/pattern-strategy/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/johnnystefan/test-saas-business/pattern-strategy)