📝
WritingPython

Docstring Expert

by val1813

Docstring Expert is a Writing skill for Claude Code, published by val1813 in kwcode.

688 stars92 forkson val1813/kwcodeAdded 2026/08/12Repository updated 2026/05/14
Install in seconds
Install Docstring Expert
Copy Docstring Expert into your Claude Code skills folder. Run the command in your terminal, or review the source on GitHub before installing.
terminal
npx degit https://github.com/val1813/kwcode/tree/master/kaiwu/builtin_experts/docstring ~/.claude/skills/docstring

Requires Node.js. Downloads this skill only — not the rest of the repository — into your Claude Code skills folder.

Without Node.js

git clone https://github.com/val1813/kwcode.git

Clones the whole repository, then copy the skill’s own directory into your skills folder yourself.

In this catalog

Source file
kaiwu/builtin_experts/docstring/SKILL.md in val1813/kwcode
Installs to
~/.claude/skills/docstring
Collection
One of 19 skills cataloged from this repository
Category
Writing1012 skills

What Docstring Expert does

Docstring Expert helps write Python docstrings in the right style for a project. Use it to format summaries, Args, Returns, Raises, and examples for public APIs and classes.

Docstring Expert is cataloged under Writing on DirSkills.

Documentation

README

领域知识

  • 默认用Google风格docstring,项目已有NumPy风格则跟随
  • 一行摘要用祈使句("计算xxx"而非"这个函数计算xxx")
  • Args段:每个参数一行,格式 name (type): 描述
  • Returns段:写明类型和含义,多返回值用tuple说明各元素
  • Raises段:只列主动raise的异常,不列底层传播的
  • 示例(Examples):给出可直接运行的doctest片段
  • 类docstring写在class行下方,描述职责而非实现
  • 中文项目用中文写docstring,英文项目用英文,混合项目跟随已有风格
  • 私有方法(_前缀)可省略docstring,公开API必须有
  • 装饰器不影响docstring位置,始终写在def下一行

经验规则(自动生成)

Frequently asked about Docstring Expert

  • What else does val1813 publish alongside Docstring Expert?

    Docstring Expert is one of 19 skills that DirSkills catalogs from val1813/kwcode, the repository it ships in. Its siblings there include API Expert, Bug Fix Expert and DeepSeek API Expert. Each one is a separate skill with its own page in this directory, installs the same way Docstring Expert does, and is maintained by val1813 in that same repository. The rest of the collection is listed on the val1813/kwcode page.

  • How does Docstring Expert compare to other Writing skills?

    Docstring Expert ranks #604 by stars among the 1012 Writing skills in this catalog. The most-starred ones next to it are Article Writing, Social Media Content Calendar and Knowledge Comic Creator. DirSkills ranks by the star count of the repository each skill ships in, so that order reflects how popular those repositories are rather than any review of Docstring Expert against them. Open each page to compare what they document and how they install.

More from val1813/kwcode

Docstring Expert is one of 19 skills cataloged on DirSkills from val1813/kwcode.

See all 19 skills