| name | api-integration |
| description | REST/GraphQL API client design, rate limiting, error handling, and authentication best practices |
| license | CC-BY-4.0 |
API Integration Skill
🔴 AI FIRST Quality Principle
Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.
Purpose
Expert knowledge in building robust API clients with proper error handling, rate limiting, authentication, and retry logic.
Core Principles
- Resilience - Handle failures gracefully
- Rate Limiting - Respect API limits
- Retry Logic - Exponential backoff
- Circuit Breaker - Fail fast when needed
- Security - Secure credential storage
Enforces
- REST/GraphQL client patterns
- Rate limiting and throttling
- Retry logic with exponential backoff
- Circuit breaker pattern
- Error handling and recovery
- Authentication (OAuth, API keys, JWT)
- Request/response logging
- Timeout configuration
API Client Pattern
class APIClient {
constructor(config) {
this.baseUrl = config.;
. = config. || ;
. = config. || ;
. = ();
}
() {
(..()) {
();
}
( attempt = ; attempt <= .; attempt++) {
{
response = (
,
{ ...options, : . }
);
(!response.) {
(response., response.);
}
..();
response.();
} (error) {
(attempt === .) {
..();
error;
}
.( * .(, attempt));
}
}
}
}