← 返回 Skills 市场
honestqiao

API Doc Generator

作者 HonestQiao · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
715
总下载
0
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install api-doc-generator
功能描述
Automatically generate OpenAPI/Swagger API documentation by analyzing function signatures and extracting parameter and return types from Python, JavaScript,...
使用说明 (SKILL.md)

API Doc Generator

自动从代码生成 API 文档。

功能

  • 分析代码中的函数/方法签名
  • 自动提取参数和返回值类型
  • 生成 OpenAPI/Swagger 格式文档
  • 支持 Python、JavaScript、TypeScript、Go

触发词

  • "生成API文档"
  • "API文档"
  • "生成接口文档"
  • "openapi"
  • "swagger"

示例

用户: 帮我把这个Python函数生成API文档
助手: (使用此skill生成OpenAPI文档)

输出格式

{
  "openapi": "3.0.0",
  "info": { "title": "API", "version": "1.0.0" },
  "paths": {
    "/users": {
      "get": {
        "summary": "获取用户列表",
        "parameters": [...],
        "responses": { "200": {...} }
      }
    }
  }
}
安全使用建议
This skill is plausible but under-specified. The embedded implementation is a tiny JavaScript snippet that uses a crude regex and references undefined helpers (so it cannot actually handle the multi-language, type-aware extraction the description promises). Before installing or using it: (1) don't assume accuracy — test the skill on non-sensitive sample code and manually review generated OpenAPI output; (2) ask the publisher for the full implementation or source code and for details on how it handles complex types, annotations, and language-specific idioms; (3) avoid submitting confidential code to the skill until you confirm where parsing/execution happens (locally vs. external); and (4) prefer a skill that documents its parsing strategy, limitations, and test coverage. If you want a ready-to-use tool, consider well-known, open-source generators with visible implementations rather than this minimal, overpromising instruction-only skill.
功能分析
Type: OpenClaw Skill Name: api-doc-generator Version: 1.0.0 The skill is designed to analyze user-provided code, but its implementation in `skill.yaml` directly applies a regular expression (`code.match()`) to the input `code` string. While the regex itself is simple, this pattern of directly processing arbitrary user input with regex without robust parsing or sanitization can introduce a Regular Expression Denial of Service (ReDoS) vulnerability, classifying it as suspicious due to a potential flaw that allows an attack.
能力评估
Purpose & Capability
The stated purpose (generate OpenAPI/Swagger from code) matches the skill's name and instructions, and the skill requests no unrelated credentials or system access. However the embedded implementation is highly simplistic (a single regex) and does not substantiate the claimed multi-language, type-aware support; helper functions (e.g., extractParams) are referenced but not provided. The capability is therefore overclaimed compared to what is shown.
Instruction Scope
SKILL.md is narrowly scoped to generating OpenAPI output and does not instruct the agent to read unrelated files, access environment variables, or transmit data externally. But the runtime guidance is minimal and vague about how code is supplied, how complex types or DTOs are handled, and how return types are inferred — giving the skill wide interpretive latitude that could produce incorrect results.
Install Mechanism
There is no install spec and no code files to be written to disk; this is an instruction-only skill, which reduces installation risk.
Credentials
The skill declares no required environment variables, credentials, or config paths — proportional for a documentation generator. Nothing asks for unrelated secrets or system credentials.
Persistence & Privilege
The skill is not marked always:true and does not request persistent/system-wide changes. It is user-invocable and can be invoked autonomously (platform default), which is expected for skills.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install api-doc-generator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /api-doc-generator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of API Doc Generator. - Automatically generates API documentation from code. - Supports extraction of function/method signatures, parameters, and return types. - Generates documentation in OpenAPI/Swagger format. - Compatible with Python, JavaScript, TypeScript, and Go source code. - Includes trigger words in Chinese for easy activation.
元数据
Slug api-doc-generator
版本 1.0.0
许可证
累计安装 5
当前安装数 5
历史版本数 1
常见问题

API Doc Generator 是什么?

Automatically generate OpenAPI/Swagger API documentation by analyzing function signatures and extracting parameter and return types from Python, JavaScript,... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 715 次。

如何安装 API Doc Generator?

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

API Doc Generator 是免费的吗?

是的,API Doc Generator 完全免费(开源免费),可自由下载、安装和使用。

API Doc Generator 支持哪些平台?

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

谁开发了 API Doc Generator?

由 HonestQiao(@honestqiao)开发并维护,当前版本 v1.0.0。

💬 留言讨论