delete-comment
БесплатноБез исполняемых скриптовНе проверенRemove code comments from a section of Core. Classifies every comment as tautology, stale, excuse or decision record, deletes them, files an issue for each…
от Asymmetric-al★ 354 звезды на GitHubОб этом скилле
Delete comments
Comments are banned in Core's TypeScript and JavaScript source
(#2751). The lint rule
core/no-comments refuses a comment in a new file. For a file that already
had comments, tooling/eslint-config/comment-baseline.json records how many,
and that number only goes down. This skill takes one section to zero.
The vendored no-comments skill is a different tool: an explicit-only review
of the comments in one diff. Use this skill for a section of the codebase and
for anything about the ban or its baseline.
If you only hit the gate
- You wrote a comment. Delete it. Say it in the code: a name, a type, a test. If it records a decision, write the decision where step 5 says. If it excuses a workaround, fix the workaround or file the issue from step 4.
verify:commentssays the baseline is out of date. Comments were deleted. Runbun run verify:comments -- --writeand commit the baseline.verify:commentssays a file gained comments. Delete the new ones. No flag raises a count.- A tool reads the comment and the rule does not know its form. Add the
pattern to
tooling/eslint-config/no-comments.mjswith a case intests/unit/scripts/no-comments-lint-rule.test.ts. Never reword prose so that it passes for a directive.
The pass
Work on one section per pull request: one workspace or one directory, about 500 comments at most. Change no code in this pass.
1. Choose the section
The argument is a path. With no argument, run
bun run verify:comments -- --report, which lists comments and comment-only
lines by area, and propose the area with the most lines that fits one pull
request.
2. List every comment
mkdir -p .tmp/comment-audit
node scripts/delete-comments.mjs list <path> > .tmp/comment-audit/inventory.json
.tmp/ is gitignored. Each entry has file, line, endLine, kind and
text. A run of // lines is one entry per line: judge the run as one
thought.
3. Classify each one
Read the whole file before judging its comments.
| Category | Meaning | What happens |
|---|---|---|
| Tautology | Repeats what the names, types and next few lines already say | Deleted |
| Stale | Describes code, behaviour or history that is gone or different now | Deleted |
| Excuse | Lets a workaround in our own code stand | Deleted, and an issue is filed to fix it |
| Decision record | Gives a non-obvious reason that a later editor could break unknowing | Deleted, and the reason moves into an ADR |
- Stale needs proof. Search the repository for what the comment names. If you cannot show it is gone or different, it is not stale.
- Excuse or decision. A workaround that a better implementation in our code would remove is an excuse. One forced by a framework, runtime, browser or provider that we cannot change is a decision.
- Tautology or decision. Ordinary engineering that any reader assumes is a tautology. If breaking it would cause a security, tenancy, money or data bug, it is a decision.
- A long comment that mixes these takes the category of its most valuable part. Record only the durable part.
For a section of more than about 100 comments, split the files into groups
and give each group to a subagent with
references/classifier-brief.md. The
subagents write JSON and edit nothing. Then check their work yourself: every
stale, every excuse, a sample of the tautologies, and any group that put more
than 85% of its comments in one category.
4. File an issue for each excuse
- Confirm the workaround is still in the code.
- Search open issues for it. One issue per workaround, however many comment lines describe it.
- Title the issue with the fix. In the body give the file and line, what is
wrong, what a proper implementation looks like, and the comment's text.
Apply exactly one
type:*and onecomplexity:*label (docs/ai/rules/general.md).
File the issues when the user asked for this pass. Otherwise list them and ask first.
A lint or TypeScript suppression (eslint-disable, @ts-expect-error) is an
excuse the pass cannot delete: the gate it silences would fail. It stays,
with the tracking reference bun run verify:eslint requires. Report how many
the section holds.
5. Move each decision record into an ADR
- Check it is not already recorded. Search
docs/adr/,openspec/specs/,openspec/contracts/and the rulebook for the area. If an accepted record says it, delete the comment and write nothing. - Write it beside the code: `
/
Установить delete-comment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл delete-comment?
Remove code comments from a section of Core. Classifies every comment as tautology, stale, excuse or decision record, deletes them, files an issue for each excuse, moves each decision record into an ADR, and lowers the comment ratchet. Use when the user runs /delete-comment or asks to delete, audit or clean up comments in a path, and when the `core/no-comments` lint rule or `bun run verify:comments` fails.
Как установить скилл delete-comment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл delete-comment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic