code-clean-comments

code-clean-comments is a skill for Claude Code from rp1-run/rp1. It costs 23 tokens per session (778 once invoked), scanned A, original, Apache-2.0.

A comment-cleaning workflow that finds unnecessary comments within a selected code scope and prepares a change manifest before edits are made. A change manifest is a durable list of the changes to perform.

In plain words
What is it for?
Use it to identify and remove unnecessary code comments across a chosen part of a project.
Why use it?
Unneeded or outdated comments can make code harder to read and can mislead developers. Resolving the scope first gives the cleanup a clear, reviewable change list.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the rp1-dev plugin — 23 skills, 36 agents shipped together

Good fit Use it to identify and remove unnecessary code comments across a chosen part of a project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rp1-run/rp1/code-clean-comments
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rp1-run/rp1 --skill code-clean-comments
Clone the repo
git clone --depth 1 https://github.com/rp1-run/rp1

Made for: Claude Code.

Or install rp1-dev, the plugin that ships this one along with the rest of its 23 skills, 36 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-clean-comments

README.md
[![agentmods](https://agentmods.dev/badge/skills/rp1-run/rp1/code-clean-comments/github.svg)](https://agentmods.dev/skills/rp1-run/rp1/code-clean-comments)
Your own site
<a href="https://agentmods.dev/skills/rp1-run/rp1/code-clean-comments"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/code-clean-comments/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-clean-comments

Your own site · 80×15
<a href="https://agentmods.dev/skills/rp1-run/rp1/code-clean-comments"><img src="https://agentmods.dev/badge/skills/rp1-run/rp1/code-clean-comments.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00778
Opus 5 $0.00012 $0.00389
Sonnet 5 $0.00005 $0.00156
Haiku 4.5 $0.00002 $0.00078

Measured yesterday against content hash b6e8bd332e4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

code-clean-comments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dev/skills/code-clean-comments/SKILL.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Comment Cleaner

Resolves a user scope into a durable change-manifest artifact, then spawns the comment-cleaner agent with only CHANGE_MANIFEST and CODE_ROOT.

The comment-cleaner agent remains manifest-only. Never pass SCOPE, BASE_BRANCH, branch, unstaged, or commit-range parameters to it.

1. Resolve Directories

Use generated Resolve Arguments directory values. Resolve {resolved_code_root} to CODE_ROOT when it is non-empty; otherwise use {codeRoot}. Use {workRoot} for the durable artifact directory.

Create the manifest directory if needed:

mkdir -p "{workRoot}/comment-clean-comments"

Choose the next numbered manifest/status path pair:

{workRoot}/comment-clean-comments/change-manifest-001.json
{workRoot}/comment-clean-comments/change-manifest-status-001.json

Increment the number if either file already exists. Set resolved_change_manifest_path and resolved_change_manifest_status_path to the selected pair.

2. Generate Manifest

Delegate all scope resolution to the typed generator:

rp1 agent-tools change-manifest generate \
  --code-root "{resolved_code_root}" \
  --out "{resolved_change_manifest_path}" \
  --status-out "{resolved_change_manifest_status_path}" \
  --source code-clean-comments \
  --scope "{SCOPE}"

Parse the ToolResult envelope into cleanup_manifest_result. The generator is responsible for existing manifest JSON, file, directory, git ref, and git range scopes. Do not inspect files, walk directories, parse git diffs, validate existing manifest JSON, or write manifest JSON yourself.

If cleanup_manifest_result.data.status != "created", cleanup_manifest_result.data.files == 0, cleanup_manifest_result.data.ownedLineCount == 0, or cleanup_manifest_result.data.manifestPath is missing, fail closed and do not dispatch comment-cleaner. Report the status path and skip reason instead.

If the tool fails or returns malformed output, fail closed and do not dispatch comment-cleaner. Report change_manifest_generate_failed with the intended status path.

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 86 lines · 23 tokens per session scan A b6e8bd332e4c

Subscribe to this mod's changes

code-clean-comments is a skill published in the GitHub repository rp1-run/rp1 (38 stars, last pushed 2d ago), licensed Apache-2.0. It adds 23 tokens to every session and 778 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.