← Back to Skills Marketplace
1757597031-maker

Skill2

by 1757597031-maker · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
29
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install skill2
Description
自动解析代码或接口定义,生成结构清晰、格式规范的技术文档,包括参数说明、使用示例和依赖关系。
README (SKILL.md)

---\r \r name: doc-autogen\r \r description: 根据代码或接口定义自动生成清晰的技术文档,包括 API 参考、函数说明、使用示例和依赖关系。\r \r version: 1.0.0\r \r author: your-name\r \r tags:\r \r - documentation\r \r - api\r \r - code-generation\r \r triggers:\r \r - 生成文档\r \r - 写API文档\r \r - generate documentation\r \r - document this code\r \r ---\r \r \r \r # Doc-Autogen Skill\r \r \r \r ## 描述\r \r 这是一个智能文档生成技能,能够解析代码、函数签名或 API 定义,自动生成结构清晰、格式规范的技术文档,包括概述、参数说明、使用示例和注意事项。\r \r \r \r ## 使用场景\r \r 当用户提供代码文件、函数签名、OpenAPI/Swagger 定义,或要求为项目生成技术文档时激活。\r \r \r \r ## 工作流程\r \r \r \r ### 第一步:解析输入内容\r \r 识别用户提供的输入类型,选择对应的解析策略:\r \r \r \r 1. **函数/类代码**\r \r - 提取函数名、参数列表、返回值类型\r \r - 识别异常抛出\r \r - 分析依赖关系(导入的模块)\r \r \r \r 2. **OpenAPI/Swagger JSON/YAML**\r \r - 解析端点定义(URL、HTTP 方法)\r \r - 提取请求/响应模式\r \r - 识别认证方式\r \r \r \r 3. **纯文本描述**\r \r - 根据用户描述补全为标准技术文档格式\r \r - 引导用户提供必要信息\r \r \r \r ### 第二步:生成文档结构\r \r 根据解析结果,自动生成以下章节:\r \r \r \r #### 基础结构\r \r - **概述(Overview)**:模块或接口的核心作用和业务场景\r \r - **语法/端点(Syntax/Endpoint)**:函数签名或 API 地址\r \r \r \r #### 详细说明\r \r - **参数表(Parameters)**:使用表格列出所有参数\r \r | 参数名 | 类型 | 必选 | 默认值 | 描述 |\r \r |---|---|---|---|---|\r \r | param1 | string | 是 | - | 参数说明 |\r \r - **返回值/响应示例**:成功和失败的返回格式\r \r - **调用示例**:至少一个可运行的代码示例\r \r \r \r #### 扩展信息\r \r - **注意事项**:错误码、限流策略、版本兼容性、性能建议\r \r - **依赖关系**:所需的外部库或服务\r \r \r \r ### 第三步:格式化输出\r \r - 使用 Markdown 格式,确保可读性\r \r - 合理使用表格、代码块、列表\r \r - 保持语言简洁、无歧义\r \r \r \r ### 第四步:生成完整文档(多文件场景)\r \r 如果用户提供多个文件或模块:\r \r - 生成带目录的完整文档集\r \r - 自动交叉引用相关模块\r \r - 创建索引页方便导航\r \r \r \r ## 注意事项\r \r - 如果参数类型不明确,标注为 "待定" 并提示用户补充\r \r - 对于复杂嵌套对象,提供 JSON Schema 或类型定义\r \r - 如果用户要求"输出为 PDF/HTML",则在纯文本下提供转换命令建议(如 pandoc)\r \r \r \r ## 输出格式示例\r \r

\r
\# API 文档:用户管理模块\r
\r
\r
\r
\## 概述\r
\r
提供用户注册、登录和资料查询功能。\r
\r
\r
\r
\## 函数:register\_user\r
\r
\r
\r
\### 语法\r
\r
```python\r
\r
def register\_user(username: str, email: str, password: str) -> dict\r
\r
Usage Guidance
Install this if you want a Chinese-language helper for generating Markdown technical documentation. Review the generated documentation before using it, especially for code or API details, and be aware that broad trigger phrases may route general documentation requests to this skill.
Capability Assessment
Purpose & Capability
The stated purpose is to generate technical documentation from code, function signatures, OpenAPI/Swagger definitions, or text descriptions, and the instructions stay within that documentation workflow.
Instruction Scope
The trigger phrases include general documentation requests, and most instructions are in Chinese; these are routing and comprehension concerns rather than evidence of hidden or unsafe behavior.
Install Mechanism
The artifact is a single SKILL.md file with no scripts or dependencies. The visible frontmatter appears escaped, so metadata parsing may be imperfect, but this does not add runtime authority.
Credentials
The skill does not request API keys, local credentials, network access, broad filesystem access, or privileged environment capabilities.
Persistence & Privilege
There is no persistence mechanism, background process, privilege escalation, or automatic mutation; the only command-like content is a suggestion to provide conversion commands if the user asks for PDF or HTML output.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install skill2
  3. After installation, invoke the skill by name or use /skill2
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
doc-autogen v1.0.0 initial release - Automatically generates clear technical documentation from code, function signatures, or API definitions. - Supports parsing source code, OpenAPI/Swagger specs, and natural language descriptions. - Produces structured Markdown documentation with overview, syntax or endpoint, parameter tables, return examples, usage samples, and more. - Handles multi-file or multi-module projects, generating cross-linked documentation sets and index pages. - Includes guidance for handling unclear parameter types and output conversion tips.
Metadata
Slug skill2
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Skill2?

自动解析代码或接口定义,生成结构清晰、格式规范的技术文档,包括参数说明、使用示例和依赖关系。 It is an AI Agent Skill for Claude Code / OpenClaw, with 29 downloads so far.

How do I install Skill2?

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

Is Skill2 free?

Yes, Skill2 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Skill2 support?

Skill2 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Skill2?

It is built and maintained by 1757597031-maker (@1757597031-maker); the current version is v1.0.0.

💬 Comments