Skip to content
Back to skills

Code Commenting

ASecurity

When and how to comment code: the why over the what, annotation tags, public API docs and anti-patterns. Use when writing or reviewing comments, docstrings or TODO/FIXME tags.

  • 80 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 28, 2026
ai-agentsgogitapisecurity

Works with

  • api

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add monkilabs/opencastle --skill code-commenting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Commenting?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Commenting
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/monkilabs-code-commenting/badge)](https://www.skillsdirectory.com/skills/monkilabs-code-commenting)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-commenting
description: "When and how to comment code: the why over the what, annotation tags, public API docs and anti-patterns. Use when writing or reviewing comments, docstrings or TODO/FIXME tags."
---

# Code Commenting

Comment WHY, not WHAT. When a bad name is the real problem, rename instead of commenting. Do comment: non-obvious algorithm choices, regexes, external API constraints, and the rationale behind every magic number or config constant. JSDoc every public API function.

## Annotation Tags

`TODO` planned work · `FIXME` known bug · `HACK` workaround (say why and when it can go) · `NOTE` non-obvious constraint · `WARNING` side effect / mutation risk · `PERF` hot path · `SECURITY` security-sensitive · `DEPRECATED` (name the replacement and removal version).

## Never

- Leave commented-out code — delete it; git has the history.
- Keep a changelog in comments — that is `git log`.
- Add decorative divider comments.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…