Auto Doc Script
This skill helps you maintain high-quality documentation for your scripts and directories.
Capabilities
- Inline Documentation: Applies Google-style docstrings to Python functions and classes.
- Directory README: Generates a
README.mdfor the current directory summarizing all scripts.
Workflows
Documenting a Single Script
When a user asks to "document a script" or "apply Google style":
- Read the script content.
- Refer to google_style.md for the exact format.
- Update the docstrings in the script.
Generating a Directory README
When a user asks to "summarize this directory" or "create a README":
- List all scripts in the directory.
- For each script, extract a brief summary (first line of docstring or comment).
- Use the template readme_template.md to generate the final
README.md. - Replace
{{DIR_NAME}},{{DESCRIPTION}}, and{{SCRIPT_LIST}}with actual data.
Tips
- Always check if the file is Python (
.py) or Bash (.sh) before applying styles. - If the user doesn't specify a style, default to Google Style for Python.