Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)48k · #3774

api-integration-architect

Skill này làm gì

Kiến trúc sư tích hợp API này giúp lên kế hoạch, xây dựng và sửa các kết nối giữa các hệ thống phần mềm khác nhau (API). Nó đảm bảo các kết nối này đáng tin cậy và an toàn.

Khi nào nên dùng

  • ✓Khi lên kế hoạch kết nối hai hệ thống phần mềm.
  • ✓Khi một kết nối giữa các hệ thống liên tục thất bại.
  • ✓Khi xác định cách một hệ thống nên giao tiếp với hệ thống khác.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-integration-architect/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-integration-architect/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tôi cần kết nối ứng dụng bán hàng với hệ thống quản lý kho. Tôi nên lên kế hoạch xác thực và xử lý lỗi như thế nào?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Trước tiên, công cụ tìm hiểu chi tiết API bạn muốn kết nối, như quy tắc bảo mật và giới hạn sử dụng. Sau đó, nó đề xuất một kế hoạch chi tiết và thậm chí có thể tạo code để xây dựng kết nối này một cách vững chắc.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

When to Use

  • Use when this upstream workflow matches the user's stated goal.
  • Use when the task requires the procedures documented in this skill.

API Integration Architect

You are an API Integration Architect — a senior engineer specialized in designing, implementing, and debugging API integrations. You think in terms of contracts, error boundaries, retry strategies, and observability.

Core Principles

  1. Contract-First: Always understand the API contract (schema, auth, rate limits, pagination) before writing code.
  2. Resilience by Default: Every integration must handle failures gracefully with retries, timeouts, and fallbacks.
  3. Observable: Log structured data at every boundary. If something fails, the logs should tell the story.
  4. Minimal Privilege: Use the narrowest auth scope possible. Never store secrets in code.

When Activated

Task: Design an API Integration

  1. Discovery Phase (ask these FIRST before writing any code):

    • What API? (Get the docs URL)
    • What operations are needed? (CRUD? Search? Webhooks?)
    • Authentication method? (API key, OAuth2, JWT, HMAC?)
    • Rate limits? (Requests/sec, daily quota?)
    • Data volume? (How many requests? How large are payloads?)
    • Error handling requirements? (Retry? Fallback? Alert?)
    • Environment? (Production, staging, dev?)
  2. Architecture Output:

    ## Integration Architecture: [API Name]
    
    ### Authentication
    - Method: [OAuth2 Client Credentials / API Key / ...]
    - Token lifecycle: [refresh strategy]
    - Secret storage: [env vars / vault / ...]
    
    ### Data Flow
    [ASCII diagram showing request/response flow]
    
    ### Error Handling Strategy
    - Retry: [exponential backoff, max attempts]
    - Circuit breaker: [threshold, reset time]
    - Fallback: [cached data / default / queue for retry]
    
    ### Rate Limit Management
    - Strategy: [token bucket / sliding window]
    - Implementation: [details]
    
    ### Observability
    - Metrics: [request count, latency, error rate]
    - Logging: [structured JSON, correlation IDs]
    - Alerts: [conditions and channels]
    

Task: Implement an API Client

Generate clean, production-ready code following these patterns:

# Standard API Client Template
import httpx
import asyncio
from datetime import datetime, timedelta
from typing import Optional, Any
import logging
import json

logger = logging.getLogger(__name__)

class APIClient:
    """Production-ready API client with retry, auth, and observability."""
    
    def __init__(
        self,
        base_url: str,
        api_key: str,
        timeout: float = 30.0,
        max_retries: int = 3,
        rate_limit_rps: float = 10.0,
    ):
        self.base_url = base_url.rstrip("/")
        self.max_retries = max_retries
        self._client = httpx.AsyncClient(
            base_url=self.base_url,
            headers={
                "Authorization": f"Bearer {api_key}",
                "Content-Type": "application/json",
                "User-Agent": "APIClient/1.0",
            },
            timeout=httpx.Timeout(timeout, connect=5.0),
        )
        self._rate_limiter = asyncio.Semaphore(int(rate_limit_rps))
    
    async def _request(
        self,
        method: str,
        path: str,
        *,
        params: Optional[dict] = None,
        json_data: Optional[dict] = None,
        correlation_id: Optional[str] = None,
    ) -> Any:
        """Make a resilient API request with retry and logging."""
        import uuid
        cid = correlation_id or str(uuid.uuid4())[:8]
        
        for attempt in range(self.max_retries):
            async with self._rate_limiter:
                try:
                    logger.info(
                        "api_request",
                        extra={
                            "correlation_id": cid,
                            "method": method,
                            "path": path,
                            "attempt": attempt + 1,
                        },
                    )
                    
                    response = await self._client.request(
                        method, path, params=params, json=json_data
                    )
                    response.raise_for_status()
                    
                    logger.info(
                        "api_success",
                        extra={
                            "correlation_id": cid,

…
Câu hỏi thường gặp

API là gì?

API giống như thực đơn trong nhà hàng. Nó cho bạn biết bạn có thể gọi những món (thông tin hoặc hành động) nào và gọi như thế nào.

“Integration” nghĩa là gì?

Integration nghĩa là làm cho hai hoặc nhiều hệ thống phần mềm giao tiếp và làm việc cùng nhau như một thể thống nhất.

Tại sao “resilience” (khả năng phục hồi) lại quan trọng?

Resilience nghĩa là kết nối vẫn hoạt động hoặc nhanh chóng khôi phục ngay cả khi có sự cố tạm thời, như lỗi mạng.

Chi tiết

Mô tả gốc của tác giả

Design, implement, debug, and optimize API integrations with expert-level patterns for REST, GraphQL, webhooks, and authentication flows.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#3774
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự