home / skills / vadimcomanescu / codex-skills / api-integration-specialist
This skill helps you build reliable API integrations with strong auth, error handling, retries, and boundary payload transformations.
npx playbooks add skill vadimcomanescu/codex-skills --skill api-integration-specialistReview the files below or copy the command above to add this skill to your agents.
---
name: api-integration-specialist
description: Expert in integrating third-party APIs with proper authentication, error handling, rate limiting, and retry logic. Use when integrating REST APIs, GraphQL endpoints, webhooks, or external services. Specializes in OAuth flows, API key management, request/response transformation, and building robust API clients.
---
# API Integration Specialist
Build reliable integrations with clear auth, error handling, and rate limit safety.
## Quick Start
1) Read the provider’s auth + rate limit docs.
2) Design a thin client with retries and typed errors.
3) Transform provider payloads to internal models at the boundary.
4) Add tests: happy path, auth failure, rate limit, and server error.
## Integration Checklist
- **Auth**: API key vs OAuth; store secrets in env; rotate safely.
- **Errors**: map status codes to typed errors; include response body.
- **Retries**: exponential backoff on 429/5xx; respect `Retry-After`.
- **Webhooks**: verify signatures; idempotency; replay-safe handlers.
- **Pagination**: cursor/offset; avoid unbounded loops.
- **Timeouts**: set sane timeouts per call.
## Boundary Pattern (example)
```ts
async function request(path, init) {
const res = await fetch(`${baseUrl}${path}`, init);
if (!res.ok) throw new ApiError(res.status, await res.json());
return res.json();
}
```
## Guardrails
- Never log secrets.
- Keep provider-specific logic at the boundary.
- When requirements are unclear, ask for target SLAs and expected volume.
## References
- Extended examples: `references/examples.md`
This skill helps build reliable third-party API integrations with correct authentication, robust error handling, rate limit safety, and clear request/response transformation. It focuses on practical patterns for REST, GraphQL, and webhook integrations and provides guidance for OAuth flows, API key management, retries, and typed errors. Use it to design maintainable API clients that are safe in production.
I inspect provider documentation and implement a thin boundary client that centralizes auth, timeouts, retries, and error mapping. The client transforms provider payloads into internal models at the boundary and enforces guardrails like secret handling and replay-safe webhook processing. I include test cases for happy paths and failure modes and recommend configuration via environment variables and SLAs.
How should secrets be stored and rotated?
Keep secrets in environment variables or a secrets manager, automate rotation, and ensure clients can hot-reload credentials when rotated.
Which errors should trigger retries?
Retry on 429 and most 5xx server errors with exponential backoff and jitter; do not retry on 4xx client errors except when retryable semantics are documented.
How do I verify webhooks safely?
Verify signatures using the provider’s algorithm, reject mismatches, and design handlers to be idempotent and safe to replay.