安全扫描
OpenClaw
可疑
high confidenceThe skill advertises a full-featured API-docs parser for many frameworks, but the included code is a tiny static shell stub and does not implement the claimed capabilities.
评估建议
This package advertises a powerful automatic API-docs generator but includes only a tiny shell script that emits a static OpenAPI JSON — it does not implement the parsing, framework support, or route detection described. Treat it as a stub or placeholder rather than a working tool. Before installing or running it on real projects: (1) inspect the script (you already can — it's short) to confirm behavior; (2) do not run untrusted tools against sensitive repositories without sandboxing, because a ...详细分析 ▾
⚠ 用途与能力
The SKILL.md describes automated parsing of source comments, route detection, support for many frameworks, OpenAPI/Swagger generation and Postman export. The only code file (api-docs-generator.sh) writes a hard-coded OpenAPI JSON and does not parse input sources or implement any framework-specific logic. The README examples call a command name (api-docs-generator) while the repo supplies api-docs-generator.sh — a naming/installation mismatch. This is disproportionate: the requested/installed artifacts do not match the advertised capability.
ℹ 指令范围
The SKILL.md gives CLI usage examples that would read a source directory and produce documentation, but it does not instruct the agent to read unrelated files, environment variables, or send data externally. However, because the actual script is a stub, the documentation examples are misleading; a user or agent expecting real parsing would be surprised. There are no instructions that clearly exfiltrate data.
✓ 安装机制
No install specification or network downloads are present; the skill is instruction-only with a small bundled shell script. This is low install risk (nothing downloaded from external URLs).
✓ 凭证需求
The skill declares no required environment variables, credentials, or config paths. The SKILL.md and the included script do not request secrets or unrelated credentials.
✓ 持久化与权限
The skill does not request always:true or other elevated persistence. It does not modify other skills or system-wide configuration in the provided materials.
安全有层次,运行前请审查代码。
运行时依赖
无特殊依赖
版本
latestv1.0.02026/3/2
- Initial release of api-docs-generator. - Automatically generates API documentation from code comments. - Supports OpenAPI 3.0 and Swagger 2.0 formats. - Outputs documentation in JSON or YAML. - Exports Postman Collections. - Framework support includes Express.js, FastAPI, Flask, Gin, Spring Boot, and Rails.
● 可疑
安装命令 点击复制
官方npx clawhub@latest install api-docs-generator
镜像加速npx clawhub@latest install api-docs-generator --registry https://cn.clawhub-mirror.com
技能文档
自动从源代码生成专业的 API 文档。支持 OpenAPI 3.0 和 Swagger 2.0 规范。
功能
- 📝 自动解析代码注释
- 🌐 OpenAPI 3.0 支持
- 📄 Swagger 2.0 支持
- 📋 Postman Collection 导出
- 🔄 自动检测 API 路由
- 📖 生成可交互文档
支持的框架
| 框架 | 支持 |
|---|---|
| Express.js | ✅ |
| FastAPI | ✅ |
| Flask | ✅ |
| Gin | ✅ |
| Spring Boot | ✅ |
| Rails | ✅ |
使用方法
基本用法
# 生成 OpenAPI 文档
api-docs-generator openapi --input ./src --output docs/openapi.json# 生成 Swagger 文档
api-docs-generator swagger --input ./src --output docs/swagger.yaml
# 生成 Postman Collection
api-docs-generator postman --input ./src --output docs/collection.json
选项
| 选项 | 说明 |
|---|---|
--input, -i | 源代码目录 |
--output, -o | 输出文件路径 |
--format, -f | 输出格式 (json/yaml) |
--title | API 标题 |
--version | API 版本 |
输出示例
{
"openapi": "3.0.0",
"info": {
"title": "My API",
"version": "1.0.0",
"description": "API description"
},
"paths": {
"/api/users": {
"get": {
"summary": "Get all users",
"description": "Returns a list of users",
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": { "$ref": "#/components/schemas/User" }
}
}
}
}
}
}
}
}
}
文档展示
生成的文档可以用于:
- Swagger UI
- Redoc
- Postman
- Apiary
变现思路
- 付费模板 - 专业化文档模板
- 企业服务 - 为企业定制 API 文档
- 集成服务 - 与 GitHub/GitLab 集成
- 培训服务 - API 文档编写培训
示例
Express.js 项目
api-docs-generator openapi \
--input ./server \
--output ./docs/openapi.json \
--title "My API" \
--version "1.0.0"
FastAPI 项目
api-docs-generator openapi \
--input ./app \
--output ./docs/api.yaml \
--format yaml
安装
# 无需额外依赖
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制