← Back to Skills Marketplace
api-integration - API 集成
by
alsoforever
· GitHub ↗
· v1.0.0
· MIT-0
642
Downloads
0
Stars
7
Active Installs
1
Versions
Install in OpenClaw
/install api-integration
Description
API 集成技能 - 掌握 RESTful API 调用、GraphQL 支持、API 认证管理等核心能力
README (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
状态: ✅ 学习完成
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install api-integration - After installation, invoke the skill by name or use
/api-integration - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
初始发布:RESTful/GraphQL/OAuth2 认证管理
Metadata
Frequently Asked Questions
What is api-integration - API 集成?
API 集成技能 - 掌握 RESTful API 调用、GraphQL 支持、API 认证管理等核心能力. It is an AI Agent Skill for Claude Code / OpenClaw, with 642 downloads so far.
How do I install api-integration - API 集成?
Run "/install api-integration" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is api-integration - API 集成 free?
Yes, api-integration - API 集成 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does api-integration - API 集成 support?
api-integration - API 集成 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created api-integration - API 集成?
It is built and maintained by alsoforever (@alsoforever); the current version is v1.0.0.
More Skills