
Attach Review To Pr
This handles the annoying gap in GitHub CLI where `gh pr review` can't add line-specific comments. It walks you through using `gh api` to hit the REST endpoints directly, either posting single comments to `/comments` or batching multiple comments into one review via `/reviews`. The guide prioritizes using the MCP GitHub tools when available, then falls back to CLI methods. Includes practical examples with real repos, explains the confusing bits like diff line numbers versus file line numbers, and troubleshoots the "pending review" error that blocks you when GitHub thinks you already started a review. Honestly more of a reference doc than a fire-and-forget command, but if you review code from the terminal this fills a real hole in gh's capabilities.
- skills.sh installs
- 1.2K
- GitHub stars
- 1.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add neolabhq/context-engineering-kit --skill attach-review-to-pr --agent claude-codeInstalls into .claude/skills of the current project.
Files
How to Attach Line-Specific Review Comments to Pull Requests
This guide explains how to add line-specific review comments to pull requests using the GitHub CLI (gh) API or mcp__github_inline_comment__create_inline_comment if it not available, similar to how the GitHub UI allows commenting on specific lines of code.
Preferred Approach: Using MCP GitHub Tools
If available, use the mcp__github_inline_comment__create_inline_comment MCP tool for posting line-specific inline comments on pull requests. This approach provides better integration with GitHub's UI and is the recommended method.
Fallback: If the MCP tool is not available, use the GitHub CLI (gh) API methods described below:
- For single comments: Use the
/commentsendpoint (see Adding a Single Line-Specific Comment) - For multiple comments: Use the
/reviewsendpoint (see Adding Multiple Line-Specific Comments Together)
Overview
Sponsors
Details
- Repository
- github.com/neolabhq/context-engineering-kit
- Categories
- Backend & APIs, Git & Pull Requests, Code Review & Quality, CLI & Terminal
- First seen
- Jun 3, 2026
More from neolabhq/context-engineering-kit
All 63- Git Notes1.2K
- Setup Arxiv Mcp1.2K
- Propose Hypotheses1.2K
- Build Mcp1.2K
- Load Issues1.2K
- Create Workflow Command1.2K
- Query1.2K
- Status1.2K
- Reset1.2K
- Setup Context7 Mcp1.2K
- Prompt Engineering1.5K
- Context Engineering1.5K
- Thought Based Reasoning1.4K
- Reflect1.4K
- Write Concisely1.4K
- Kaizen1.4K
- Multi Agent Patterns1.4K
- Memorize1.3K
- Update Docs1.3K
- Critique1.3K
- Brainstorm1.3K
- Judge With Debate1.3K
- Root Cause Tracing1.3K
- Agent Evaluation1.3K