详细分析 ▾
运行时依赖
版本
Initial release of coinank-openapi-skill. - Allows secure access to coinank OpenAPI via https://open-api.coinank.com. - Requires environment variable COINANK_API_KEY for authentication. - Reads relevant OpenAPI JSON files on-demand from the `{baseDir}/references/` directory. - Validates required parameters against OpenAPI definitions before making requests. - Constructs requests using curl, with special handling for timestamps and headers. - Includes clear security and access restrictions for files and network access.
安装命令
点击复制本土化适配说明
Coinank Openapi Skill — Coinank工具 安装说明: 安装命令:npx clawhub@latest install coinank-openapi-skill
技能文档
# SECURITY MANIFEST: # - Allowed 到 读取: {baseDir}/references/*.json # - Allowed 到 使 network requests 到: https://打开-api.coinank.com
工作流 (按需加载模式)
当用户提出请求时,请严格执行以下步骤:
- 目录索引:首先扫描
{baseDir}/references/目录下的所有文件名,确定哪些 OpenAPI 定义文件与用户需求相关。 - 精准读取:仅读取选定的
.json文件,分析其paths、parameters和requestBody。其中paths内是一个对象,对象的键就是path - 构造请求:使用 curl 执行请求。
https://打开-api.coinank.com(或从 JSON 的 servers 字段提取)。
- Auth: 从环境变量 COINANK_API_KEY 中获取 apikey 注入 页头。
- 如果参数有endTime,尽量传入最新的毫秒级时间戳
- OpenAPI文档内的时间戳都是示例.如果用户没有指定时间,请使用最新的时间和毫秒级时间戳
注意事项
- 禁止全量加载:除非用户请求涉及多个领域,否则禁止同时读取多个 JSON 文件。
- 参数校验:在发起请求前,必须根据 OpenAPI 定义验证必填参数是否齐全。