github-comment-respond
Scannednpx machina-cli add skill bryanp/agent-skills/respond --openclawFiles (1)
SKILL.md
430 B
First, find the comment ID by listing review comments:
gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
Then reply to a specific comment:
gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies -f body="Thanks, fixed!"
Rule: Identity
First use the identity skill to assume the identity of the agent.
Source
git clone https://github.com/bryanp/agent-skills/blob/main/code/github/comment/respond/SKILL.mdView on GitHub Overview
Automates replying to a GitHub pull request comment by first locating the target comment and then posting a reply. It ensures feedback stays in the PR thread and reduces manual steps for maintainers.
How This Skill Works
First, the agent uses the identity skill to assume its identity. Then it lists review comments for the PR to retrieve the target comment-id, and finally calls the replies endpoint to post the body.
When to Use It
- You want to acknowledge a reviewer's suggestion on a specific PR comment.
- You need to provide a concise fix or follow-up after addressing feedback.
- You want to ask a clarifying question on a code review comment.
- You want to thank a reviewer after pushing changes.
- You are closing a feedback thread by delivering a final reply.
Quick Start
- Step 1: Use the identity skill to assume the agent's identity.
- Step 2: List the PR review comments to locate the target comment: gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
- Step 3: Reply to the target comment: gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies -f body=\"Your reply text\"
Best Practices
- Confirm the correct comment-id before replying.
- Keep replies concise, actionable, and respectful.
- Quote or reference the relevant code or discussion when needed.
- Include clear next steps or requests in the reply.
- Test the interaction in a safe repo or staging PR before production use.
Example Use Cases
- Reply to a PR comment with: 'Thanks, fixed as requested' after pushing a new commit.
- Ask for clarification in response to a comment about test coverage.
- Provide an update like 'Addressed the feedback in commit abc123' in the reply.
- Thank a reviewer for their suggestion and outline the next steps.
- Let reviewers know that the changes resolve the concerns in the discussion.
Frequently Asked Questions
Add this skill to your agents