jyjeanne/ai-setup-forge/adapter-pattern-typescript
Claude Code and agent skill by jyjeanne/ai-setup-forge
- community
Checking that the SKILL.md file is still in the repository.
To allow incompatible interfaces to work together by wrapping an object in an adapter that translates its interface into one that a client expects. Use when: When integrating a third-party library whose interface doesn''t match your application''s internal requirements; When you want to standardize multiple different implementations of a service (e.g., different payment gateways); When you need to provide a stable interface while the underlying dependency is subject to change.
Install
npx vskill@latest install jyjeanne/ai-setup-forge/adapter-pattern-typescriptSKILL.md
The same SKILL.md was published earlier as jyjeanne/ai-setup-forge/adapter-pattern-typescript.
Purpose
To allow incompatible interfaces to work together by wrapping an object in an adapter that translates its interface into one that a client expects.
When to Use
- When integrating a third-party library whose interface doesn't match your application's internal requirements.
- When you want to standardize multiple different implementations of a service (e.g., different payment gateways).
- When you need to provide a stable interface while the underlying dependency is subject to change.
Procedure
1. Define the Target Interface
This is the interface your application expects to use.
2. The Incompatible Service (Adaptee)
An external library or old code with a different interface.
3. Implement the Adapter
The adapter implements the Target interface and delegates work to the Adaptee.
4. Usage in Client Code
The client only knows about the ILogger interface.
Constraints
- Complexity: Don't use the pattern if you can easily modify the original class to match the interface.
- Performance: While negligible, the extra layer of indirection adds a tiny overhead.
- Single Responsibility: The adapter should only focus on translation, not adding new business logic.
Expected Output
A wrapper class that successfully bridges two incompatible interfaces, allowing them to communicate without changing their existing code.
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/adapter-pattern-typescript/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/jyjeanne/ai-setup-forge/adapter-pattern-typescript)