api-integration - API 集成
API 集成技能 - 掌握 RESTful API 调用、GraphQL 支持、API 认证管理等核心能力
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 216 · 3 current installs · 3 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description promise REST, GraphQL, and auth features and the SKILL.md contains matching explanatory text and example code (REST call helper, OAuth token fetch, error handling). There are no unrelated requirements or surprising capabilities.
Instruction Scope
SKILL.md is high-level and provides Python examples using requests and shows OAuth client_id/client_secret usage. It does not instruct the agent to read unrelated files or exfiltrate data, but the examples imply handling credentials and making outbound HTTP requests; if the agent were to execute these examples it would perform network calls. The guidance is permissive (examples rather than strict runtime steps), so user-facing agents may ask for or be given API credentials to act on.
Install Mechanism
No install spec (instruction-only) — lowest risk. However, the examples assume a Python runtime and the requests library; those runtime dependencies are not declared. If the agent is expected to execute the example code, the environment must provide Python and requests, which the skill does not state.
Credentials
The skill declares no required env vars or credentials. Example code accepts client_id and client_secret parameters (logical for an API integration) but the skill does not request or store secrets itself. Users should be aware that using the examples requires supplying API credentials to the agent or runtime.
Persistence & Privilege
always:false and no install actions or config-path writes. The skill does not request persistent privileges or modify other skills or system settings.
Assessment
This skill is an instructional cookbook for calling APIs and appears coherent. Before enabling it: (1) remember it contains examples that, if executed, will make outbound HTTP requests and may require Python + the requests library (these are not declared); (2) never provide real client_id/client_secret or other secrets to an agent unless you trust it and have vetted where those credentials will be sent (the examples use a placeholder api.example.com); (3) if you expect the agent to run the sample code, ensure the runtime has the necessary dependencies and that outbound network traffic policies are acceptable.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
🔌 api-integration - API 集成技能
Slogan: 连接世界,集成万物
📋 技能描述
提供完整的 API 集成能力,从 RESTful 到 GraphQL, 帮助 AI Agent 快速接入第三方服务,扩展能力边界。
🎯 核心知识
1. RESTful API
HTTP 方法:
- GET - 获取资源
- POST - 创建资源
- PUT - 更新资源
- DELETE - 删除资源
状态码:
- 200 - 成功
- 201 - 创建成功
- 400 - 请求错误
- 401 - 未授权
- 404 - 资源不存在
- 500 - 服务器错误
2. 认证方式
| 方式 | 说明 | 安全性 |
|---|---|---|
| API Key | 简单密钥 | 中 |
| OAuth2 | 授权框架 | 高 |
| JWT | Token 认证 | 高 |
| Basic Auth | 基础认证 | 低 |
3. GraphQL
特点:
- 按需查询
- 强类型
- 单一端点
- 实时订阅
🛠️ 应用能力
能力 1:RESTful 调用
import requests
def call_api(endpoint, method='GET', data=None, headers=None):
response = requests.request(
method=method,
url=endpoint,
json=data,
headers=headers
)
response.raise_for_status()
return response.json()
能力 2:认证管理
# OAuth2 认证
def get_oauth_token(client_id, client_secret):
response = requests.post(
'https://api.example.com/oauth/token',
data={
'grant_type': 'client_credentials',
'client_id': client_id,
'client_secret': client_secret
}
)
return response.json()['access_token']
能力 3:错误处理
def safe_api_call(endpoint):
try:
return call_api(endpoint)
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
return {'error': 'Resource not found'}
elif e.response.status_code == 401:
return {'error': 'Unauthorized'}
else:
return {'error': str(e)}
💚 滚滚的话
好的 API 集成, 稳定、安全、高效。
滚滚陪你一起, 连接更多服务! 🔌💚
创建人: 滚滚 & 地球人
创建时间: 2026-03-15
状态: ✅ 学习完成
Files
1 totalSelect a file
Select a file to preview.
Comments
Loading comments…
