johnnystefan/test-saas-business/pattern-decorator

Claude Code and agent skill by johnnystefan/test-saas-business

Trust tier 3
  • community
  • ext:[{"type":"plugin","description":"Custom plugin integration"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Teaches and applies the Decorator structural design pattern — attaching new behaviors to objects dynamically by wrapping them inside decorator objects. Trigger: When adding responsibilities to objects at runtime without modifying their class.

Install

npx vskill@latest install johnnystefan/test-saas-business/pattern-decorator

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as johnnystefan/test-saas-business/pattern-decorator.

Skill: Implement Decorator Pattern

Purpose

Attaches new behaviors to objects dynamically by placing them inside special wrapper objects that contain the behaviors.

Procedural Instructions

  1. Identify Layers: Look for a primary component and optional "add-on" features.
  2. Define Component Interface: Common interface for both the core object and its wrappers.
  3. Create Base Decorator: A class that wraps a component and delegates all work to it.
  4. Implement Concrete Decorators: Classes that override base methods to add behavior before/after delegation.

TypeScript Example

typescript
interface Notifier {
send(msg: string): void;
}
class SimpleNotifier implements Notifier {
send(msg: string) {
console.log(`Sending: ${msg}`);
}
}
class BaseDecorator implements Notifier {
constructor(protected wrappee: Notifier) {}
send(msg: string) {
this.wrappee.send(msg);
}
}
class SMSDecorator extends BaseDecorator {
send(msg: string) {
super.send(msg);
console.log(`SMS: ${msg}`);
}
}

Payoff

  • Flexibility: Add/remove responsibilities at runtime.
  • Composition over Inheritance: Avoids bloating classes with every possible combination of features.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Extension points

  • pluginCustom plugin integration

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/johnnystefan/test-saas-business/pattern-decorator/badge)](https://verified-skill.com/skills/johnnystefan/test-saas-business/pattern-decorator)

Something wrong with this skill or its page? Tell us.