ToolMaster api-integration
Build API integrations — REST, WebSocket, webhook handlers. Use when connecting to external services, building scrapers, or wiring up data pipelines.
install
source · Clone the upstream repo
git clone https://github.com/techieharry/ToolMaster
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/techieharry/ToolMaster "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/api-integration" ~/.claude/skills/techieharry-toolmaster-api-integration && rm -rf "$T"
manifest:
skills/api-integration/SKILL.mdsource content
API Integration
Process
- Read the docs — find auth method, rate limits, pagination, error codes
- Auth first — get a working authenticated request before anything else
- Build incrementally — one endpoint at a time, verify response shape
- Handle failures — retries with backoff, timeout handling, error parsing
- Extract — parse response into clean data structures
Patterns
REST client
- Use requests/httpx (Python) or fetch (JS) — don't build custom HTTP
- Set timeouts on every request (10s default, 30s for large payloads)
- Retry 3x with exponential backoff (1s, 2s, 4s) on 429/500/502/503
- Log request/response on failure, not success
Rate limiting
- Check response headers: X-RateLimit-Remaining, Retry-After
- Implement token bucket or sliding window
- Never hammer an API — respect limits, your key depends on it
Error handling
- Parse error response bodies — they usually tell you what's wrong
- Map API errors to your domain errors
- Never swallow errors silently
Rules
- Never hardcode API keys — use environment variables
- Always set User-Agent header
- Cache responses when the data doesn't change frequently
- Document the API's quirks (undocumented behaviors, known bugs)