← 返回 Skills 市场
minusgod

swagger-skill

作者 MinusGod · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
982
总下载
1
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install swagger-skill
功能描述
智能 Swagger API 查询和调用工具。通过自然语言指令直接查询接口详情、调用 API,无需繁琐的交互步骤。
安全使用建议
What to consider before installing/using this skill: - It is coherent with its description: it loads a Swagger/OpenAPI document and issues HTTP requests to the APIs it finds. The required node runtime and axios/form-data deps match that purpose. - The skill auto-installs npm dependencies by running npm init and npm install in the skill folder the first time it runs. That will write files and fetch packages from the npm registry — run it in a controlled environment (sandbox/container) if you are concerned about additional code being installed. - The skill will perform arbitrary HTTP requests to URLs you provide — this is necessary to call APIs but can be abused to reach internal endpoints (SSRF-like exposure). Do NOT supply sensitive machine credentials or environment tokens (e.g., cloud metadata tokens, admin credentials) to the skill unless you fully trust the runtime and the target API. - You may want to inspect the full index.js (the uploaded snippet shows a truncated upload function) to ensure there are no unexpected behaviors or logging/exfiltration paths before running it with real credentials. - If you want to reduce risk: run the skill in an isolated container, avoid pasting production secrets into the CLI, and prefer calling it against known external Swagger endpoints rather than internal network addresses. If you want, I can: (1) review the remaining/truncated portion of index.js for any networking or file I/O not yet shown, (2) list the exact npm commands it will run, or (3) suggest a hardened execution checklist for running this skill safely.
功能分析
Type: OpenClaw Skill Name: swagger-skill Version: 1.0.1 The skill is classified as suspicious due to its inherent risky capabilities, which could be exploited by a malicious agent prompt. Specifically, the `uploadFile` function in `index.js` allows reading arbitrary local files (e.g., sensitive configuration or credential files) from the filesystem via `fs.createReadStream` for upload. While this is an intended feature for file uploads, it provides a powerful primitive for data exfiltration if the agent is instructed to read sensitive paths and send them to an attacker-controlled endpoint. Additionally, the skill uses `child_process.execSync` for dependency installation in `index.js`, which, while not directly vulnerable to user input in this context, is a risky primitive. The core functionality of making arbitrary network requests to user-specified URLs (`fetchSwaggerSpec`, `callAPI`) also presents a risk for SSRF or data exfiltration if abused by an agent.
能力评估
Purpose & Capability
Name and description (Swagger/OpenAPI query and call) align with the code and SKILL.md. Requiring node and using axios/form-data is expected for this functionality. The code implements indexing, searching, calling, token/cookie auth and a CLI as described.
Instruction Scope
Runtime instructions and code only perform Swagger spec fetching, indexing, search and HTTP calls. They do not attempt to read unrelated host files or request unrelated credentials. Important caveat: the skill will make arbitrary network requests to URLs provided by the user (the Swagger spec URL and any API endpoints it calls), which means it can access internal network endpoints (e.g., metadata services, internal APIs) if given those URLs or if an agent is instructed to use them.
Install Mechanism
There is no external install spec, but index.js will auto-initialize package.json and run npm install via execSync if dependencies are missing. This writes files and downloads packages from the npm registry at runtime. That behavior is documented in SKILL.md (it claims to auto-install axios and form-data), but it raises moderate risk because it executes shell commands and pulls third-party packages at runtime.
Credentials
The skill does not request environment variables, credentials, or config paths in the registry metadata. It accepts user-supplied tokens/cookies for the APIs it calls (which is appropriate). There are no unrelated credentials required.
Persistence & Privilege
always is false and the skill does not request elevated platform privileges. It does write package.json and install deps in its own directory at first run (self-contained). It does not alter other skills' configurations or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install swagger-skill
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /swagger-skill 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
swagger-skill 1.0.1 - 使用说明优化:无需手动安装依赖(axios、form-data),首次运行会自动检测并安装,自动配置 package.json(含 "type": "module")。 - 安装文档中新增自动初始化和依赖处理说明,提升使用便捷性。 - 其余功能和接口保持兼容。
v1.0.0
swagger-skill 1.0.0 初始发布 - 提供一键查询、自然语言搜索和智能 API 调用,无需繁琐交互流程 - 支持完整接口信息展示,包括参数、请求体、响应和数据模式定义 - 兼容 OpenAPI 3.0 和 Swagger 2.0,支持多种认证方式(Token、Cookie、或无需认证) - 内置分层缓存机制,高效索引和 O(1) 接口详情查找 - 丰富 API:快速加载规范、搜索、获取详情、自然语言调用和文件上传等 - 提供交互式 CLI 工具,便于快速操作
元数据
Slug swagger-skill
版本 1.0.1
许可证
累计安装 0
当前安装数 0
历史版本数 2
常见问题

swagger-skill 是什么?

智能 Swagger API 查询和调用工具。通过自然语言指令直接查询接口详情、调用 API,无需繁琐的交互步骤。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 982 次。

如何安装 swagger-skill?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install swagger-skill」即可一键安装,无需额外配置。

swagger-skill 是免费的吗?

是的,swagger-skill 完全免费(开源免费),可自由下载、安装和使用。

swagger-skill 支持哪些平台?

swagger-skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 swagger-skill?

由 MinusGod(@minusgod)开发并维护,当前版本 v1.0.1。

💬 留言讨论