comment-optimizer

Edit code comments to remove noise and add boundary and rationale notes.

11|1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/ylxmf2005/AgentCorp --skill comment-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comment-optimizer
Source: https://github.com/ylxmf2005/AgentCorp/tree/main/agentcorp/comment-optimizer
Command: npx skills add https://github.com/ylxmf2005/AgentCorp --skill comment-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Comments in code often restate, narrate investigation, or include boilerplate, obscuring the real boundaries and why decisions matter. This skill fixes comments directly, adding why/boundary/history notes and removing noise to improve maintainability.

Core Features & Use Cases

  • Edit and optimize comments directly in the working tree to remove noise and add boundary/why notes.
  • Analyze diffs to identify stale or boundary-missing comments and rewrite or remove accordingly.
  • Generate concise "why/boundary/history" notes that help future maintainers understand decisions.

Quick Start

Run the optimizer on the current diff to prune noisy comments and insert why/boundary notes.

Frequently Asked Questions about comment-optimizer

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

FAQPage Schema
How do I fix noisy code comments that just restate the implementation?

To fix noisy code comments, you need to identify statements that narrate investigation or decorate without adding context, then rewrite them to express boundaries, rationale, and historical context while removing restatements.

What is the best way to update stale comments during a code refactor?

The best way to update stale comments during a code refactor is to analyze the current diff, identify missing boundary notes, and rewrite or remove the outdated comments to ensure they explain why decisions matter for future maintainers.

How do code comments improve maintainability and knowledge transfer?

Code comments improve maintainability and knowledge transfer by moving beyond code restatements to document boundaries, rationale, and historical context, helping future developers understand decisions without guessing.

Can I automatically optimize comments across my current working tree?

Yes, you can optimize comments directly across your working tree by scanning the current diff to prune noisy boilerplate and automatically insert concise why, boundary, and history notes.

When should I remove comments instead of rewriting them?

You should remove comments instead of rewriting them when they consist entirely of fluff, boilerplate, or investigation narration that obscures code boundaries without stating any historical context or rationale.