kitchen-engineer42/pdf2skills/code-commenting-strategy

Claude Code and agent skill by kitchen-engineer42/pdf2skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Apply strategic approaches to code commenting including when to comment, optimal comment density, performance considerations, and integration with development workflow. Use when establishing commenting standards, addressing performance concerns, implementing Pseudocode Programming Process (PPP), or determining appropriate comment frequency.

Install

npx vskill@latest install kitchen-engineer42/pdf2skills/code-commenting-strategy

SKILL.md

Code Commenting Strategy

When to Use This Skill

  • Establishing or updating code commenting standards for a project
  • Addressing concerns about comment performance impact
  • Implementing Pseudocode Programming Process (PPP)
  • Determining optimal comment density for codebases
  • Training developers on commenting best practices

Core Principles

1. Integrate Comments with Development Workflow

Write comments synchronously with code, not as a separate task.

Why delay comments?

  • Perceived workload: Commenting at the end becomes a separate, overwhelming task
  • Time cost: Requires recalling or re-understanding code logic
  • Accuracy loss: Design assumptions and nuances are forgotten

Handling the "interruption" objection:

  • If commenting interrupts your coding flow, this is a warning sign of complexity
  • Use pseudocode for design first
  • Convert pseudocode to comments
  • Fill in the code implementation
  • High concentration needs indicate overly complex design—simplify first
2. Performance Considerations

For interpreted languages and resource-constrained environments:

  • Comments can add measurable performance overhead
  • Never skip comments to improve performance
  • Create separate build/release versions
  • Use build tools to strip comments during the build process

For compiled languages:

  • Comments are typically stripped automatically during compilation
  • No performance impact concern
3. Optimal Comment Density

Research-based guideline:

  • IBM research shows clarity peaks at approximately 1 comment per 10 statements
  • Below this density: Code becomes difficult to understand
  • Above this density: Also reduces code comprehensibility

Avoid arbitrary standards:

  • Don't use mandatory rules like "1 comment per 5 lines"
  • Arbitrary standards address symptoms, not root causes
  • Focus on code clarity, not comment quotas
4. Pseudocode Programming Process (PPP) Integration

When using PPP effectively:

  • You may naturally achieve high comment density (every few lines)
  • This is a side effect, not a goal
  • Focus on efficiency, not quantity

Evaluate each comment:

  • Does it describe why the code was written?
  • Does it meet established quality standards?
  • If yes, you have sufficient comments

Decision Flow

IF writing code
THEN write comments synchronously
IF concentration is too high for commenting
THEN simplify design using pseudocode first
IF concerned about comment performance
IF compiled language
THEN no action needed (auto-stripped)
IF interpreted language
THEN implement build-time comment stripping
IF evaluating comment density
THEN aim for ~1 comment per 10 statements
Avoid arbitrary minimum quotas
IF using PPP
THEN focus on comment efficiency (describing "why")
Not on achieving specific quantity

Warning Signs

  • Coding requires such extreme concentration that commenting feels disruptive
  • Comment density significantly deviates from 1:10 ratio without justification
  • Comments are treated as a separate "cleanup" phase
  • Performance concerns lead to reduced commenting

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Refreshed 18 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/kitchen-engineer42/pdf2skills/code-commenting-strategy/badge)](https://verified-skill.com/skills/kitchen-engineer42/pdf2skills/code-commenting-strategy)

Something wrong with this skill or its page? Tell us.