timermeet-code-commenter
Add or review comments and docstrings in TimerMeet's Python code so a reader can tell what each non-obvious part does and why. Use when the user asks to "explain the code", "comment every part", "quie
Files1
View on GitHubSKILL.md.claude/skills/timermeet-code-commenter/SKILL.md
GitHubTimerMeet Code Commenter
Overview
Make TimerMeet's Python code self-explanatory to someone who didn't write it, without burying the logic in noise. This skill governs how to comment, not what to build.
Rules
- Comment the why, not the what. A reader can already see
for meeting in self.meetings:-- they can't see why the loop skips a record, or why a constant is9 * DAY_MSand not7 * DAY_MS. Every comment should answer a question the code itself can't. - One-line module docstring purpose + a short "why this exists" paragraph at the top of each file, referencing the original JS/PHP source function it replaced when relevant (e.g. "Port of
addRecurrenceToDate()"). - Function/method docstrings for anything with a non-obvious contract: what it mutates, what it returns on the "nothing to do" path, and any invariant the caller must preserve (e.g.
extend_series_if_needed's idempotency guarantee). - No comments on self-evident code. Don't add
# increment counterabovecount += 1. If removing a comment wouldn't confuse a future reader, remove it. - Flag every deliberate simplification versus the original web app inline, at the point where it diverges (e.g.
audio.py's MP3-loops-from-start-instead-of-sub-clip note,i18n.py's# desktop-adaptedmarkers). A silent behavioral difference from the ported spec is worse than an ugly comment. - Never restate the current task/PR in a comment ("fixed for issue #12", "added per user request") -- that belongs in the commit message, not the source, and rots as the codebase evolves.
Workflow
- If asked to comment "everything", start from
timermeet_app/recurrence.pyandtimermeet_app/storage.py(highest logic density, highest regression risk) before UI files. - Read the function fully before writing its docstring -- don't guess behavior from the name.
- Cross-check any claim about the original app's behavior against
legacy-php/assets/app.jsrather than assuming; if you can't verify it, say "ported from the legacy web app" without over-claiming precision. - After adding comments, re-run
python -m py_compileon touched files (a docstring edit can still break syntax if quoting goes wrong) andpython -m unittest discover -s tests.