docstring-cleanup

Installation
SKILL.md

Docstring Cleanup — Decouple Docs from the Change

Why this matters

A codebase lives independently of any single feature or PR. A docstring is read months later by someone who has never heard of the feature that introduced the code. Docstrings that narrate the change ("added as part of X", "new helper for the Y flow") rot instantly: the "change" becomes ancient history, but the text stays. Docs must describe what the code is and does now, in terms of the code itself — not the journey that produced it.

The core rule

Write every docstring and comment as if the code had always existed. No reader should be able to tell, from the docs alone, which feature or PR introduced it.

Anti-patterns to find and fix

Scan the diff (or the files touched) for these patterns:

  1. Change narration — docstrings describing the diff, not the code:
    • """New helper added to support bulk export."""
    • # Added this check as part of the retry-logic feature
    • """Serialize records into the export wire format."""
Installs
2
First Seen
Aug 12, 2026
docstring-cleanup — pranshugupta54/skills