johnnystefan/test-saas-business/pattern-adapter

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 Adapter structural design pattern — allowing objects with incompatible interfaces to collaborate by wrapping one interface into another. Trigger: When integrating third-party libraries, legacy code, or incompatible interfaces.

Install

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

SKILL.md

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

Skill: Implement Adapter Pattern

Purpose

Allows objects with incompatible interfaces to collaborate. It acts as a wrapper that converts the interface of one object so that another object can understand it.

Procedural Instructions

  1. Identify Incompatibility: Locate a useful class (service) whose interface doesn't match the client's requirements.
  2. Define Client Interface: Describe the protocol the client uses.
  3. Create Adapter: Implement the client interface and maintain a reference to the service object (the "adaptee").
  4. Map Methods: In the adapter, translate client calls into a format the service understands.

TypeScript Example

typescript
// Client Interface
interface Target {
request(): string;
}
// Service with incompatible interface (Adaptee)
class Adaptee {
public specificRequest(): string {
return '.eetpadA eht fo roivaheb laicepS';
}
}
// Adapter translates the interface
class Adapter implements Target {
constructor(private adaptee: Adaptee) {}
public request(): string {
const result = this.adaptee.specificRequest().split('').reverse().join('');
return `Adapter: (TRANSLATED) ${result}`;
}
}

Payoff

  • SRP: Separates the data conversion logic from the primary business logic.
  • OCP: New adapters can be introduced without breaking existing client code.

Security

  • Security scanPassed, 95 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-adapter/badge)](https://verified-skill.com/skills/johnnystefan/test-saas-business/pattern-adapter)

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