agentleFS
mugiwaraluffy56mugiwaraluffy56/oss-skills/comment-pr/SKILL.md

comment-pr

Skill1 starsChanged 7 months agoMITView on GitHub

Draft and post a simple, human GitHub pull request comment after reviewing the PR context. Use when the user asks to comment on a PR, reply to a maintainer, follow up on review feedback, or post a short status/update message to a pull request. Always preview the exact comment and wait for explicit user approval before posting.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. niilohlin/skills★ 0same 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 repository3 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. About 0 are common, 19 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never post a comment before showing the exact final comment to the user and getting explicit approval.

    line 18
  2. Distinctive:

    If approval is unclear, ask again.

    line 29
  3. Distinctive:

    If the user supplied a PR URL or number, use it directly.

    line 35
  4. Distinctive:

    If the user did not specify a PR, find the current branch and associated PR:

    line 37
  5. Distinctive:

    If no PR can be identified, stop and ask the user for the PR URL or number.

    line 44
  6. Distinctive:

    Read enough context to understand what the comment is replying to:

    line 48
  7. Distinctive:

    Use the PR's actual discussion.

    line 62
  8. Distinctive:

    ask for confirmation on an approach

    line 72
  9. Distinctive:

    If the intent is still ambiguous after reading the PR, ask the user one concise question before drafting.

    line 76
  10. Distinctive:

    Write like a real open source contributor, not a bot.

    line 81
  11. Distinctive:

    no AI/tool mentions

    line 91
  12. Distinctive:

    no bullet list unless the comment genuinely needs multiple concrete items

    line 96
  13. Distinctive:

    Do not run the posting command until the user approves.

    line 136
  14. Distinctive:

    After approval, write the approved body to a temporary file and post it:

    line 140
  15. Very specific:

    If gh pr comment is unavailable, use the GitHub API issue comment endpoint:

    line 146
  16. Distinctive:

    After posting, print the PR URL and confirm that the comment was posted.

    line 152
  17. Distinctive:

    If the PR is closed or merged, mention that in the preview and ask whether to still comment.

    line 156
  18. Distinctive:

    If the comment contains claims about tests, verify those test commands actually ran or say only that the change was pushed.

    line 158
  19. Distinctive:

    If a maintainer asked for something and the local diff does not show it was done, do not claim it is done.

    line 160
  20. Distinctive:

    If there are multiple maintainers or multiple review threads, be clear which feedback the comment is addressing.

    line 162

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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-pr

Post a thoughtful GitHub pull request comment that sounds like the user wrote it.

The user may provide a PR URL, PR number, branch name, or a rough intent such as "reply to the maintainer", "say I fixed it", or "ask if this approach is okay".

Hard rule

Never post a comment before showing the exact final comment to the user and getting explicit approval.

Approval must be clear, such as:

yes post it
looks good, comment
go ahead

If approval is unclear, ask again. Do not infer approval from silence.

Workflow

1. Identify the PR

If the user supplied a PR URL or number, use it directly.

If the user did not specify a PR, find the current branch and associated PR:

git branch --show-current
gh pr view --json number,url,title,author,headRefName,baseRefName,state

If no PR can be identified, stop and ask the user for the PR URL or number.

2. Read the PR context

Read enough context to understand what the comment is replying to:

gh pr view <pr> --json number,url,title,body,author,state,headRefName,baseRefName,comments,reviews,latestReviews,files

Also inspect recent local work when it helps explain status:

git status --short
git log --oneline --decorate -n 8
git diff --stat

Use the PR's actual discussion. Do not invent maintainer feedback, test results, or project details.

3. Decide the comment intent

Classify the message before drafting:

  • reply to review feedback
  • say requested changes are done
  • explain an implementation choice
  • ask for confirmation on an approach
  • share a blocker or request guidance
  • give a short status update

If the intent is still ambiguous after reading the PR, ask the user one concise question before drafting.

4. Draft the comment

Write like a real open source contributor, not a bot.

Style rules:

  • simple, direct, and human
  • short, usually 1 to 4 sentences
  • lowercase is okay where natural
  • mild capitalization only: first word of a sentence and proper nouns
  • no em dashes
  • no corporate wording
  • no AI/tool mentions
  • no "implemented", "leveraged", "utilized", "streamlined", or similar inflated words
  • no fake certainty
  • no over-apology
  • no signoff
  • no bullet list unless the comment genuinely needs multiple concrete items

Prefer comments like:

thanks for the review. i pushed the change to keep this path behind the existing
validation, and added a test for the empty value case.
i updated this based on your suggestion. the helper now returns early when there
is no configured backend, which keeps the current behavior for the default path.
i'm not fully sure whether you want this handled here or closer to the caller. i
kept it here for now since this is where the existing validation already happens.

Avoid comments like:

This PR has been updated to comprehensively address the feedback by leveraging
the existing validation infrastructure.

5. Preview and wait

Show the user:

  • the PR URL
  • the exact comment body
  • the command that will be used to post it

Then ask:

should i post this?

Do not run the posting command until the user approves.

6. Post after approval

After approval, write the approved body to a temporary file and post it:

gh pr comment <pr> --body-file /tmp/comment-pr-body.md

If gh pr comment is unavailable, use the GitHub API issue comment endpoint:

gh api repos/<owner>/<repo>/issues/<pr-number>/comments --method POST --field body="$(cat /tmp/comment-pr-body.md)"

After posting, print the PR URL and confirm that the comment was posted.

Safety checks

  • If the PR is closed or merged, mention that in the preview and ask whether to still comment.
  • If the comment contains claims about tests, verify those test commands actually ran or say only that the change was pushed.
  • If a maintainer asked for something and the local diff does not show it was done, do not claim it is done.
  • If there are multiple maintainers or multiple review threads, be clear which feedback the comment is addressing.

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.