delete-comment
Skill622 starsChanged 12 days agoApache-2.0View on GitHub
Purge code comments from a package or directory of the apps repo. Classifies each comment as tautology, stale, excuse or decision record, deletes them, files GitHub issues for excuses, moves decision records into docs/adr/, and ratchets .comment-baseline.json down. Use when asked to delete comments, run the comment purge, or continue the comment ratchet on a path.
25 other projects use a version of this.
Adopted by
Most recently taken up by
- kriegcloud/beep-effecttheir own version, first seen Nov 30, 2026
- py-econometrics/pyfixesttheir own version, first seen Nov 30, 2026
- LodyAI/Lodytheir own version, first seen Nov 30, 2026
- nrjdalal/zerostartertheir own version, first seen Nov 30, 2026
- uzairansaruzi/hermextheir own version, first seen Nov 30, 2026
- sozercan/kasettheir own version, first seen Nov 29, 2026
Other versions25 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 25
- laramies/theHarvester★ 18ksame name
- sozercan/kaset★ 2.7ksame name
- uzairansaruzi/hermex★ 2ksame name
- LodyAI/Lody★ 1.9ksame name
- py-econometrics/pyfixest★ 370same name
- huggingface/paperswithcode★ 361same name
- stevyhacker/LokalBot★ 128same name
- kriegcloud/beep-effect★ 80same name
- nrjdalal/zerostarter★ 65same name
- orka-agents/orka★ 52same name
15 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/audius-style-guide.mdcCursor rule
- .cursor/rules/challenges.mdcCursor rule
- .cursor/rules/run-always.mdcCursor rule
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
- Very specific: line 60
Commit .comment-baseline.json with the deletions.
“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.
Files
/delete-comment
Policy: docs/adr/0001-no-code-comments.md. Code explains what; non-obvious why lives in an ADR; unfinished work lives in an issue.
Target: $ARGUMENTS (a path under the repo root). If empty, pick the path with the most budgeted comments from .comment-baseline.json and confirm it with the user.
1. Inventory
Work in a fresh worktree branched from origin/main.
node scripts/comment-ratchet.cjs --stats $ARGUMENTS
node scripts/comment-ratchet.cjs --list $ARGUMENTS > /tmp/comments.jsonlEach line is {file, line, endLine, ownLine, isLine, body}. Consecutive // lines are already merged into one block. Directives (eslint-disable, @ts-expect-error, prettier-ignore, @deprecated, generator headers, ...), generated code, vendored public/ and *.min.js files, examples/ tutorials, license headers and /** */ JSDoc in public-API packages (sdk, harmony, fixed-decimal, spl) are exempt and never listed.
2. Classify
For every listed comment, read it with the surrounding code and pick exactly one:
| Category | Meaning | Action |
| tautology | Restates the code, names or types; section headers; step narration | delete |
| stale | Commented-out code, or describes code, systems or behaviour that no longer exist (sagas, libs, discovery/content/creator nodes...) | delete |
| excuse | Admits our code is hacky, incomplete or temporary (TODO, "for now", "hack", missing types, "fix these deps") | delete + issue |
| decision | Non-obvious why a reader would get wrong without it: platform/library quirks, ordering or race constraints, money/security reasoning, deliberate fallbacks | delete + ADR |
A correct workaround for a third-party bug is a decision, not an excuse. Be strict with decisions: if a competent reader would work it out from the code in a minute, it is a tautology.
For more than ~300 comments, split the inventory into batches of ~400 and hand each batch to a worker subagent (a directive category catches pragmas the exemption regex missed; widen the regex in scripts/comment-ratchet.cjs for those) with snippets of the code around each comment. Have each one write a verdicts JSONL rather than edit files. Each verdict keeps the inventory fields and adds cat, reason, plus issue (excuse) or topic + record (decision).
Spot-check at least 30 verdicts yourself before applying, weighted toward decision and excuse.
3. Issues for excuses
Before deleting, file excuses as GitHub issues in AudiusProject/apps, grouped by area (one issue per directory or feature, never one per comment). Each issue gets a checklist of - [ ] <issue sentence> — <permalink to file#Lline at the pre-purge commit SHA>, and the tech-debt label if it exists. Confirm the number of issues with the user before creating them.
4. ADRs for decisions
Group decision verdicts by topic. For each topic, add or extend docs/adr/NNNN-<topic>.md using the template in docs/adr/README.md: one ### <file or function> subsection per record, written as a plain decision with its reason. Add every new ADR to the index in docs/adr/README.md. Extend an existing topic ADR instead of creating a duplicate.
5. Delete and ratchet
node .claude/skills/delete-comment/apply.cjs /tmp/verdicts.jsonl
npx prettier --write <touched files>
npm run lint:comments:update
npm run lint:commentsThen run lint and typecheck for each package you touched (npx turbo run lint typecheck --filter=<pkg>). Deleting a comment must never change behaviour. If lint flags a removed eslint-disable or similar, the exemption regex in scripts/comment-ratchet.cjs missed a directive: restore it and widen the regex.
Commit .comment-baseline.json with the deletions. The PR body reports comments and lines removed, issues filed and ADRs added or extended.
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
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.

