johnnystefan/test-saas-business/pattern-bridge

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 Bridge structural design pattern — splitting a large class into two separate hierarchies (abstraction and implementation) that evolve independently. Trigger: When separating platform-independent abstractions from platform-specific implementations.

Install

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

SKILL.md

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

Skill: Implement Bridge Pattern

Purpose

Splits a large class or a set of closely related classes into two separate hierarchies—abstraction and implementation—which can be developed independently.

Procedural Instructions

  1. Identify Orthogonal Dimensions: Find independent dimensions in your classes (e.g., Abstraction vs. Platform).
  2. Define Implementation Interface: Create a common interface for all concrete implementations.
  3. Define Abstraction: Create a base class that maintains a reference to the implementation interface and delegates work to it.
  4. Refine Abstractions: Create subclasses for specific logic variations.

TypeScript Example

typescript
// Implementation Interface
interface Device {
isEnabled(): boolean;
enable(): void;
disable(): void;
}
// Concrete Implementation
class TV implements Device {
private on = false;
isEnabled() {
return this.on;
}
enable() {
this.on = true;
}
disable() {
this.on = false;
}
}
// Abstraction
class RemoteControl {
constructor(protected device: Device) {}
togglePower() {
this.device.isEnabled() ? this.device.disable() : this.device.enable();
}
}
// Refined Abstraction
class AdvancedRemote extends RemoteControl {
mute() {
console.log('Device muted');
}
}

Payoff

  • Platform Independence: You can create apps that work across different platforms.
  • Scalability: Avoids an exponential explosion of subclasses.

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.

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-bridge/badge)](https://verified-skill.com/skills/johnnystefan/test-saas-business/pattern-bridge)

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