| name | base-client-guardian |
| description | Guardrails for edits to core/base-client.js covering auth injection, retries, circuit breaker behavior, and request/response events. Use when modifying the universal API client or its auth/retry/error handling. |
Skill: Base Client Guardian
Purpose & Scope
This skill applies when modifying the Universal API Client (core/base-client.js).
The Base Client provides:
- HTTP request handling with axios
- Multi-protocol authentication (Bearer, API Key, Basic, HMAC, OAuth2)
- Exponential backoff retry logic
- Circuit breaker pattern for fault tolerance
- Rate limiting management
- EventEmitter-based request/response/error logging
Critical Rules - NEVER Do
Public Method Stability
- NEVER remove or rename these public methods:
request() - Main entry point for API calls
retryRequest() - Handles retry logic with backoff
healthCheck() - Service health verification
generateMethods() - Dynamic method generation from endpoints
addAuthentication() - Auth injection into requests
EventEmitter Events
- NEVER remove or rename these event names:
request - Emitted before each request
response - Emitted on successful response
error - Emitted on request failure
circuit-breaker-open - Emitted when circuit opens
Authentication Types
- change these auth type identifiers: