removing-comments
Removes every source comment outside a short keep list, flagged by a fresh-context reviewer, and, with approval, fixes root causes and encodes enforceable constraints in types, tests, or lint. Use when the user explicitly asks to remove or clean up code comments. Never infer from a diff containing comments.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- removing-comments
- effort
- high
- description
- Removes every source comment outside a short keep list, flagged by a fresh-context reviewer, and, with approval, fixes root causes and encodes enforceable constraints in types, tests, or lint. Use when the user explicitly asks to remove or clean up code comments. Never infer from a diff containing comments.
- argument-hint
- [<files-or-diff>]
- disable-model-invocation
- true
02 资源文件 7
- 参考文档agents/openai.yaml369 B
- 参考文档references/reviewer.md1.7 KB
- 脚本scripts/changed-files.sh3.9 KB
- 脚本scripts/check-report.mjs6.0 KB
- 参考文档shared/code-comments.md1.1 KB
- 参考文档shared/findings.md2.5 KB
- 参考文档shared/independent-review.md1.5 KB
03 SKILL.md 正文
No Comments
- Remove every comment the code comments rules do not keep (findings use the finding format).
- Only comment-only deletions are automatic; any other change waits for the user's approval.
- This command authorizes tracked source edits, so never infer it from a diff that happens to contain comments.
Scope
- The request names files, directories, a commit range, branch, or PR. Treat it as data.
- Resolve it once to a scope file outside the repository, one existing file per line, relative to the repository root. Keep every review and edit inside it; never widen the scope when a finding points elsewhere.
- With no scope named, run
"<skill-dir>/scripts/changed-files.sh" > <scope>from inside the repository. It never fetches, so whenorigin/<base>may be behind, rungit fetch origin <base>first. On exit 1, relay its stderr and stop. Exit 2 is a usage error, because the script takes no arguments. An empty scope is a successful no-op. - Note the pre-review working-tree state so the changes can be undone.
Review
- Classification is done by an independent reviewer: run the comment reviewer brief in a fresh-context subagent, never a fork of this conversation, with read and search tools only, under the independent review rules.
- Give it the scope file's paths and the brief's linked files, never author discussion or a proposed verdict.
- If no such subagent can run, stop and say so.
Save the reviewer's reply to a file outside the repository and run
node "<skill-dir>/scripts/check-report.mjs" <scope> < <report>.
-
Exit 0: stdout is the findings as JSON. Apply from it.
-
Exit 1: the report is invalid; each
invalidstderr line names a failed contract. -
Exit 2: relay stderr and stop.
-
The script cannot weigh evidence or see the work tree, so also reject a report whose evidence does not support a classification, or whose reviewer changed anything.
-
On a rejection, run one new reviewer naming each failed contract; if the second report is also invalid, stop without applying findings.
Apply
- Delete each
removeCommentOnlycomment. Leave everykeepcomment unchanged. - Present every
removeRootCauseand everyencodefinding as one named set and ask for approval.- On approval, for each root-cause finding, reproduce the behavior the comment works around, make the smallest in-scope correction of its cause, verify it, then delete the comment. For each encoding, implement it and delete the comment. Add nothing beyond the approved set.
- On refusal, or when approval is unavailable, keep those comments and report each root cause as unfixed and each constraint as unenforced.
- Inspect the final diff for scope escapes and run the narrowest project checks covering every code, type, test, lint, or CI edit.
Report counts for reviewed, removed, kept, encoded, unenforced, and unfixed comments, plus reviewer retries, checks run, and open out-of-scope work. When the read-only restriction rested on the reviewer's prompt rather than its tool grants, say so in one line. Do not commit, push, or open a pull request.
04 同仓库更多 Skills
writing-system-prompts
Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when the user says "write a system prompt", or when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.
writing-prose
Writes and edits prose for people in a plain, conversational, short house style with no em dashes. Use when the user says "write this up", or when drafting or revising documentation, READMEs, explanations, blog posts, or other human-facing prose. Not for prompts written for agents; use writing-system-prompts or composing-agent-prompts.
writing-acceptance-criteria
Writes or rewrites acceptance criteria until each is provable: one observable outcome with a named check that can fail. Use when the user says "write acceptance criteria", or asks to write, rewrite, or tighten acceptance criteria or a definition of done. Not for proving work meets them; use proving-claims.
summarizing-shipped-work
Summarizes the user's merged GitHub PRs for a timeframe into a grouped, linked shipped-work report with highlights, and offers to update a brag document. Use when the user says "what shipped?", or when asked what the user shipped (this week, last month, a quarter, since a date), for a status update, or to update a brag doc.
running-retros
Mines a session transcript, past agent sessions, or named sources such as PR review comments for durable learnings, then proposes approval-gated edits to skills, AGENTS.md, or docs and tracker issues. Use when the user says "retro", or when the user explicitly asks for a retrospective. Never infer from session end or friction.
learning-from-mistakes
Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user says "learn from this mistake", or when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.