← 返回 Skills 市场
api-integration - API 集成
作者
alsoforever
· GitHub ↗
· v1.0.0
· MIT-0
642
总下载
0
收藏
7
当前安装
1
版本数
在 OpenClaw 中安装
/install api-integration
功能描述
API 集成技能 - 掌握 RESTful API 调用、GraphQL 支持、API 认证管理等核心能力
使用说明 (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
状态: ✅ 学习完成
安全使用建议
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.
功能分析
Type: OpenClaw Skill
Name: api-integration
Version: 1.0.0
The skill bundle is purely educational, providing documentation and generic Python code snippets for RESTful API integration, OAuth2 authentication, and error handling. No functional code or malicious instructions were found in SKILL.md or _meta.json.
能力评估
Purpose & 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.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install api-integration - 安装完成后,直接呼叫该 Skill 的名称或使用
/api-integration触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
初始发布:RESTful/GraphQL/OAuth2 认证管理
元数据
常见问题
api-integration - API 集成 是什么?
API 集成技能 - 掌握 RESTful API 调用、GraphQL 支持、API 认证管理等核心能力. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 642 次。
如何安装 api-integration - API 集成?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install api-integration」即可一键安装,无需额外配置。
api-integration - API 集成 是免费的吗?
是的,api-integration - API 集成 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
api-integration - API 集成 支持哪些平台?
api-integration - API 集成 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 api-integration - API 集成?
由 alsoforever(@alsoforever)开发并维护,当前版本 v1.0.0。
推荐 Skills