원클릭으로
api-integration-patterns
Implement robust third-party API integrations with proper authentication, error handling, and rate limiting
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Implement robust third-party API integrations with proper authentication, error handling, and rate limiting
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Design AI agents with appropriate capabilities, tools, and personas for specific software development tasks
Design RESTful APIs with proper resource modeling, HTTP methods, error handling, and clear contracts following REST principles
Document APIs comprehensively with signatures, parameters, return values, errors, and working code examples for developer reference
Apply proven architectural patterns (MVC, layered, microservices) to create maintainable systems with clear separation of concerns
Systematically reproduce, diagnose, and analyze bugs to determine root cause, assess severity, and plan fix strategy
Design and implement continuous integration and deployment pipelines with automated testing, builds, and deployments
| 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"] |
Build reliable integrations with external APIs, handling authentication flows, retries, rate limits, and error conditions gracefully.
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")