gof-proxy
Installation
SKILL.md
One-line summary
Provide a surrogate or placeholder for another object to control access to it — without the client knowing it's not talking directly to the real object.
When to use this skill
- The real object is expensive to create and should be deferred until actually used (Virtual Proxy — image loading, lazy initialization of heavy resources).
- The real object lives in a different process / on a different machine and the client interface should look local (Remote Proxy — RMI, gRPC stubs, RPC clients).
- Access to the real object should be checked against permissions or rate limits (Protection Proxy).
- The real object is hard to mock for tests, and a stand-in makes testing easier.
When NOT to use this skill
- You want to add behavior to the wrapped object — that's
gof-decorator, not Proxy. The structural shape is the same but the intent differs. - You want to change the interface — that's
gof-adapter. - Lazy initialization of a simple field — most languages have lazy delegates (
by lazyin Kotlin,lazyin C#) that handle it without a proxy class.