patternsproxy

Proxy Pattern pattern for C development

⭐1stars🔀0forks📁View on GitHub🕐Updated Jan 4, 2026

When & Why to Use This Skill

This Claude skill facilitates the implementation of the Proxy Pattern in C development, providing a structured approach to creating surrogates for objects. It enables developers to control access and add transparent behaviors—such as lazy loading, logging, and caching—without modifying the original object's interface, thereby improving code modularity and system performance.

Use Cases

  • Lazy Loading: Optimize application startup time by using a proxy to initialize heavy resources, like database connections, only when the first query is executed.
  • Logging and Auditing: Wrap existing clients or API modules with a logging proxy to capture all requests and responses for debugging and monitoring without changing the underlying code.
  • Caching Proxy: Enhance system responsiveness by intercepting repeated database queries or expensive API calls and returning cached results through the proxy layer.
  • Access Control and Rate Limiting: Implement a security or throttling layer that manages and restricts access to sensitive components or external services.
namepatterns/proxy
descriptionProxy Pattern pattern for C development

Proxy Pattern

Provide surrogate for another object to control access. Proxy has same interface as real object. Adds behavior transparently.

ikigai Application

Potential uses:

Lazy loading: Database connection proxy that connects on first query, not at startup.

Logging proxy: Wrap LLM client to log all requests/responses without modifying client code.

Caching proxy: Cache repeated database queries or LLM responses.

Rate limiting: Proxy that throttles API calls.

Implementation: Proxy struct holds pointer to real object, implements same interface, adds behavior before/after delegating.

Current status: Not explicitly used yet. Consider when adding cross-cutting concerns to existing interfaces without modification.