← Back to Skills Marketplace
honestqiao

API Doc Generator

by HonestQiao · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
715
Downloads
0
Stars
5
Active Installs
1
Versions
Install in OpenClaw
/install api-doc-generator
Description
Automatically generate OpenAPI/Swagger API documentation by analyzing function signatures and extracting parameter and return types from Python, JavaScript,...
README (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": {...} }
      }
    }
  }
}
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install api-doc-generator
  3. After installation, invoke the skill by name or use /api-doc-generator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug api-doc-generator
Version 1.0.0
License
All-time Installs 5
Active Installs 5
Total Versions 1
Frequently Asked Questions

What is API Doc Generator?

Automatically generate OpenAPI/Swagger API documentation by analyzing function signatures and extracting parameter and return types from Python, JavaScript,... It is an AI Agent Skill for Claude Code / OpenClaw, with 715 downloads so far.

How do I install API Doc Generator?

Run "/install api-doc-generator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is API Doc Generator free?

Yes, API Doc Generator is completely free (open-source). You can download, install and use it at no cost.

Which platforms does API Doc Generator support?

API Doc Generator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created API Doc Generator?

It is built and maintained by HonestQiao (@honestqiao); the current version is v1.0.0.

💬 Comments