api-integration
它能做什么
这项技能可以帮你设计不同计算机系统之间如何相互通信。它能规划数据的传递流程,例如消息投递系统,或者把多个工具连接起来。
适用场景
- ✓你需要连接两个或多个软件系统时。
- ✓你希望一个系统在某件事发生时通知另一个系统时。
- ✓你需要把数据从一个地方自动转移到另一个地方时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/api-integration/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“当我的网站产生新订单时,怎样让它通知我的库存系统?”
每周 5 个新技能,1 分钟读完。
工作原理
它会为数据在系统之间的传递定义“路径”。这可能包括发送消息(比如 webhook),或者设计一连串相互依赖的操作。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
API Integration Skill
When to Use
Use this skill when you need designs event-driven architectures, webhook systems, API chaining flows, ETL pipelines, and integration patterns between services. Use whenever the user asks about webhooks, event streaming, API composition, connecting two or more APIs, building pipelines, Pub/Sub, Kafka topics, ETL...
Design integration patterns, webhook flows, event pipelines, and API composition strategies.
Webhook Design
Outbound Webhook Endpoint (from your system to 3rd party)
POST {subscriber_url}
Headers:
Content-Type: application/json
X-Webhook-Signature: sha256=<sig>
X-Webhook-Event: order.created
X-Webhook-Delivery: <uuid>
X-Webhook-Timestamp: <unix-epoch>
Payload envelope
{
"event": "order.created",
"delivery_id": "uuid",
"created_at": "ISO8601",
"data": { ... }
}
Signature verification (receiver side):
import hmac, hashlib
expected = hmac.new(secret.encode(), payload_bytes, hashlib.sha256).hexdigest()
# webhook-signature-example: do not use assert for an authorization boundary
if not hmac.compare_digest(f"sha256={expected}", request.headers.get("X-Webhook-Signature", "")):
raise ValueError("Invalid webhook signature")
Inbound Webhook Registration API
POST /api/v1/webhooks — register subscriber URL + events
GET /api/v1/webhooks — list subscriptions
DELETE /api/v1/webhooks/{id} — unsubscribe
POST /api/v1/webhooks/{id}/test — fire test event
GET /api/v1/webhooks/{id}/deliveries — delivery history + status
API Chaining / Composition Pattern
Step 1: POST /auth/token → get access_token
Step 2: GET /api/v1/user/profile → get user.id (use token from step 1)
Step 3: POST /api/v1/orders → create order (use user.id from step 2)
Step 4: POST /api/v1/payments → charge (use order.id from step 3)
Always: handle failures at each step independently, use idempotency keys, implement retry with exponential backoff.
Event-Driven Architecture
Event Schema (CloudEvents spec)
{
"specversion": "1.0",
"type": "com.example.order.created",
"source": "/orders-service",
"id": "uuid",
"time": "2024-01-01T00:00:00Z",
"datacontenttype": "application/json",
"data": { "order_id": "...", "amount": 99.99 }
}
Topics / Queues design
| Topic | Producers | Consumers | Retention |
|---|---|---|---|
orders.created |
orders-svc | payments-svc, email-svc | 7 days |
payments.completed |
payments-svc | orders-svc, ledger-svc | 30 days |
users.deleted |
users-svc | all services | 90 days |
Saga Pattern (Distributed Transaction)
Choreography saga for order checkout:
1. orders-svc emits order.created
2. inventory-svc reserves stock → emits inventory.reserved
3. payments-svc charges card → emits payment.completed
4. orders-svc emits order.confirmed
On failure at step 3:
← payments-svc emits payment.failed
← inventory-svc releases stock (compensating transaction)
← orders-svc emits order.cancelled
Outbox Pattern (reliable event publishing)
-- Transactional outbox table
CREATE TABLE outbox_events (
id UUID PRIMARY KEY,
aggregate_type VARCHAR,
aggregate_id UUID,
event_type VARCHAR,
payload JSONB,
created_at TIMESTAMP,
published_at TIMESTAMP NULL
);
-- Write to DB + outbox in same transaction
-- Separate publisher polls outbox and sends to message broker
Integration Checklist
- Idempotency keys on all state-changing calls
- Retry with exponential backoff (base 1s, max 60s, jitter)
- Circuit breaker (open after 5 failures in 10s)
- Dead-letter queue for unprocessable events
- Webhook delivery logging + manual replay endpoint
- Schema versioning on all events
- Correlation IDs on all inter-service calls
Handoff
Report the event schemas, delivery/retry policy, idempotency and compensation boundaries, and the checks actually performed. Signature verification also needs the provider's current protocol, bounded input, timestamp/replay protection and an authorized test endpoint. A design is not evidence that an integration or payment ran.
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
…
常见问题
什么是 webhook?
它就像一条自动通知:当某件重要的事情发生时(比如有新订单),一个系统会自动把消息发送给另一个系统。
什么是“API 链式调用”(API Chaining)?
它是把多个 API 调用按顺序连接起来的方式,前一个调用的结果会用于后一个调用,就像按照食谱一步一步操作。
什么是“事件驱动架构”(Event-Driven Architecture)?
它是一种设计风格,系统会对“事件”(也就是发生的事情)做出反应,而不是被直接控制。你可以把它想象成:某个系统只有收到通知时才会行动。
详情
作者的原始描述
Designs event-driven architectures, webhook systems, API chaining flows, ETL pipelines, and integration patterns between services.
热度
- GitHub 星标
- 48k
- 排名
- #3772
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。