remove-comments
Deletes the comments in a diff with a fresh subagent, keeping only license headers, outside constraints and public API docstrings, then fixes the code each deleted comment was propping up. Use before review, when implement or implement-spec finish their build, or when review-code flags comments.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- remove-comments
- description
- Deletes the comments in a diff with a fresh subagent, keeping only license headers, outside constraints and public API docstrings, then fixes the code each deleted comment was propping up. Use before review, when implement or implement-spec finish their build, or when review-code flags comments.
02 资源文件 3
- 参考文档agents/openai.yaml118 B
- 参考文档CREDITS.md448 B
- 参考文档references/comment-reviewer.md2.1 KB
03 SKILL.md 正文
Remove Comments
The code says what it does; a comment that has to explain our own code marks a name, a type or a shape to fix. This pass deletes comments and turns what they were covering for into fixes.
Scope
The files or diff the caller passes. Otherwise the current diff against the default branch, working tree included.
Steps
-
Spawn the reviewer. Start one subagent with a fresh context. Its prompt is references/comment-reviewer.md verbatim, then the scope. It deletes comments and reports; it never changes application code.
-
Judge its report and diff. Reject:
- edits to application code, or to files outside the scope;
- deletions of a comment the keep-list protects;
- a
MUST FIXwhose reason is wrong, or that flags intended code as a mistake.
A comment that explained a surprise in our own code stays deleted, with its
MUST FIX. A kept comment stays only with proof it is about something we can't change. If a deletion or a keep is unclear, read the code it names until it isn't; when it is still unclear, the comment goes. Revert and rerun a rejected report once, naming what was wrong; if the second is wrong too, stop and report it open. -
Fix the flags. Fix the small ones directly: rename, delete a dead path, drop a parameter, use the real API. When a fix needs a new shape (a type, an extracted function, a moved responsibility), sketch it first, then build the smallest root-cause fix within the scope, as
principle-fix-root-causesdescribes. Report fixes that need work outside the scope as open; don't widen the scope. -
Encode claimed constraints. A comment that said
do not remove,keep this orderortalk to X before changingclaims a rule. Offer the user the cheapest check that enforces it: a type, a runtime assertion, a test or a lint. When they accept, add it and delete the comment; otherwise delete the comment and report the rule as unenforced. When running unattended, report the offer instead of waiting. -
Report in chat: comments deleted, comments kept and why,
MUST FIXflags and what fixed each, constraints encoded or left open, reruns, and anything left open.
04 同仓库更多 Skills
write-walkthrough
Guide you through running a demo yourself that shows a fix or a new feature working: a few numbered steps in the chat, each a command to copy or a click to make, with what you should see.
write-spec
Turn the current conversation into a spec and publish it to the project issue tracker: no interview, just synthesis of what you've already discussed.
write-questionnaire
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
write-pr
Writes a PR or MR from a fixed template: the tickets it closes, a summary sketch, before and after evidence that proves each acceptance criterion (screenshots for visible changes), and merge danger (one-way or two-way door, blast radius). Use when opening, writing or updating a pull request or merge request.
write-issue
Files and moves issues on the repo's tracker (GitLab, GitHub or local files): one kind (bug, feature, chore) and one stage each, a title, the kind's template, and what each later stage needs. Use when filing, relabelling, moving or closing an issue, when work should be recorded instead of done now, or to split big work into child tickets.
write-for-agents
How to write documents an agent reads: context pointers, information hierarchy, completion criteria, leading words and pruning, plus skill frontmatter and invocation mechanics. Use when creating or editing a skill, AGENTS.md, CLAUDE.md, or any doc an agent reaches through a pointer.