GO

google-docstring-assistant

Assists in writing Python docstrings following the Google Style Guide.

Install

mkdir -p .claude/skills/google-docstring-assistant && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18091" && unzip -o skill.zip -d .claude/skills/google-docstring-assistant && rm skill.zip

Installs to .claude/skills/google-docstring-assistant

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Write Python docstrings following the Google Python Style Guide, using clear sections and examples.
99 charsno explicit “when” trigger
Beginner

Key capabilities

  • Write docstrings following Google Python Style Guide
  • Include `Args`, `Returns`, and `Raises` sections for functions
  • Use `Attributes` and `Todo` sections for modules/classes
  • Format `Examples` blocks with literal blocks for code snippets
  • Document module-level variables consistently
  • Keep docstrings concise and informative

How it works

The skill guides the user to write Python docstrings according to the Google Python Style Guide, ensuring clear sections and examples.

Inputs & outputs

You give it
Python code requiring docstrings
You get back
Formatted Python docstrings adhering to Google style

When to use google-docstring-assistant

  • Document a function
  • Generate class attributes doc
  • Add examples to documentation
  • Standardize docstring style

About this skill

Google Docstring Assistant

Quick start

  • Write docstrings using the Google Python Style Guide structure (Args, Returns, Raises, Examples, Attributes, etc.).
  • Keep sections as headers followed by indented blocks; break sections by resuming unindented text.
  • When types are annotated in code, omit them in docstrings unless clarity is improved.
  • Use Examples blocks with literal blocks (::) for commands or code snippets.
  • Document module-level variables consistently (all in Attributes or inline), and list TODOs in a Todo section.
  • See references/google_docstring_rules.md for full guidance and examples.

Workflow

  1. Choose sections

    • Functions: include Args, Returns, and Raises as needed.
    • Modules/classes: use Attributes and Todo when relevant; keep formatting consistent.
  2. Write clearly

    • One docstring per object; keep it concise and informative.
    • Use indentation under each section header; separate sections by returning to unindented text.
    • Prefer Google-style wording; avoid duplicating annotated types unless helpful.
  3. Examples and scripts

    • Use Examples: with indented literal blocks for shell commands or code snippets.
    • Include multi-line descriptions when needed; keep formatting readable.

Reference

  • references/google_docstring_rules.md: full style description and examples.

When not to use it

  • When types are annotated in code and clarity is not improved by repeating them in docstrings
  • When using non-Google-style wording

Limitations

  • Does not automatically generate docstrings
  • Requires manual selection of sections
  • Requires manual writing of clear and concise content

How it compares

This skill enforces a specific, consistent style for Python docstrings, improving readability and maintainability compared to ad-hoc documentation.

Compared to similar skills

google-docstring-assistant side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
google-docstring-assistant (this skill)01moNo flagsBeginner
agent-implementer-sparc-coder15moReviewIntermediate
nia-docs16moReviewBeginner
skills02moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry