← 返回 Skills 市场
1757597031-maker

Skill2

作者 1757597031-maker · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
29
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install skill2
功能描述
自动解析代码或接口定义,生成结构清晰、格式规范的技术文档,包括参数说明、使用示例和依赖关系。
使用说明 (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
安全使用建议
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install skill2
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /skill2 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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.
元数据
Slug skill2
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Skill2 是什么?

自动解析代码或接口定义,生成结构清晰、格式规范的技术文档,包括参数说明、使用示例和依赖关系。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 29 次。

如何安装 Skill2?

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

Skill2 是免费的吗?

是的,Skill2 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Skill2 支持哪些平台?

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

谁开发了 Skill2?

由 1757597031-maker(@1757597031-maker)开发并维护,当前版本 v1.0.0。

💬 留言讨论