Remove Comments
Edits code so comments earn their keep (none/strip, necessary/aggressive, explanatory; safe mode, edit-free report): deletes zero-info comments…
by melodic-software★ 34 GitHub stars
Install Remove Comments in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Remove comments
Repository context. Gather first
Run each command below as its own Bash call, all sent together in one message (worktree isolation).
Keep any bound in the command's own pipe (output limits).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never ## Pre-computed context lines (gather-block convention).
- Current branch,
git branch --show-current
Pre-computed context
Scope (rung, base, count, then a 10-path preview; re-run the script without --max for the full set): !${CLAUDE_SKILL_DIR}/scripts/scope-code-files.sh --max 10 2>/dev/null || echo "(not a git repository)"
Tooling layer (present/absent per analysis layer; an absent row names the capability lost): !${CLAUDE_SKILL_DIR}/scripts/comment-tooling-probe.sh 2>/dev/null || echo "(probe unavailable)"
Repository settings (team then personal layer, one line per key): !${CLAUDE_SKILL_DIR}/scripts/settings.sh 2>&1 || echo "(settings unavailable)"
All three run before the argument is read, so each is a preview: the scope line is void whenever the argument names an explicit target, and the tooling line is re-derived in the workflow.
Settings
Arguments: $ARGUMENTS
Each key resolves through four layers, lowest first, a later one winning: the default below,
userConfig, the team layer, and the personal override; a policy key also reads the org baseline
below the team layer. For the comment policy keys
(comment_posture, comment_keep_list, class_c_max_lines) the team layer is
<home>/comment-policy.yaml over the org baseline <home>/comment-policy.org.yaml (the team file
may tighten the org posture, never loosen it), and the personal override is
<home>/comment-policy.local.yaml; for the others it is <home>/code-tidying.yaml and <home>/code-tidying.local.yaml. <home> is the
repository's bound convention home, else docs/conventions (the settings line above, from
${CLAUDE_SKILL_DIR}/scripts/settings.sh). A policy key a comment-policy file does not set is read
from the same layer's code-tidying file, and a comment-settings: line in the settings output names
each code-tidying file still holding one: repeat it in the report's first lines, with
/code-tidying:setup apply as the move. A per-run token beats every layer. A layer holding a
value outside a key's set is named (file or userConfig, key, value) and dropped; a valid higher
layer still wins, else the default. Report each key's value and the layer it came from once, in
the report's first lines.
| Key | userConfig | Values | Default |
|---|---|---|---|
comment_posture |
${user_config.comment_posture} |
auto, none, necessary, explanatory |
auto: necessary |
comment_keep_list |
${user_config.comment_keep_list} |
default, or a repository-relative path to a file |
default: reference/keep-list.md |
comment_edit_scope |
${user_config.comment_edit_scope} |
diff, files |
diff |
encode_constraints_unattended |
${user_config.encode_constraints_unattended} |
true, false |
false |
class_c_max_lines |
${user_config.class_c_max_lines} |
1 to 40 | 2 |
apply_local_renames |
${user_config.apply_local_renames} |
true, false |
true |
hard_exclusions is ${user_config.hard_exclusions} (enforce, the default, or advisory) from
userConfig alone: tidy's exclusions reference owns its channels, and a repository lifts paths through
its overrides file. An unexpanded or empty userConfig value is unset. Old posture values still resolve: strict and
balanced read as explanatory, conservative as explanatory plus safe, aggressive as
necessary. Old per-run tokens too: aggressive means necessary and strip means none.
comment_keep_list replaces what necessary keeps above the floor; it never changes the floor.
A path holds the repository's own criteria in the shape of the shipped file; an absolute path, a
.. segment, a symlink anywhere on the path or a path naming no regular file is invalid. The
settings line checks the file layers; check a userConfig path with
${CLAUDE_SKILL_DIR}/scripts/settings.sh --keep-list <value> and drop it when the line says
invalid. The resolved list's path is absolute: ${CLAUDE_SKILL_DIR}/reference/keep-list.md for
default, else the repository root joined with the value. Under necessary, read it before
triage, and when it is not the shipped one, nam
Allowed tools
Tools this skill is permitted to call.
- 01
Bash(${CLAUDE_SKILL_DIR}/scripts/scope-code-files.sh:*) - 02
Bash(${CLAUDE_SKILL_DIR}/scripts/added-lines.sh:*) - 03
Bash(${CLAUDE_SKILL_DIR}/scripts/comment-tooling-probe.sh:*) - 04
Bash(${CLAUDE_SKILL_DIR}/scripts/change-shape.sh:*) - 05
Bash(${CLAUDE_SKILL_DIR}/scripts/comment-census.sh:*) - 06
Bash(${CLAUDE_SKILL_DIR}/scripts/commented-out-code.sh:*) - 07
Bash(${CLAUDE_SKILL_DIR}/scripts/rank-comment-targets.sh:*) - 08
Bash(${CLAUDE_SKILL_DIR}/scripts/settings.sh:*) - 09
Bash(${CLAUDE_SKILL_DIR}/scripts/detect.sh:*) - 10
Bash(${CLAUDE_SKILL_DIR}/scripts/changed-code-files.sh:*) - 11
Bash(git branch:*) - 12
Bash(git log:*) - 13
Bash(git ls-files:*) - 14
Bash(grep:*) - 15
Bash(head:*) - 16
Bash(echo:*)
Bundled files
- actions/audit.md
- actions/remove.md
- evals/evals.json
- reference/dissolving-moves.md
- reference/keep-list.md
- reference/safety.md
- reference/scope.md
- reference/shapes.md
- reference/sources.md
- reference/tooling.md
- reference/triage.md
- scripts/added-lines.sh
- scripts/change-shape.sh
- scripts/changed-code-files.sh
- scripts/comment-census.sh
- scripts/comment-tooling-probe.sh
- scripts/commented-out-code.sh
- scripts/detect-comments.py
- scripts/detect-lexer.test.sh
- scripts/detect.sh
- scripts/detect.test.sh
- scripts/lib/comment_lexer.py
- scripts/rank-comment-targets.sh
- scripts/scope-code-files.sh
- scripts/settings.sh
FAQ
What does the Remove Comments skill do?
Edits code so comments earn their keep (none/strip, necessary/aggressive, explanatory; safe mode, edit-free report): deletes zero-info comments, renames/restructures explanatory ones, keeps load-bearing ones. Use when: 'remove comments', 'dissolve comments', or trim agent comments. Not for read-only flagging: /code-tidying:audit-comment-residue.
How do I install the Remove Comments skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the Remove Comments skill run scripts?
Yes, this skill bundles executable scripts. Review the source before installing.
Related skills
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…