From pulp
Guides writing durable comments that explain code rationale, not provenance. Classifies comment types into Keep/Remove categories and enforces hygiene rules.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pulp:code-commentsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A comment earns its place by explaining something the code cannot say for
A comment earns its place by explaining something the code cannot say for
itself and that will still be true next year: current behavior, an invariant, a
non-obvious "why", an upstream/vendor/host quirk, a security or compat
constraint, a regression- or RT-safety guard. It must not encode how the code
got here — that provenance belongs in the commit message, planning/,
docs/reports/, the changelog, or a commit trailer. This repo will be
open-sourced; every comment is read by strangers with no access to our issue
tracker or session history.
This skill exists so new code stops adding the exact provenance the repo-wide
cleanup is removing. The cleanup backlog + classification rules are parked at
planning/2026-07-02-comment-hygiene-PAUSED.md.
(Phase 4), Phase N will…,
4f-style sub-phase labels, Tier A Slice 7, Feature 3, plan item 7.2,
item 6.12 follow-up. [phaseN] / [phase3-large] Catch2 tags are forbidden.
Capital-letter+digit plan tags (C2, D6, M1) are the same kind of
breadcrumb — the lint can't safely match them (they collide with MIDI note
names and register labels), so it's on you to keep them out of comments.Codex P1/P2/P0, codex review,
[codex-*], "per the reviewer", "sub-PR", "slice N of".[coverage], [codecov], [requested]
selector tags; no "added for coverage".Reference-Lineage: cleanroom … commit trailer, never
in a source comment. Describe the DAW/host behavior, not how you derived it.#1234 as the explanation. A PR/issue number is not a reason. If the
issue explains a still-live invariant, state the invariant; a durable
[issue-NNN] anchor on a regression test is fine (note: # is reserved in
Catch2 tags — use [issue-NNN]).Future v2 license-key payloads (post-RSA migration) bullet that was already inaccurate — current
crypto is AES-256-GCM.)WIP / "temporary" / "hack for now". Either it's the behavior (describe
it) or it's a tracked task (put it in planning/).CMAKE_BUILD_TYPE paragraph in a
test that no longer checks a build-type field).Provenance that encodes a stable fact gets restated as current behavior, stripped of the phase/PR wrapper. Real before → after cases from the cleanup:
| Before (process provenance) | After (durable behavior) |
|---|---|
Phase 4d adds feedback | feedback needs a previous-block slot |
pulp_build_info.hpp (Tier A Slice 7) | Build info |
test header macOS plan item 7.2 / 7.1b | header describing the current coverage |
| MPE header naming a phase | "describes UMP status handling and shared factories" |
| raw-MIDI sysex case naming a PR | "describes aborted-sysex recovery" |
# in Catch2 tags (reserved). Use [issue-NNN] for a durable regression
anchor, and behavioral tags for what the test covers: [rt-safety],
[parity], [thread]. Never [phaseN], [codecov], [coverage],
[requested], [codex-*], "which session shipped it".TEST_CASE name states what is verified, not when/why-in-the-project it was
added.Scan your own diff for the breadcrumbs above — cheaper than a cleanup PR later:
# stale provenance in ADDED lines of the staged/working diff
git diff --cached -U0 | rg '^\+' | \
rg -n -iE '\b(phase\s?[0-9]|slice [0-9]|tier [a-z] slice|plan item|sub-?pr|codex (p[012]|review)|\[(phase[0-9a-z-]*|codecov|coverage|requested|codex[a-z0-9-]*)\]|future v[0-9]|WIP|clean-?room)\b' \
&& echo "↑ reconsider these — see the code-comments skill" || echo "clean"
# repo-wide evergreen-scope lint (docs/reference/** + skills)
python3 tools/scripts/docs_noise_lint.py --mode=report
Enforcement today: docs_noise_lint.py covers docs/reference/** and
.agents/skills/**/SKILL.md (diff-scoped in CI + pre-push). Source-comment
enforcement is the author's responsibility until the lint's source scope lands —
so run the rg self-check above on any source diff that adds comments.
Write the comment as a present-tense statement of what the code does, why it's
non-obvious, or what external constraint it honors. The narrative of how it was
built goes in the commit and planning/.
npx claudepluginhub danielraffel/pulp --plugin pulpRewrite, delete, or add comments so they explain why/boundary/history and cut restatement, process narration, drift-prone detail, and AI boilerplate. Use when implementation or code review needs comment-quality cleanup.
Enforces guidelines for clean code comments: use sparingly, ban commented-out code and change descriptions, avoid end-of-line comments. Use when adding, editing, or removing comments.
Removes redundant and obvious comments following clean code principles while preserving meaningful documentation. Supports git scope filtering for staged, unstaged, branch, or commit-range changes.