AGENT SKILL

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

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

  1. 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.

  2. 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 FIX whose 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.

  3. 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-causes describes. Report fixes that need work outside the scope as open; don't widen the scope.

  4. Encode claimed constraints. A comment that said do not remove, keep this order or talk to X before changing claims 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.

  5. Report in chat: comments deleted, comments kept and why, MUST FIX flags and what fixed each, constraints encoded or left open, reruns, and anything left open.

04 同仓库更多 Skills

Med-Karim-Ben-Boubaker
Med-Karim-Ben-Boubaker/karim-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.

★ 1
Med-Karim-Ben-Boubaker
Med-Karim-Ben-Boubaker/karim-skills

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.

★ 1
Med-Karim-Ben-Boubaker
Med-Karim-Ben-Boubaker/karim-skills

write-questionnaire

Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

★ 1
Med-Karim-Ben-Boubaker
Med-Karim-Ben-Boubaker/karim-skills

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.

★ 1
Med-Karim-Ben-Boubaker
Med-Karim-Ben-Boubaker/karim-skills

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.

★ 1
Med-Karim-Ben-Boubaker
Med-Karim-Ben-Boubaker/karim-skills

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.

★ 1