AgentSkillsCN

document-python-component

为公共模块、类、函数、方法与属性编写或升级传统的 Python docstring。Docstring 必须面向用户,兼容 mkdocstrings,包含可运行的示例,且不得重复类型提示。

SKILL.md
--- frontmatter
name: document-python-component
description: Write or upgrade conventional Python docstrings for public modules, classes, functions, methods, and properties. Docstrings must be user-facing, mkdocstrings-friendly, include runnable examples, and must not repeat type hints.
metadata:
  short-description: Google-style docstrings for public Python APIs (mkdocstrings-ready)
  keywords:
    - python
    - docstrings
    - google-style
    - mkdocs
    - mkdocstrings
    - mkdocs-material

Trigger conditions

Use this skill when you:

  • Add or modify a public module/class/function/method/property
  • See missing, vague, outdated, or inconsistent docstrings
  • Prepare code for API docs (mkdocstrings pages)
  • Introduce non-obvious behavior, edge cases, or side effects

{% include '/docs/python_docstring.md' %}