api-integration-specialist
БесплатноБез исполняемых скриптовНе проверенExpert guidance for designing, integrating, and maintaining third-party APIs with best practices for authentication, error handling, rate limiting, security…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
API Integration Specialist
Expert assistant for reliable, secure, and efficient API integrations.
Core Integration Workflow
1. Discovery and Planning
Before integrating any API:
- Review official documentation thoroughly
- Identify required endpoints and authentication methods
- Map out data flow and transformation needs
- Check rate limits and quotas
- Plan error handling strategy
- Document dependencies
2. Authentication Setup
Choose and implement appropriate authentication:
OAuth 2.0 (Recommended for user-delegated access):
1. Register application with provider
2. Obtain client_id and client_secret
3. Implement authorization flow:
- Authorization Code Flow (web apps)
- PKCE Flow (mobile/SPA)
- Client Credentials (server-to-server)
4. Handle token refresh automatically
5. Store tokens securely (never in code)
API Keys (Simple public APIs):
- Store in environment variables
- Rotate keys regularly
- Use different keys per environment
- Monitor usage and revoke if compromised
Bearer Tokens (JWT-based):
- Validate token signature
- Check expiration (exp claim)
- Verify issuer and audience
- Implement token refresh logic
3. Request Construction
Build reliable API requests:
Headers:
- Content-Type: application/json (for JSON APIs)
- Authorization: Bearer {token} or API-Key {key}
- Accept: application/json
- User-Agent: YourApp/version
- X-Request-ID: {unique-id} (for tracking)
Query Parameters:
- URL encode all values
- Use consistent naming (camelCase or snake_case)
- Validate before sending
- Document required vs optional params
Request Body:
- Validate data structure before sending
- Use schema validation (JSON Schema, Zod, Joi)
- Handle nested objects correctly
- Respect payload size limits
4. Response Handling
Process API responses systematically:
Status Code Patterns:
2xx Success:
200 OK - Request successful, data returned
201 Created - Resource created successfully
202 Accepted - Request accepted, processing async
204 No Content - Success with no response body
4xx Client Errors:
400 Bad Request - Invalid input data
401 Unauthorized - Missing/invalid auth
403 Forbidden - Valid auth but no permission
404 Not Found - Resource doesn't exist
422 Unprocessable Entity - Validation failed
429 Too Many Requests - Rate limit exceeded
5xx Server Errors:
500 Internal Server Error - Server issue
502 Bad Gateway - Upstream server error
503 Service Unavailable - Temporary outage
504 Gateway Timeout - Request timeout
Response Validation:
# Always validate response structure
def validate_response(response):
# Check status code first
if response.status_code >= 500:
raise ServerError("API server error")
# Validate JSON structure
try:
data = response.json()
except ValueError:
raise ParseError("Invalid JSON response")
# Validate expected fields
if 'data' not in data:
raise ValidationError("Missing data field")
return data['data']
Error Handling Patterns
Retry Strategy with Exponential Backoff
import time
import random
def retry_with_backoff(func, max_retries=3, base_delay=1):
"""
Retry failed requests with exponential backoff
"""
for attempt in range(max_retries):
try:
return func()
except (ConnectionError, TimeoutError, ServerError) as e:
if attempt == max_retries - 1:
raise
# Calculate backoff: base_delay * 2^attempt + jitter
delay = base_delay * (2 ** attempt) + random.uniform(0, 1)
print(f"Attempt {attempt + 1} failed: {e}")
print(f"Retrying in {delay:.2f} seconds...")
time.sleep(delay)
Circuit Breaker Pattern
class CircuitBreaker:
"""
Prevent cascading failures by breaking circuit after threshold
"""
def __init__(self, failure_threshold=5, timeout=60):
self.failure_threshold = failure_threshold
self.timeout = timeout
self.failure_count = 0
self.last_failure_time = None
self.state = 'CLOSED' # CLOSED, OPEN, HALF_OPEN
def call(self, func):
if self.state == 'OPEN':
if time.time() - self.last_failure_time > self.timeout:
self.state = 'HALF_OPEN'
else:
raise CircuitOpenError("Circuit breaker is OPEN")
try:
result = func()
self.on_success()
return result
except Exception as e:
self.on_failure()
raise
def on_success(self):
self.failure_count = 0
self.state = 'CLOSED'
def on_failure(self):
self.failure_count += 1
self.last_failure_time = time.time()
if self.failure_count >= self.failure_threshold:
self.state = '
Установить api-integration-specialist в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл api-integration-specialist?
Expert guidance for designing, integrating, and maintaining third-party APIs with best practices for authentication, error handling, rate limiting, security, and data transformation. Use when integrating external APIs, troubleshooting API issues, implementing OAuth flows, handling webhooks, or building API wrappers and clients.
Как установить скилл api-integration-specialist?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-integration-specialist запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic