gof-adapter
Installation
SKILL.md
One-line summary
Convert one interface into another the client expects — letting classes work together that couldn't otherwise because of incompatible interfaces.
When to use this skill
- Integrating a third-party library that has a different interface than what your code expects.
- Migrating from an old API to a new one — write an adapter that exposes the old interface in terms of the new (or vice versa) and switch incrementally.
- Two systems must talk and you can't change either — adapter sits between them.
- The classic Adapter example: an electrical plug adapter that lets a US plug fit a European socket; the underlying current is the same, only the interface differs.
When NOT to use this skill
- The two interfaces serve genuinely different conceptual purposes — an adapter would be doing translation work that hides a real domain decision; surface the decision instead.
- Only one method needs adapting and the host class can change to call the source directly — adapter is overkill.
- The wrapper adds behavior rather than changes interface — that's
gof-decorator. - The wrapper hides complexity of a subsystem — that's
gof-facade.