auto-doc-ai
基于 AST 和 LLM 自动生成 Python 代码文档(Google Style docstring)。 自动分析代码结构,生成符合 Google Style 的 docstring。
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/antonia-sz/auto-doc-aiWhat This Skill Does
Auto Doc AI is a powerful productivity tool for Python developers, designed to automate the often tedious task of writing documentation. By leveraging Abstract Syntax Tree (AST) analysis combined with Large Language Models (LLM), this skill scans your Python codebase to understand the structure, parameters, and return types of your classes and functions. It then generates high-quality, professional docstrings following the industry-standard Google Style guide. Whether you are working on a small script or a sprawling enterprise codebase, Auto Doc AI ensures your project remains well-documented without requiring manual intervention, significantly reducing technical debt.
Installation
To integrate this skill into your OpenClaw environment, execute the following command in your terminal:
clawhub install openclaw/skills/skills/antonia-sz/auto-doc-ai
Ensure that you have sufficient permissions for your workspace, as the skill will require read and write access to your Python files to parse code and inject documentation.
Use Cases
- Legacy Code Refactoring: Automatically generate documentation for undocumented legacy Python projects to improve maintainability and onboarding for new team members.
- CI/CD Pipelines: Integrate the tool into your pre-commit hooks or CI process to ensure every new function adheres to documentation standards before being merged into the main branch.
- Open Source Maintenance: Quickly generate clear documentation for public repositories to improve user experience and adoption.
- Rapid Prototyping: Save time during the development phase by letting the agent document your functions as you finalize your logic.
Example Prompts
- "Analyze the file at ./services/processor.py and add Google Style docstrings to all functions missing them."
- "Run the auto-doc-ai tool on the entire /src folder recursively, but use the --dry-run flag first so I can review the changes."
- "Update the docstrings in models.py, and please use the --overwrite flag to refresh any existing outdated documentation."
Tips & Limitations
- Safety First: Always run the command with the
--dry-runflag before applying changes. This allows you to verify the LLM's output against your coding standards. - Incremental Updates: Use the default mode to skip existing docstrings, which saves tokens and prevents accidental overwriting of manually curated comments.
- Python Compatibility: This tool is designed for Python 3.7+ syntax. Codebases utilizing older syntax or highly unconventional dynamic programming patterns may produce less accurate results.
- Review: Always manually audit complex methods where business logic is intricate to ensure the AI's interpretation of the function's side effects is accurate.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-antonia-sz-auto-doc-ai": {
"enabled": true,
"auto_update": true
}
}
}Tags
Flags: file-write, file-read, code-execution
Related Skills
designer-intelligence-station
Designer intelligence collection tool. Monitors 46 public sources (AI/hardware/mobile/design), dynamic quality-based filtering v2.1.8, generates structured daily/weekly reports. All data stored locally.
ai-workflow-red-team-lite
对 AI 自动化流程做轻量红队演练,聚焦误用路径、边界失败和数据泄露风险。;use for red-team, ai, workflow workflows;do not use for 输出可直接滥用的攻击脚本, 帮助破坏系统.
soul-weaver
AI Soul Weaver - 12 Curated Celebrity Templates + Custom Generation. Generate OpenClaw agent configurations through dialog or select from 12 world-famous tech & business leaders.
style-cloner
提供1-5篇参考文章 + 原始素材,AI 分析参考文章的风格特征, 将素材改写成同风格的成品文章,输出3个版本供选择,支持强度调节和迭代优化。
harmonia
Check PyTorch, Transformers, and CUDA compatibility. Detect GPU, driver mismatches, and version conflicts in ML environments. Use when the user sets up ML/AI tools, installs torch or transformers, hits dependency errors, or asks about compatible versions.