Loading...
Loading...
Code comment guidelines. Remove redundant comments, add strategic ones explaining WHY not WHAT. Applied automatically when modifying code.
npx skill4agent add ahonn/dotfiles comment-guidelines// BAD: Restates the obvious
// Set user name to the input value
user.name = input.value;
// GOOD: Explains non-obvious behavior
// Normalize to lowercase for case-insensitive matching in search
user.searchKey = user.name.toLowerCase();
// BAD: Documents what is self-evident
// Loop through all items
for (const item of items) { ... }
// GOOD: Explains WHY this approach
// Process in reverse to allow safe removal during iteration
for (let i = items.length - 1; i >= 0; i--) { ... }