Agent skill

Prune Comments

by natsukium in natsukium/dotfiles

Delete code comments that restate the code, narrate uncontested decisions, or explain frameworks, so the few load-bearing comments stay visible.

CC0-1.0Auto-check passedDevelopment

Install Prune Comments

skills CLI
$ npx skills add natsukium/dotfiles --skill prune-comments -a claude-code

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

GitHub CLI
$ gh skill install natsukium/dotfiles prune-comments --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/natsukium/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/modules/features/coding-agents/common/skills/prune-comments .claude/skills/prune-comments && 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
prune-comments
GitHub stars
106
Token cost
~1.3k tokens
SKILL.md length
709 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
CC0-1.0

At a glance

Delete code comments that restate the code, narrate uncontested decisions, or explain frameworks, so the few load-bearing comments stay visible.

  • Works in 2 steps: Why-not: it names an alternative a… → An invariant the code cannot show: a…
  • Says comments are noisy
  • SKILL.md covers The survival test, DELETE, Never touch and When unsure
  • Calls git

What it does

Prune Comments is an agent skill from natsukium/dotfiles. Delete code comments that restate the code, narrate uncontested decisions, or explain frameworks, so the few load-bearing comments stay visible. Load when asked to prune, trim, clean up, or reduce comments (「コメントを整理/削除」), when the user says comments are noisy, stale, or excessive, or when writing new code in a codebase that values sparse comments. Works in any language.

Its SKILL.md is about 1.3k 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. The repository describes itself as: Nix dotfiles for NixOS, Darwin and WSL. The licence is CC0-1.0.

When your agent uses it

  • Says comments are noisy
  • Writing new code in a codebase that values sparse comments

Example prompts

  • “/prune-comments”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Why-not: it names an alternative a competent reader would
  2. An invariant the code cannot show: a value that must agree with

What it can do on your machine

Read from SKILL.md and the folder at commit 1457bd1. 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

    Shell commands in SKILL.md call:

    • git

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

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    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

Prune Comments loads about 1.3k tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 709 words of instructions outside code blocks.

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

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 natsukium/dotfiles at commit 1457bd1, republished under its CC0-1.0 licence (© natsukium). 709 words, ~1,342 tokens.

