Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guide REST API integration including HTTP methods, authentication, error handling, and rate limiting. Use this skill when the user needs to connect to a third-party API, design an API client, troubleshoot API errors, or understand API concepts — even if they say 'connect to this API', 'why is the API returning errors', 'how do I authenticate', or 'build an API integration'.
.claude/skills/asgard-ai-platform-tech-api-integration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 29% | 0% |
| case-03 | ✗→✓ | ▲ Improved | -24% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 33% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 119% | 0% |
IRON LAW: Read the Docs, Then Build, Then Handle Errors
1. Read the API documentation completely (auth, endpoints, rate limits, errors)
2. Get a successful request working in isolation (curl/Postman)
3. Build error handling BEFORE building features
Skipping step 1 wastes hours on trial-and-error. Skipping step 3
creates fragile integrations that break silently in production.| Method | Purpose | Idempotent? | Example | |--------|---------|------------|---------| | GET | Read data | Yes | GET /users/123 | | POST | Create new resource | No | POST /users + body | | PUT | Replace entire resource | Yes | PUT /users/123 + full body | | PATCH | Update partial resource | Yes | PATCH /users/123 + partial body | | DELETE | Remove resource | Yes | DELETE /users/123 |
| Range | Meaning | Common Codes | |-------|---------|-------------| | 2xx | Success | 200 OK, 201 Created, 204 No Content | | 3xx | Redirect | 301 Moved, 304 Not Modified | | 4xx | Client error (your fault) | 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests | | 5xx | Server error (their fault) | 500 Internal, 502 Bad Gateway, 503 Service Unavailable |
| Type | How It Works | When Used | |------|-------------|----------| | API Key | Key in header or query param | Simple APIs, server-to-server | | Bearer Token | Authorization: Bearer <token> | OAuth 2.0, JWT-based APIs | | OAuth 2.0 | Token exchange flow (authorize → token → API call) | User-delegated access (Google, FB) | | Basic Auth | Base64(username:password) in header | Legacy, internal APIs | | HMAC Signature | Sign request with secret key | Payment gateways, high-security |
try:
response = api.call(request)
if response.status == 429: # Rate limited
wait(response.headers['Retry-After'])
retry()
elif response.status >= 500: # Server error
retry_with_backoff(max_retries=3)
elif response.status >= 400: # Client error
log_error(response.body)
raise ClientError(response.body['message'])
else:
return response.json()| Strategy | How | |----------|-----| | Respect Retry-After header | Wait the specified seconds before retrying | | Exponential backoff | Wait 1s, 2s, 4s, 8s between retries | | Token bucket | Track request count, pause when approaching limit | | Queue requests | Use a job queue (Celery, Bull) for high-volume integrations |
markdown# API Integration Plan: {API Name} ## API Overview - Base URL: {url} - Auth: {type} - Rate limit: {N requests/period} - Documentation: {link} ## Endpoints Used | Endpoint | Method | Purpose | Auth | |----------|--------|---------|------| | {path} | GET/POST | {what it does} | {auth type} | ## Error Handling | Error | Response | Our Action | |-------|----------|-----------| | 401 | Unauthorized | Refresh token, retry | | 429 | Rate limited | Backoff, retry after Retry-After | | 500 | Server error | Retry 3x with exponential backoff | ## Implementation Timeline | Phase | Task | Duration | |-------|------|----------| | 1 | Auth + basic call | {days} | | 2 | Full integration | {days} | | 3 | Error handling + monitoring | {days} |
next_page token or offset parameter.references/oauth-guide.mdreferences/webhook-patterns.md| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 29,469 | 27,928 | -5% | 1 | 1 | 0% | 5,518 | 4,397 | -20% | 0 | 0 | — |
case-02 | fail→pass | 20,348 | 14,343 | -30% | 1 | 1 | 0% | 3,185 | 4,107 | +29% | 0 | 0 | — |
case-03 | fail→pass | 28,958 | 18,665 | -36% | 1 | 1 | 0% | 5,364 | 4,097 | -24% | 0 | 0 | — |
case-04 | pass→pass | 13,497 | 9,441 | -30% | 1 | 1 | 0% | 2,069 | 2,831 | +37% | 0 | 0 | — |
case-05 | pass→pass | 8,297 | 6,634 | -20% | 1 | 1 | 0% | 1,227 | 2,563 | +109% | 0 | 0 | — |
case-06 | fail→fail | 15,290 | 18,334 | +20% | 1 | 1 | 0% | 2,654 | 4,688 | +77% | 0 | 0 | — |
case-07 | fail→pass | 15,657 | 11,907 | -24% | 1 | 1 | 0% | 2,673 | 3,562 | +33% | 0 | 0 | — |
case-08 | fail→pass | 6,413 | 6,097 | -5% | 1 | 1 | 0% | 1,106 | 2,427 | +119% | 0 | 0 | — |
case-09 | pass→pass | 9,215 | 5,085 | -45% | 1 | 1 | 0% | 1,588 | 2,177 | +37% | 0 | 0 | — |
case-10 | pass→pass | 12,878 | 10,354 | -20% | 1 | 1 | 0% | 2,013 | 2,913 | +45% | 0 | 0 | — |
case-11 | pass→pass | 15,937 | 18,147 | +14% | 1 | 1 | 0% | 2,770 | 4,242 | +53% | 0 | 0 | — |
case-12 | pass→pass | 20,617 | 19,894 | -4% | 1 | 1 | 0% | 3,166 | 5,023 | +59% | 0 | 0 | — |
case-13 | fail→pass | 15,185 | 8,895 | -41% | 1 | 1 | 0% | 2,443 | 2,636 | +8% | 0 | 0 | — |
case-14 | pass→pass | 15,311 | 15,792 | +3% | 1 | 1 | 0% | 2,652 | 3,932 | +48% | 0 | 0 | — |
case-15 | pass→pass | 10,588 | 5,325 | -50% | 1 | 1 | 0% | 1,513 | 2,135 | +41% | 0 | 0 | — |
case-16 | pass→pass | 8,212 | 4,322 | -47% | 1 | 1 | 0% | 1,421 | 1,906 | +34% | 0 | 0 | — |
case-17 | pass→pass | 10,859 | 6,209 | -43% | 1 | 1 | 0% | 1,536 | 1,809 | +18% | 0 | 0 | — |
case-18 | pass→pass | 10,755 | 7,813 | -27% | 1 | 1 | 0% | 1,843 | 2,465 | +34% | 0 | 0 | — |
case-19 | pass→pass | 7,755 | 3,767 | -51% | 1 | 1 | 0% | 1,461 | 1,881 | +29% | 0 | 0 | — |
case-20 | pass→pass | 14,169 | 16,027 | +13% | 1 | 1 | 0% | 2,904 | 4,734 | +63% | 0 | 0 | — |
case-21 | pass→pass | 12,980 | 14,774 | +14% | 1 | 1 | 0% | 2,659 | 3,965 | +49% | 0 | 0 | — |
case-22 | pass→pass | 17,773 | 13,991 | -21% | 1 | 1 | 0% | 2,762 | 3,920 | +42% | 0 | 0 | — |
case-23 | pass→pass | 16,933 | 23,402 | +38% | 1 | 1 | 0% | 2,918 | 5,269 | +81% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +26 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.