Agent skill

Comment Cleanup

by OpenCyphal in OpenCyphal/pycyphal

Prune nonessential comments and docstrings across a codebase.

MITAuto-check passedDevelopment

Install Comment Cleanup

skills CLI
$ npx skills add OpenCyphal/pycyphal --skill comment-cleanup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenCyphal/pycyphal comment-cleanup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenCyphal/pycyphal.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/comment-cleanup .claude/skills/comment-cleanup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
comment-cleanup
GitHub stars
142
Token cost
~654 tokens
SKILL.md length
349 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Prune nonessential comments and docstrings across a codebase.

  • Asked to remove verbose
  • SKILL.md covers Keep vs. remove, Never touch, Prove you changed nothing but… and Scale with subagents, then audit
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Redundant comments

What it does

Comment Cleanup is an agent skill from OpenCyphal/pycyphal. Prune nonessential comments and docstrings across a codebase. Use when asked to remove verbose or redundant comments, tighten documentation, or make comment style uniform. Aggressive downsizing, but retain high-value information.

Its SKILL.md is about 650 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. It works with Python and Linux. The repository describes itself as: Python implementation of the Cyphal protocol stack. The licence is MIT.

When your agent uses it

  • Asked to remove verbose
  • Redundant comments
  • Tighten documentation
  • Make comment style uniform

Example prompts

  • “/comment-cleanup”

What it can do on your machine

Read from SKILL.md and the folder at commit 34530f6. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Comment Cleanup loads about 654 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 349 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~654

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenCyphal/pycyphal at commit 34530f6, republished under its MIT licence (© OpenCyphal). 349 words, ~654 tokens.

