write-docs
Add clear docstrings/comments without changing behaviour.
SKILL.mdskills/write-docs/SKILL.md
GitHubWhen to use
The user asks to document code, add docstrings, or improve comments.
How
- Read the file so the docs match real behaviour.
- Add concise docstrings: what it does, its args, its return, and any non-obvious side effects or errors.
- Use
edit_file; don't change logic. Match the file's existing docstring style. - Comment the why, not the what.
Avoid
- Restating the obvious ("increments i by 1").
- Changing behaviour while "just adding docs".
- Mixing docstring styles within one file.
Done well
A reader understands each function's contract without reading its body, and comments explain intent where it isn't obvious.