attach-review-to-pr — Claude Code skill: line comments on PRs
This skill shows the agent how to post review comments on specific lines of a pull request using GitHub CLI or an MCP tool. Handy when review happens in the terminal.
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a claude-codeWhat attach-review-to-pr does
The skill covers comments tied to individual lines of a diff, not the whole pull request. Plain gh pr review cannot do that — it only offers approve, request changes and a general comment. So the skill points the agent at the lower-level gh api command and GitHub's REST endpoints.
When the mcp__github_inline_comment__create_inline_comment tool is available, the skill recommends starting there. Without it, two routes remain: the /comments endpoint for a single remark, and /reviews for a batch of comments in one review. The second is nicer — comments land atomically and the author gets one notification instead of a stream of them.
You need the GitHub CLI installed and authenticated; the skill suggests checking with gh auth status. You also need the commit SHA, pulled from head.sha via gh api. One catch worth knowing: GitHub allows only one pending review per user per PR, so a second run on the same PR hits a 422 error. Submit or discard the pending review first.
What it helps with
- comment on one specific diff line instead of the whole PR
- group comments across several files into a single review
- fetch the latest commit SHA before posting remarks
- verify that GitHub CLI is authenticated in the current environment
- diagnose why GitHub rejects a new review with a 422 error
Example prompts for the agent
- add an inline comment on line 26 of
src/components/LessonNavigationButtons.tsxin this PR - collect remarks on three files and submit them as one review
- check
gh auth statusand comment on the changed line in the pull request
How to install attach-review-to-pr
1Skills CLI (Vercel)
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a claude-code2Manually: put the files in place
~/.claude/skills/attach-review-to-pr/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/attach-review-to-pr/
1Skills CLI (Vercel)
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a codex2Manually: put the files in place
.agents/skills/attach-review-to-pr/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a cursor2Manually: put the files in place
.cursor/skills/attach-review-to-pr/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install NeoLabHQ/context-engineering-kit attach-review-to-pr2Manually: put the files in place
.github/skills/attach-review-to-pr/SKILL.md1Skills CLI (Vercel)
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a gemini-cli2Platform CLI
gemini skills install https://github.com/NeoLabHQ/context-engineering-kit --path skills/attach-review-to-prManually: put the files in place
.devin/skills/attach-review-to-pr/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about attach-review-to-pr
How do I install attach-review-to-pr in Claude?
Run npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a claude-code. The skill lands in ~/.claude/skills/attach-review-to-pr/SKILL.md.
What does attach-review-to-pr do?
It teaches the agent to post comments on individual lines of a pull request: through an MCP tool when present, otherwise through gh api and the /comments or /reviews endpoints.
What does the skill need to work?
An installed and authenticated GitHub CLI, checked with gh auth status. Inline comments also need the commit SHA from head.sha.