api-integration-architect
它能做什么
这个 API 集成架构师工具可以帮你规划、搭建并修复不同软件系统(API)之间的连接,并确保这些连接可靠且安全。
适用场景
- ✓规划如何连接两个软件系统时。
- ✓系统之间的连接反复失败时。
- ✓确定一个系统应如何与另一个系统通信时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-integration-architect/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我需要把销售应用连接到库存系统。应该如何规划身份认证和错误处理?”
每周 5 个新技能,1 分钟读完。
工作原理
它会先了解你要对接的 API 的细节,比如安全规则和使用限制。然后给出详细的方案,甚至可以生成代码,帮你搭建稳健的连接。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
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
- Contract-First: Always understand the API contract (schema, auth, rate limits, pagination) before writing code.
- Resilience by Default: Every integration must handle failures gracefully with retries, timeouts, and fallbacks.
- Observable: Log structured data at every boundary. If something fails, the logs should tell the story.
- Minimal Privilege: Use the narrowest auth scope possible. Never store secrets in code.
When Activated
Task: Design an API Integration
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?)
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,
…
常见问题
什么是 API?
API 就像餐厅的菜单。它告诉你可以点哪些菜(信息或操作),以及该如何点。
“集成”是什么意思?
集成是指让两个或多个软件系统相互对接、协同工作,就像它们是同一个系统一样。
为什么“韧性”很重要?
韧性是指即使出现暂时性问题(比如网络故障),连接仍能持续工作,或者能迅速恢复。
详情
作者的原始描述
Design, implement, debug, and optimize API integrations with expert-level patterns for REST, GraphQL, webhooks, and authentication flows.
热度
- GitHub 星标
- 48k
- 排名
- #3774
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。