agentleFS
nrjdalalnrjdalal/zerostarter/.agents/skills/delete-comment/SKILL.md

delete-comment

Skill65 starsChanged 4 days agoMITView on GitHub

Delete code comments by category. Use when `bun run lint` fails on a file's comment lines, or to repeat the comment sweep on a path.

25 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run bun run lint. Done when it exits 0.

    line 24

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Delete Comment

bun run lint runs packages/scripts/src/check-comments.ts, which counts each tracked source file's comment lines and fails a file that holds more than the same file on origin/canary. A file new to canary holds none. Directives (oxlint-, eslint-, @ts-, /// <reference, biome-ignore, #region), the Apache licence block and web/next/src/components/ui are not counted. With no origin/canary, or in a fork (no .gitpickignore, which gitpick never copies), the check prints one line and skips.

Sweep a path

  1. List the comments under the path. Done when each one has a category below.
  2. Categorise each comment:
    • Tautology: repeats what the code already shows: deleting it loses no fact the code in this file does not show. A line that states another module's behaviour (an API's shape, a library's contract, a cleanup guarantee) fails that test, so it is a local why.
    • Stale: names code or behaviour that no longer exists.
    • Excuse: explains away a hacky implementation, so the hack spreads.
    • Decision: records a non-obvious choice. A decision that spans files is cross-file; one that explains a single line is a local why.
  3. Act on each category:
    • Tautology, Stale: delete the comment.
    • Excuse: delete the comment and file one GitHub issue that names the file and the fix.
    • Decision, cross-file: write an ADR (below), then delete the comment.
    • Decision, local why: keep it as one line.
  4. Run bun run lint. Done when it exits 0.

Write an ADR

One file per decision, .github/notes/adr/NNNN-<slug>.md, numbered next after the highest; its README holds the shape. Done when the file states the context, the decision and the consequences, and names the files it governs.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.