← Back to list

api-integration-patterns
by dasien
Multi-agent development system template for Claude Code with specialized agents, task queue management, and automated workflows
⭐ 3🍴 1📅 Jan 24, 2026
SKILL.md
name: "API Integration Patterns" description: "Implement robust third-party API integrations with proper authentication, error handling, and rate limiting" category: "integration" required_tools: ["Read", "Write", "Edit", "WebSearch"]
Purpose
Build reliable integrations with external APIs, handling authentication flows, retries, rate limits, and error conditions gracefully.
When to Use
- Integrating third-party services
- Building API clients
- Consuming webhooks
- Managing API credentials
Key Capabilities
- Authentication Handling - OAuth, API keys, JWT
- Error Recovery - Retries with exponential backoff
- Rate Limit Management - Respect API quotas
Example
import requests
from time import sleep
import logging
class APIClient:
def __init__(self, base_url, api_key):
self.base_url = base_url
self.session = requests.Session()
self.session.headers.update({
'Authorization': f'Bearer {api_key}',
'User-Agent': 'MyApp/1.0'
})
def make_request(self, method, endpoint, **kwargs):
url = f"{self.base_url}/{endpoint}"
max_retries = 3
for attempt in range(max_retries):
try:
response = self.session.request(method, url, **kwargs)
# Handle rate limiting
if response.status_code == 429:
retry_after = int(response.headers.get('Retry-After', 60))
logging.warning(f"Rate limited. Waiting {retry_after}s")
sleep(retry_after)
continue
response.raise_for_status()
return response.json()
except requests.exceptions.RequestException as e:
if attempt == max_retries - 1:
raise
# Exponential backoff
wait = 2 ** attempt
logging.warning(f"Request failed, retrying in {wait}s: {e}")
sleep(wait)
raise Exception("Max retries exceeded")
Best Practices
- ✅ Implement exponential backoff for retries
- ✅ Respect rate limits (429 responses)
- ✅ Use timeouts on all requests
- ✅ Log all API interactions for debugging
- ✅ Validate webhook signatures
- ❌ Avoid: Infinite retry loops
- ❌ Avoid: Storing API keys in code
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
✓説明文
100文字以上の説明がある
+10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon