oncokb-code-comments-standards

Write and review source code comments that explain non-obvious structure and behavior.

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/oncokb/oncokb-skills --skill oncokb-code-comments-standards-oncokb
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: oncokb-code-comments-standards
Source: https://github.com/oncokb/oncokb-skills/tree/main/skills/oncokb-code-comments-standards
Command: npx skills add https://github.com/oncokb/oncokb-skills --skill oncokb-code-comments-standards-oncokb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code comments often restate what the code already shows or omit the context maintainers actually need, leaving first-time readers unable to understand design intent or safely modify logic. This Skill provides a consistent standard for deciding what to comment, where comments are required, and how to respond to reviewer confusion. ## Core Features & Use Cases - Comment-Writing Standard: Defines what comments should cover, including design rationale, invariants, assumptions, side effects, and failure modes. - Required Comment Locations: Mandates comments on non-CRUD business logic, API-exposed fields and data types, and server-side rendering template fields. - Review Rule: Treats reviewer confusion as valid signal and resolves it through better comments, better code, or both. - Use Case: When refactoring a pricing calculation module, apply this standard to document why the algorithm was chosen, reference the design ticket, and flag edge-case behavior so future maintainers can change it safely. ## Quick Start Review the comments in my latest pull request against this standard and suggest improvements for any non-obvious business logic.

Frequently Asked Questions about oncokb-code-comments-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write good code comments for business logic?▼

Write comments that explain why the code exists, key invariants, assumptions, and non-obvious control flow rather than restating syntax. For non-trivial logic, include references to tickets, design docs, or meeting notes so readers can find supporting context.

What should code comments cover during code review?▼

Comments should cover design intent, preconditions, side effects, limitations, and edge-case behavior that a maintainer needs before making safe changes. Judge obviousness from a first-time reader's viewpoint, not the original author's.

When are code comments required in a codebase?▼

Comments are required on business logic beyond basic CRUD, on fields and data types exposed via API calls, and on fields used in server-side rendering templates. Non-trivial logic should also reference supporting context like tickets or design documents.

What kinds of code comments should be avoided?▼

Avoid comments that restate code line-by-line, repeat names or syntax already visible, or make vague statements that add no understanding. Prefer improving the code itself when possible and use comments only to close the remaining gap.

How should I respond when a reviewer finds my code confusing?▼

Treat reviewer confusion as valid signal rather than arguing from author intent. Resolve it by clarifying with better comments, improving the code itself, or both, so a first-time reader can understand the design.