Skip to content
Agentmart
Submit a tool

prune-comments

Prune the comments in freshly implemented code — every comment earns its place under one test, or it goes.

Skill by noel-lopez

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/noel-lopez-prune-comments

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Prune the comments in freshly implemented code — every comment earns its place under one test, or it goes. Survivors compress to one line.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/prune-comments

What's inside

Skill name
prune-comments
Description
Prune the comments in freshly implemented code — every comment earns its place under one test, or it goes. Survivors compress to one line.
License
MIT
Instructions
96 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Prune Comments

Give every comment in the code that was just implemented a verdict, and prune the
ones that haven't earned their place.

**Scope:** the recent change. If you already hold it from this session, work from
what you have; otherwise read `git diff HEAD`. An argument overrides the scope —
a path, a glob, a directory of older code.

## 1. Reconcile with the repo

The bar below is the floor. Layer the repo's own comment rules on top —
`CLAUDE.md` / `AGENTS.md` — and on conflict the repo wins.

## 2. Baseline

Run the repo's typecheck and lint before touching anything. Take the commands
from where the repo documents them (`CLAUDE.md` / `AGENTS.md`, project memory, a
`docs/` runbook), discovering them only when they're written nowhere. A tree that
arrives red is a finding to report.

## 3. The test

**Every comment in scope gets a verdict.** One question decides it:

> Would a competent reader of this code, without this comment, lose information?

Lost information means the comment carries a **why** the code cannot express and
that is worth knowing: a workaround, a constraint from outside the file, a
decision whose discarded alternative looks better than it is. Whatever the code
already says is information the reader already has.

Three verdicts:

- **Keep** — the reader would lose something, and the comment is already tight.
- **Reduce** — a why sits buried in prose that restates the code. Compress it to
  the why alone.
- **Delete** — the reader loses nothing.

A survivor is **one line**; more than one needs a reason you can state.

When deleting leaves the code unclear, **fix the code** — a sharper name, an
extracted function — so there is nothing left to explain.

### Patterns that fail the test on sight

- **Narrated preamble** — a block of prose above a method, class, or type telling
  in words what the unit does.
- **Inline changelog** — "now uses X instead of Y", "added to support Z". Git
  holds this.
- **Step narration** — `// 1. validate`, `// 2. save`, over code that already
  reads in that order.
- **Restatement** — the line's own logic, said again in words.
- **Obvious docblock** — JSDoc/TSDoc repeating the signature.

### Public API docblocks

A docblock on a library's exported API is judged by what it gives the consumer —
autocomplete, generated docs — rather than by inferability. Keep the ones that
serve the consumer, pruned to what the consumer needs.

### TODO and FIXME

A `TODO` the implementation wrote about its own work: delete it, and report it —
it often marks work left half-done that belongs in a ticket. A `TODO` older than
the scope stays as it is.

### Functional comments are out of scope

These are code wearing a comment's syntax, and they receive no verdict:
`@ts-expect-error`, `eslint-disable*`, `biome-ignore`, `prettier-ignore`,
`/// <reference>`, `// @vite-ignore`, shebangs, license headers, codegen markers.

Every file with comment syntax is in scope — TypeScript, YAML, SQL, Dockerfile,
CSS. A config option's why earns its place through the same test as any other
comment.

## 4. Verify

Re-run the baseline commands. Pruning prose leaves behavior identical, so red
means a functional comment left with it — restore that comment.

## 5. Report

In prose, in the terminal:

- What you **deleted** and **reduced**, grouped by pattern where several shared
  one.
- What you **kept**, and the why each survivor carries. This is how the human
  audits that the sweep was real.
- **Code you changed** to absorb a deleted comment, listed apart — that's a code
  change, not a comment change.
- `TODO`s you removed.
- Typecheck and lint status, plus anything that arrived red at baseline.

From noel-lopez/skills, MIT.

Signals

Stars
3
Forks
0
Open issues
0
Last commit (this folder)
Aug 21, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from noel-lopez

Cite this page

prune-comments skill. Agent Mart. https://agentmart.dev/skills/noel-lopez-prune-comments (last updated 2026-10-24)