Skip to content
Back to skills

Auto Doc Ai

ASecurity

基于 AST 和 LLM 自动生成 Python 代码文档(Google Style docstring)。 自动分析代码结构,生成符合 Google Style 的 docstring。

  • 33 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 30, 2026
documentationpythongobash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 30, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill auto-doc-ai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Auto Doc Ai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Auto Doc Ai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-auto-doc-ai/badge)](https://www.skillsdirectory.com/skills/dvcrn-auto-doc-ai)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: auto-doc-ai
description: "基于 AST 和 LLM 自动生成 Python 代码文档(Google Style docstring)。 自动分析代码结构,生成符合 Google Style 的 docstring。"
---

# Auto Doc AI — 智能代码文档生成器

自动分析 Python 代码结构,生成符合 Google Style 的 docstring 文档。

## 功能特性

- 🔍 基于 AST 解析代码结构
- 🤖 智能函数/类/方法分析
- 📝 生成 Google Style docstring
- 📁 支持单文件或整个目录批量处理
- 🔄 支持增量更新(跳过已有文档的函数)

## 使用方法

### 为单个文件生成文档

```bash
/generate-docs /path/to/your_script.py
```

### 为整个目录生成文档

```bash
/generate-docs /path/to/src/ --recursive
```

### 强制更新已有文档

```bash
/generate-docs /path/to/src/ --overwrite
```

### 预览模式(不写入文件)

```bash
/generate-docs /path/to/your_script.py --dry-run
```

## 生成的文档格式示例

```python
def process_data(data, threshold=0.5):
    """处理输入数据并返回过滤后的结果。

    Args:
        data (list): 输入数据列表。
        threshold (float, optional): 过滤阈值,默认为 0.5。

    Returns:
        list: 过滤后的数据列表。

    Raises:
        ValueError: 如果数据格式无效。
    """
    pass
```

## 注意事项

- 仅支持 Python 3.7+ 的文件
- 建议先使用 `--dry-run` 预览生成的文档
- 使用 `--overwrite` 会替换所有现有 docstring

Files in this skill

  • README.md1.5 KB
  • SKILL.md1.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…