GitHub Publish PR Comment
Use this skill when the user wants to publish a general PR comment that should appear in the pull request conversation rather than on a specific file line.
Do not use this skill for inline or file-line review comments. Use github-publish-inline-review-comment for those.
Inputs
- Require
repo_full_name. - Require
pr_number. - Require the exact comment body to publish.
Workflow
- Resolve the exact target from explicit user input or trusted local context.
repo_full_namemust be anowner/repostring.pr_numbermust identify a pull request in that repo, not a general issue.- If the repo, PR number, or intended target is ambiguous, ask before posting.
- Confirm the target before posting by checking PR metadata when the GitHub app or
ghcan read it.- Verify at least the repo, PR number, title, and open/closed state.
- If metadata cannot be read, only proceed when the user explicitly supplied the repo and PR number.
- Use the GitHub app MCP issue-comment creation tool for the write when available.
- If that tool is unavailable, use
gh pr commentagainst the confirmed repo and PR. - Do not use review-submission APIs for a top-level PR conversation comment.
- If that tool is unavailable, use
- Publish exactly the supplied comment body.
- Do not add wrapper text like
Publishing comment .... - Do not add unrelated review summaries.
- Do not edit, summarize, reformat, or prefix the comment body.
- Do not add wrapper text like
- If the write result is unclear, check the PR conversation for the exact body before retrying.
- Do not retry blindly; avoid duplicate comments.
- Return a short success or failure status.
Output
- Success:
Published a top-level PR comment to PR #123.
- Failure:
Could not publish the top-level PR comment to PR #123: ...