No comments in code and configuration files; turning expectations into tests or lint rules; keeping license notices, tool directives and type lines. Load when writing or editing code or configuration files.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Code Comments?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/the-up-code-comments)
---
name: code-comments
description: "No comments in code and configuration files; turning expectations into tests or lint rules; keeping license notices, tool directives and type lines. Load when writing or editing code or configuration files."
---
# Code Comments
- Don't add comments to code and configuration files, including explanations, commented-out code, and TODO/FIXME. Comments go stale and don't prevent wrong changes.
- Turn the expectation you'd describe in a comment into a rule that blocks the wrong change: behavior and business decisions into unit and e2e tests that can change only through a deliberate test update; code standards and architectural constraints into lint or static analysis rules.
- Remove the existing explanatory comments in the files you change: if the expectation still holds, first turn it into a test or a lint rule; if it doesn't, delete it. Don't clean up the whole repository.
- Don't write meaningless tests just to replace a comment.
- Don't delete license and copyright notices, tool directives, or lines that affect runtime or type checking (for example shebangs, `@ts-expect-error`, PHPStan/Psalm PHPDoc types, annotations); if there's no alternative that keeps their function, report the conflict.
- Don't clean up comments in generated and third-party files.
- Enforce the comment ban with lint as far as the tools support it.
- The ban applies to code and configuration comments; task comments, PR descriptions, and required documentation are out of its scope.