revise-comments

Revise code comments in target files per comment-discipline rules, editing in place.

1|1|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/williamthorsen/codeassembly --skill revise-comments-williamthorsen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: revise-comments
Source: https://github.com/williamthorsen/codeassembly/tree/main/packages/agents/content/skills/revise-comments
Command: npx skills add https://github.com/williamthorsen/codeassembly --skill revise-comments-williamthorsen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate stale, redundant, or misplaced comments—PR references, discussion notes, and duplicated documentation—that clutter files and mislead readers. Manually auditing every comment against a consistent discipline is slow and error-prone. ## Core Features & Use Cases - Comment audit and in-place editing: Each comment in the target files is kept, deleted, or rewritten according to comment-discipline tests, with edits applied directly via the Edit tool. - Flexible targeting: Audit files changed on the current branch relative to the default branch by default, or pass explicit file and directory paths (processed recursively) to clean up legacy code. - Dry-run mode: The --dry-run flag produces the full decision summary without applying any edits, supporting triage before committing to changes. - Diff audit and structured summary: After editing, the diff is audited for side effects on sibling docs or tests, and a per-file Markdown table reports each decision with line, action, test, and reason. - Use Case: After implementing a feature on a branch, run the skill to strip PR references and redundant header comments, tighten eslint-disable rationales, and receive a summary table of every decision before opening a pull request. ## Quick Start Ask the AI to run the revise-comments skill on the current branch's changed files, or pass explicit paths such as "revise-comments src/lib" to audit a specific directory.

Frequently Asked Questions about revise-comments

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

FAQPage Schema
How do I clean up comments in files changed on my git branch?

Run the revise-comments skill with no arguments. It resolves the default branch, runs git diff to list files changed on the current branch, audits every comment in those files, and edits them in place with a summary table of decisions.

How do I preview comment changes without editing files?

Pass the --dry-run flag to the skill. It performs the full audit and emits the same per-file summary tables marked as dry-run, but records proposed actions without applying any edits to the files.

Can I audit comments in specific files or directories?

Yes, pass explicit file or directory paths as arguments, and directories are processed recursively. Passing the working tree root audits uncommitted work instead of only committed branch changes.

How are test file comments and eslint-disable lines handled?

Test files under __tests__ or matching spec/test patterns receive a dedicated test-comment carve-out. eslint-disable lines keep only a tightened rationale naming why the rule is suppressed, stripping ticket references and design discussion.

When does the comment revision skill pause instead of editing?

It pauses to ask when a test comment may be non-obvious setup already conveyed by the test name, when an eslint-disable rationale sits at the boundary of appropriate scope, or when a file header may state load-bearing architectural constraints.