prune-comments

Removes redundant inline code comments and tightens verbose ones in changed files.

Updated May 9, 2026
One-click install
npx skills add https://github.com/natelandau/cc-plugin --skill prune-comments-natelandau
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prune-comments
Source: https://github.com/natelandau/cc-plugin/tree/main/plugins/natelandau-toolkit/skills/prune-comments
Command: npx skills add https://github.com/natelandau/cc-plugin --skill prune-comments-natelandau

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate inline comments that restate the code, reference old incidents or review threads, or ramble past their point. This Skill reviews the comments in your current changes or a named scope and rewrites them so every survivor explains a non-obvious why in the fewest words. ## Core Features & Use Cases - Scoped review: With no arguments it targets uncommitted working-tree changes, or the branch-vs-trunk diff when the tree is clean; with arguments it reviews the named files, directories, or globs in full. - Subagent dispatch: Delegates the file-by-file pass to the bundled comment-pruner subagent, which edits comments in place without touching code, docstrings, or tooling directives like noqa and type: ignore. - Use Case: Before opening a pull request, run /prune-comments to strip comments that merely restate the code and reword ones citing past bugs into present-tense invariants, then review the result with git diff. ## Quick Start Invoke /prune-comments with no arguments to clean up comments in your current uncommitted changes, then review the edits with git diff before committing.

Frequently Asked Questions about prune-comments

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

FAQPage Schema
How do I clean up redundant comments in my code changes?

Invoke /prune-comments with no arguments to review uncommitted working-tree changes, or the branch diff against trunk when the tree is clean. It deletes comments that restate the code and tightens verbose ones, leaving edits uncommitted for your review.

How do I review comments in specific files or directories?

Pass files, directories, or globs as arguments, such as src/api/routes.py or hooks/*.py, or describe the scope in words. The skill expands the named scope to a concrete file list and reviews every comment in those files.

Does comment pruning affect noqa or type: ignore directives?

No. Tooling directives such as noqa and type: ignore are left untouched, along with docstrings and commented-out code. Only inline explanatory comments are deleted, reworded, or tightened.

Does the comment cleanup commit changes automatically?

No. The skill edits the working tree in place and stops. You review the result with git diff and commit manually; comment-only edits fit the style conventional-commit type.

What happens when the working tree is clean on the trunk branch?

There is nothing to review, so the skill reports that and stops. On a clean feature branch it instead reviews the committed changes between the merge-base with trunk and HEAD.