Download SKILL.mdSave it as .claude/skills/prune-comments/SKILL.md (or your agent's skills folder).
name
prune-comments
description
Delete code comments that restate the code, narrate uncontested decisions, or explain frameworks, so the few load-bearing comments stay visible. Load when asked to prune, trim, clean up, or reduce comments (「コメントを整理/削除」), when the user says comments are noisy, stale, or excessive, or when writing new code in a codebase that values sparse comments. Works in any language.

Pruning Code Comments

Over-commented code is worse than under-commented code: the noise buries the few comments that carry real information, and every comment is a liability that drifts from the code it describes. The goal of a prune is not "fewer comments" as a statistic — it is that every surviving comment is one the reader must not miss.

The survival test

A comment survives in exactly two cases, stated in one or two plain sentences:

  1. Why-not: it names an alternative a competent reader would plausibly reach for and states its non-obvious failure. ("Not the builtin NAT: NAT offers no host->guest path.")
  2. An invariant the code cannot show: a value that must agree with the other side of a boundary (another file, process, protocol, or tool) and what breaks if they drift; an environment, OS, or third-party quirk the code works around; an exit-code or format contract; an ordering/locking constraint whose violation breaks something non-locally ("holding this lock is what licenses X to do Y").

Exception: test code is the one place a WHAT comment is welcome — the test name plus at most a short comment saying which promise the test pins. Everything else in the test body follows the same rules as production code.

"The reason isn't visible in the code" is NOT sufficient. Every naming, factoring, and structuring decision has a reason, and none of them get a comment. If nobody would seriously contest the decision, the "because" is narration, not information.

DELETE

Delete the whole comment, or trim a mixed comment to its surviving clause:

  1. Paraphrase of the code or signature. Doc comments that restate what the name and types already say ("returns the current PID, or 0 when not running"; "accepts PORT or HOST:PORT").
  2. Generic language / stdlib / framework knowledge. How the framework wires things, what a stdlib call guarantees, what a well-known option means — anything true of every project using the tool, not of this software. Tutorials belong in the tool's docs.
  3. History. "was", "previously", "no longer", "renamed from", before/after framing, compatibility notes for versions nobody runs. git log owns the past; a comment that only makes sense against a previous version of the code is stale the day it lands.
  4. Rationale for uncontested decisions. Why a struct carries a field, why a function was split, "X rather than Y" where nobody would seriously try Y or the benefit is obvious.
  5. Narration of visible behavior. What the next line does, the shape a format string builds, restating a condition in prose.
  6. Reviewer-addressed justification. "This is safe because…", change-relative framing — that argument belongs in the commit message, not the source.
  7. Duplicates. An invariant already stated at its authoritative site (the usage site, the boundary definition, a central helper) does not get copies at every mention. Keep one, at the site a reader hits first when the invariant matters.
Show full SKILL.md (230 more words)Show less

Never touch

  • Directives: //go:build, //nolint, # shellcheck disable, # type: ignore, eslint-disable, pragma, and their kin.
  • String literals — including error messages and test assertion strings that happen to sound like narration.
  • User-facing surfaces that live in comment syntax or near it: CLI help/usage strings, option description fields, and doc comments on the public API of a published library (godoc/rustdoc/JSDoc that users actually read). An internal function's paraphrase-doc is still deletable; a published API's reference doc is not.
  • License and copyright headers.

When unsure

Re-run the survival test: boundary agreements and environment quirks stay; justification of local structure and narration of behavior goes. If a repo's own guidelines (CLAUDE.md, contributing docs) are stricter or looser, they win.

<examples>
  <example type="delete">
    <bad>// parseConfig reads the config file and returns a Config struct.</bad>
    <why>Signature paraphrase — the name and types already say this.</why>
  </example>
  <example type="delete">
    <bad>// flake-parts calls perSystem once per system in `systems`, passing the pkgs for that system.</bad>
    <why>Framework tutorial, true of every flake-parts project.</why>
  </example>
  <example type="delete">
    <bad>// Previously this used polling; now we rely on inotify events.</bad>
    <why>History. Present-tense contract or nothing.</why>
  </example>
  <example type="keep">
    <good>// Dots are excluded from names because the DNS router splits hostnames on dots.</good>
    <why>Cross-boundary agreement: the constraint lives in another component.</why>
  </example>
  <example type="keep">
    <good>// --foreground is mandatory: without it the child detaches in turn and forks forever.</good>
    <why>Why-not with a non-obvious failure.</why>
  </example>
</examples>

© natsukium, CC0-1.0. 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 modules/features/coding-agents/common/skills/prune-comments of natsukium/dotfiles.

Open the folder on GitHubat commit 1457bd1

Compare with similar skills

Prune Comments 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.

Prune Comments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Prune Comments this skillnatsukium/dotfiles106—~1.3kAutomated safety check: PassCC0-1.0
Diagram Designcathrynlavery/diagram-design45k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.5kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    45k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes

More from natsukium/dotfiles

All 10 skills in this repo
  • Pi Review

    natsukium/dotfiles

    Delegate a source-grounded design or code review to a fresh pi CLI process using sol or luna, then address verified findings until no blockers remain.

    106 GitHub stars~972 tokensUpdated yesterday
    Auto-check passed
  • Attmcojp Claude Md

    natsukium/dotfiles

    Change the org-level CLAUDE.md that governs every attmcojp repository.

    106 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check: notes
  • Ghq

    natsukium/dotfiles

    Clone and reuse GitHub/GitLab repositories under a single managed root (ghq root) instead of fetching files one-by-one via gh api/WebFetch or scratch-cloning into /tmp.

    106 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Gui Debug

    natsukium/dotfiles

    Verify a rendering or window-chrome change in any macOS GUI app unattended — find its CGWindowID via JXA, capture that window alone (with per-pixel alpha) using screencapture -l, and read exact RGBA…

    106 GitHub stars~909 tokensUpdated yesterday
    Auto-check passed
  • Gui Debug

    natsukium/dotfiles

    Verify a rendering or window-chrome change in a GUI app unattended on Linux/Wayland under the niri compositor — enumerate windows and read output scale via niri msg --json, capture a specific window…

    106 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Po Translate

    natsukium/dotfiles

    Orchestrate English→Japanese translation of po/ja.po — classify, delegate translation/review to subagents, iterate until clean

    106 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Prune Comments

What does Prune Comments do?

Delete code comments that restate the code, narrate uncontested decisions, or explain frameworks, so the few load-bearing comments stay visible. Prune Comments is an agent skill from natsukium/dotfiles. Delete code comments that restate the code, narrate uncontested decisions, or explain frameworks, so the few load-bearing comments stay visible.

When should I use Prune Comments?

Prune Comments fits situations like: says comments are noisy; writing new code in a codebase that values sparse comments.

How do I install Prune Comments in Claude Code?

Run `npx skills add natsukium/dotfiles --skill prune-comments -a claude-code`. Or copy the skill folder (modules/features/coding-agents/common/skills/prune-comments in natsukium/dotfiles) into .claude/skills/prune-comments in your project. Claude Code loads it when a task matches its description.

How do I install Prune Comments in Codex?

Run `npx skills add natsukium/dotfiles --skill prune-comments -a codex`. Or copy the skill folder (modules/features/coding-agents/common/skills/prune-comments in natsukium/dotfiles) into .agents/skills/prune-comments in your project. Codex loads it when a task matches its description.

Can I use Prune Comments 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 natsukium/dotfiles --skill prune-comments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/prune-comments, .gemini/skills/prune-comments, .github/skills/prune-comments and .opencode/skills/prune-comments in your project.

What does Prune Comments need to run?

Going by SKILL.md and its folder, Prune Comments needs the command-line tools its instructions call (git).

Does Prune Comments access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Prune Comments 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 Prune Comments use?

Prune Comments is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Prune Comments use?

About 1.3k tokens (SKILL.md is roughly 5.4k 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 Prune Comments?

Skills that share tags, products or a category with Prune Comments: Diagram Design (cathrynlavery/diagram-design, 45k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Prune Comments?

natsukium (a GitHub user) maintains it in natsukium/dotfiles, which has 106 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

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