Download SKILL.mdSave it as .claude/skills/comment-cleanup/SKILL.md (or your agent's skills folder).
name
comment-cleanup
description
Prune nonessential comments and docstrings across a codebase. Use when asked to remove verbose or redundant comments, tighten documentation, or make comment style uniform. Aggressive downsizing, but retain high-value information.

Comment cleanup

Trim ALL comments/docstrings EXCEPT those that carry information a competent reader could not reconstruct from names, signatures, and code in a few seconds.

Keep vs. remove

REMOVE: name-echo describers, control flow / type / structure narration, section-divider banners, value-trace and "what the next line does" comments, type-obvious prose.

KEEP: design rationale (the WHY), gotchas and edge-cases, contracts and invariants, cross-references, standards or paper citations, hardware and timing facts, and the provenance of a regression test.

When uncertain whether something is rationale or restatement, keep it. The expensive mistake is erasing valuable information, not leaving one extra obvious line.

Never touch

Functional comments are not prose: type-checker and linter directives, formatter on/off switches, coverage pragmas, shebangs, and encoding lines. Preserve every one. Never delete a docstring that is a block's only body — it breaks syntax; reduce it to a terse line or a bare ellipsis instead.

Prove you changed nothing but comments

This safety net is what lets you cut confidently. Parse each file before and after, strip the docstrings from both, and compare the syntax trees: equality proves only comments and docstrings changed, since comments never appear in the tree. Treat an empty body, a bare ellipsis, and a lone pass as equivalent, so converting a sole-body docstring passes. Run it after auto-formatting. The type checker is the separate guard that no functional directive was lost.

Scale with subagents, then audit

Partition by file ownership so agents never share a file, and never let an agent run a history-rewriting or revert command — it destroys a sibling's concurrent work; undo mistakes by hand-editing. Keep the verification script out of their writable set; they only run it. Fresh subagents apply a given policy more willingly than ones asked to reverse an earlier, more conservative instruction.

When the cutting is done, audit every deletion once more for erased rationale and restore the genuine losses. Run review agents to cross-check the results. Then format, type-check, and run the full test suite before committing. A differential fuzzer or a simulation pass, if the project has one, is strong independent proof that behavior is unchanged.

© OpenCyphal, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/comment-cleanup of OpenCyphal/pycyphal.

Open the folder on GitHubat commit 34530f6

Compare with similar skills

Comment Cleanup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Comment Cleanup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Comment Cleanup this skillOpenCyphal/pycyphal142—~654Automated safety check: PassMIT
Genie API Service Docsqualcomm/qai-appbuilder246—~840Automated safety check: PassCustom licence
Qai Appbuilder Docsqualcomm/qai-appbuilder246—~1.1kAutomated safety check: PassCustom licence
Update .NET OS Packagesdotnet/core22k—~2.3kAutomated safety check: PassMIT
Adk Sample Creatorgoogle/adk-python22k—~1.3kAutomated safety check: PassApache-2.0
Crafting Effective Readmescumbucadev/cinemaempoa1465 repos~669Automated safety check: PassGPL-3.0

Similar skills

  • Genie API Service Docs

    qualcomm/qai-appbuilder

    GenieAPIService technical documentation retrieval. An agent skill from qualcomm/qai-appbuilder.

    246 GitHub stars~840 tokensUpdated today
    DevelopmentAuto-check passed
  • Qai Appbuilder Docs

    qualcomm/qai-appbuilder

    QAI AppBuilder technical documentation retrieval. An agent skill from qualcomm/qai-appbuilder.

    246 GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Official

    Audits and updates os-packages.json files listing the Linux packages each .NET release needs per distro, then regenerates the Markdown from the JSON.

    22k GitHub stars~2.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Adk Sample Creator

    google/adk-python

    Official

    Creates a new sample agent in the ADK Python repository — the sample directory, its agent.py, and its README.md — following the conventions the existing samples already use.

    22k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Crafting Effective Readmes

    cumbucadev/cinemaempoa

    A skill your agent uses when writing or improving README files.

    146 GitHub starsUsed in 5 repos~669 tokens
    DevelopmentAuto-check passed
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    DevelopmentAuto-check passed

More from OpenCyphal/pycyphal

  • Cyphal Parity Guard

    OpenCyphal/pycyphal

    Keep the Python Cyphal rewrite in wire-visible behavioral parity with the C reference at reference/cy.

    142 GitHub stars~1.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Review Loop

    OpenCyphal/pycyphal

    Multi-agent review/refine loop. An agent skill from OpenCyphal/pycyphal.

    142 GitHub stars~817 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Comment Cleanup

What does Comment Cleanup do?

Prune nonessential comments and docstrings across a codebase. Comment Cleanup is an agent skill from OpenCyphal/pycyphal. Prune nonessential comments and docstrings across a codebase.

When should I use Comment Cleanup?

Comment Cleanup fits situations like: asked to remove verbose; redundant comments; tighten documentation; make comment style uniform.

How do I install Comment Cleanup in Claude Code?

Run `npx skills add OpenCyphal/pycyphal --skill comment-cleanup -a claude-code`. Or copy the skill folder (.claude/skills/comment-cleanup in OpenCyphal/pycyphal) into .claude/skills/comment-cleanup in your project. Claude Code loads it when a task matches its description.

How do I install Comment Cleanup in Codex?

Run `npx skills add OpenCyphal/pycyphal --skill comment-cleanup -a codex`. Or copy the skill folder (.claude/skills/comment-cleanup in OpenCyphal/pycyphal) into .agents/skills/comment-cleanup in your project. Codex loads it when a task matches its description.

Can I use Comment Cleanup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenCyphal/pycyphal --skill comment-cleanup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/comment-cleanup, .gemini/skills/comment-cleanup, .github/skills/comment-cleanup and .opencode/skills/comment-cleanup in your project.

What does Comment Cleanup need to run?

SKILL.md names no scripts, command-line tools or credentials: Comment Cleanup is instructions for the agent only.

Does Comment Cleanup access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Comment Cleanup safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Comment Cleanup use?

Comment Cleanup is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Comment Cleanup use?

About 654 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Comment Cleanup?

Skills that share tags, products or a category with Comment Cleanup: Genie API Service Docs (qualcomm/qai-appbuilder, 246 stars), Qai Appbuilder Docs (qualcomm/qai-appbuilder, 246 stars), Update .NET OS Packages (dotnet/core, 22k stars) and Adk Sample Creator (google/adk-python, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Comment Cleanup?

OpenCyphal (a GitHub organization) maintains it in OpenCyphal/pycyphal, which has 142 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on July 24, 2026.

Source: OpenCyphal/pycyphal on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.