# attach-review-to-pr

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.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 1787
- Author: NeoLabHQ
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/attach-review-to-pr/SKILL.md
- Updated: 2026-08-26
- HTML: https://affpapa.org/en/nevibecode/skills/attach-review-to-pr

## What it 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.

## Requirements
- Works with: GitHub

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/attach-review-to-pr/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/attach-review-to-pr/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/attach-review-to-pr/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/attach-review-to-pr/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NeoLabHQ/context-engineering-kit attach-review-to-pr
```

2. **Manually: put the files in place**
- File: `.github/skills/attach-review-to-pr/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NeoLabHQ/context-engineering-kit --path skills/attach-review-to-pr
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/attach-review-to-pr/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NeoLabHQ/context-engineering-kit/tree/HEAD/skills/attach-review-to-pr/SKILL.md

## When to use it
- 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
- add an inline comment on line 26 of `src/components/LessonNavigationButtons.tsx` in this PR
- collect remarks on three files and submit them as one review
- check `gh auth status` and comment on the changed line in the pull request

## Similar
- [om-review-prs](https://affpapa.org/en/nevibecode/skills/om-review-prs.md) — skill · 2600 installs
- [github-pr-review](https://affpapa.org/en/nevibecode/skills/github-pr-review.md) — skill · 576 installs
- [gh-attach](https://affpapa.org/en/nevibecode/skills/gh-attach.md) — skill · 64 installs
- [pr-review-comments](https://affpapa.org/en/nevibecode/skills/pr-review-comments.md) — skill · 2400 installs
- [github-code-review](https://affpapa.org/en/nevibecode/skills/github-code-review.md) — skill · 1300 installs
- [creating-pr](https://affpapa.org/en/nevibecode/skills/creating-pr.md) — skill · 465 installs

From the same set: [neolabhq/context-engineering-kit](https://affpapa.org/en/nevibecode/by/neolabhq/context-engineering-kit.md) — 55 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
