跳到正文
cccskills
免费在 GitHub 公开

api-toolkit

通用 REST API 工具包,用于快速接入第三方服务、调试端点和构建自动化流程。

中文简介正在准备中。当前显示原文说明。

集成工具Telegram
查看安装方法

包含的文件(1)

  • SKILL.md2.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

API Toolkit Skill

通用 API 调用工具包,用于快速接入任何 RESTful API。

使用场景

  • 调用第三方 API 服务
  • 测试和调试 API 端点
  • 构建自动化工作流
  • 数据获取和同步

核心能力

1. HTTP 请求

# GET 请求
curl -s "https://api.example.com/endpoint" \
  -H "Authorization: Bearer $(pass show tokens/example-api)"

# POST 请求
curl -s -X POST "https://api.example.com/endpoint" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d '{"key": "value"}'

# 带查询参数
curl -s "https://api.example.com/search?q=query&limit=10"

2. 认证方式

方式示例
Bearer Token-H "Authorization: Bearer $TOKEN"
API Key Header-H "X-API-Key: $KEY"
Basic Auth-u "user:pass"
Query Param?api_key=$KEY

3. 响应处理

# JSON 解析
curl -s ... | jq '.data'

# 提取特定字段
curl -s ... | jq -r '.items[].name'

# 错误检查
response=$(curl -s -w "\n%{http_code}" ...)
body=$(echo "$response" | head -n -1)
code=$(echo "$response" | tail -n 1)

常用 API 模板

天气 API (wttr.in)

curl -s "wttr.in/Shanghai?format=j1" | jq '.current_condition[0]'

GitHub API

curl -s "https://api.github.com/users/USERNAME/repos" \
  -H "Authorization: token $(pass show tokens/github)"

Telegram Bot API

curl -s "https://api.telegram.org/bot$TOKEN/sendMessage" \
  -d "chat_id=$CHAT_ID" \
  -d "text=$MESSAGE"

安全注意事项

  1. 密钥管理 - 使用 pass 存储,不硬编码
  2. 日志脱敏 - 不在输出中显示完整密钥
  3. 速率限制 - 遵守 API 的调用频率限制
  4. 错误处理 - 检查响应状态码

添加新 API

  1. 获取 API 文档和密钥
  2. 存储密钥:pass insert tokens/new-api
  3. 测试基本调用
  4. 记录到 TOOLS.md

相关文件

  • TOOLS.md - 记录已配置的 API
  • SECURITY.md - 安全策略
  • memory/audit-*.log - 操作审计

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

监控 A 股基金实时估值与盘后净值,自动判断交易日并生成提醒或分析。

中文简介正在准备中。当前显示原文说明。

aAAaqwq/openclaw-team22026年6月18日 更新

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

中文简介正在准备中。当前显示原文说明。

aAAaqwq/openclaw-team22026年6月18日 更新

Expert sales execution covering pipeline management, discovery, demos, negotiation, and deal closing. Use when qualifying opportunities, running MEDDIC discovery, building account plans, handling objections, structuring proposals, or forecasting pipeline.

中文简介正在准备中。当前显示原文说明。

aAAaqwq/openclaw-team22026年6月18日 更新

Support accounting understanding from basic bookkeeping to professional practice and research.

中文简介正在准备中。当前显示原文说明。

aAAaqwq/openclaw-team22026年6月18日 更新

Automate ActiveCampaign tasks via Rube MCP (Composio): manage contacts, tags, list subscriptions, automation enrollment, and tasks. Always search tools first for current schemas.

中文简介正在准备中。当前显示原文说明。

aAAaqwq/openclaw-team22026年6月18日 更新

add-lead

免费

Add company/person/relationship to CRM

中文简介正在准备中。当前显示原文说明。

aAAaqwq/openclaw-team22026年6月18日 更新

查看 aAAaqwq 的全部技能

报告此技能的问题