agentleFS
angelod1asangelod1as/claude-skills/skills/comment/SKILL.md

comment

Skill0 starsChanged 2 months agoMITView on GitHub

Use when the user invokes /comment to process the Claude bot's comments on a pull request — reads the last 3 comments of every kind, applies the valid ones, explains the invalid ones, then deletes the processed Claude comments from the PR

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. patrickjaja/claude-desktop-extra★ 734same name
    2. SprintsAI/lightsprint-claude-code-plugin★ 2same name

    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 repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the user passes a PR number as argument (e.g.

    line 16
  2. Distinctive:

    Delete each processed comment authored by Claude, whether it was applied or rejected:

    line 44
  3. Very specific:

    Check the user.login field.

    line 53
  4. Distinctive:

    Never delete anything else — not human users, not other bots, not other workflows.

    line 58
  5. Distinctive:

    Never post a comment of our own: Do not reply on the PR, do not leave a note explaining what was applied or rejected, do not open a new …

    line 66
  6. Distinctive:

    Do not switch to plan mode — you may be running alongside sub-agents.

    line 70
  7. Distinctive:

    Ask permission before applying a fix, and before deleting.

    line 71
  8. Distinctive:

    Only delete a Claude comment you actually processed in this round.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Comment

Process the Claude bot's review comments on a pull request: read them, apply what is valid, explain what is not, then remove the Claude comments that were processed.

Human comments are read and evaluated but are never deleted.

Determining the PR

  • If the user passes a PR number as argument (e.g. /comment 123), use it directly.
  • Otherwise: gh pr view --json number --jq .number from the current directory. This works in regular branches and worktrees, since git context is per-directory.
  • Owner/repo: gh repo view --json nameWithOwner --jq .nameWithOwner

Comments to read

"Comment" is not only the inline code-view comment. Fetch all three kinds:

  • Issue comments — the PR conversation body: gh api repos/{owner}/{repo}/issues/{pr}/comments --paginate
  • Review comments — inline, on a diff line: gh api repos/{owner}/{repo}/pulls/{pr}/comments --paginate
  • Reviews — the top-level review body: gh api repos/{owner}/{repo}/pulls/{pr}/reviews --paginate

Merge all three into one list, sort by created_at, and take the last 3 overall.

Steps

  1. Resolve the PR number.
  2. Fetch the three comment kinds above and take the last 3 by creation time.
  3. For each comment, evaluate whether the suggestion is valid and beneficial.
    • Valid → apply the change.
    • Invalid → state clearly why (wrong assumption, would break something, already handled, out of scope for this PR, etc.).
    • Unclear → ask the user. Do not guess, and do not apply a change whose intent or relevance you are not sure of.
  4. Delete each processed comment authored by Claude, whether it was applied or rejected:
    • Issue comment: gh api -X DELETE repos/{owner}/{repo}/issues/comments/{id}
    • Review comment: gh api -X DELETE repos/{owner}/{repo}/pulls/comments/{id}
    • Review: gh api -X DELETE repos/{owner}/{repo}/pulls/{pr}/reviews/{id}
  5. Report a summary: what was applied, what was rejected and why, what was deleted, and what was left on the PR.

Whose comments get deleted

Check the user.login field. Delete only:

  • claude-code[bot], or any login containing claude
  • github-actions[bot] only if the comment body mentions Claude/claude

Never delete anything else — not human users, not other bots, not other workflows. Be conservative: when unsure who authored a comment, leave it.

A rejected Claude comment is still deleted; the reason for the rejection lives in the summary you give the user, not on the PR.

Rules

  • Never post a comment of our own. Do not reply on the PR, do not leave a note explaining what was applied or rejected, do not open a new thread. The best outcome of this process is: the change is made and the originating Claude comment is gone. The summary goes to the user in the terminal, never onto the PR.
  • Do not switch to plan mode — you may be running alongside sub-agents.
  • Ask permission before applying a fix, and before deleting.
  • Only delete a Claude comment you actually processed in this round. Older Claude comments outside the last 3 stay put.
  • Human comments are never deleted, even after their suggestion is applied. The author closes them.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.