Comment Cleanup

Guidelines for comments in code. Use when adding, editing, or removing comments. Use when this capability is needed.

tomevault-io 42b3d29 2 files · 1.6 KB Updated

File contents

Comment Guidelines

  • Use comments sparingly
  • Don't comment out code
    • Remove it instead
  • Don't add comments that describe the process of changing code
    • Comments should not include past tense verbs like added, removed, or changed
    • Example: this.timeout(10_000); // Increase timeout for API calls
    • This is bad because a reader doesn't know what the timeout was increased from, and doesn't care about the old behavior
  • Don't add comments that emphasize different versions of the code, like "this code now handles"
  • Do not use end-of-line comments
    • Place comments above the code they describe

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/motlin--claude-code-plugins--comment-cleanup commit 42b3d29dea

Frequently asked questions

npx skillmds@latest add tomevault-io/comment-cleanup