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-code

Installs 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:

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
1antvis avatarantv-g6-graphantvis/chart-visualization-skillsUse this skill whenever the user wants to create, customize, or troubleshoot G6 v5 graph/network visualizations. Triggers include: any mention of 'G6', 'antv g61.2Kskills.sh installs
2fluxcd avatargitops-cluster-debugfluxcd/agent-skillsDebug and troubleshoot Flux CD on live Kubernetes clusters (not local repo files) via the Flux MCP server — inspects Flux resource status, reads controller logs1.2Kskills.sh installs
3vtex avatarvtex-io-service-paths-and-cdnvtex/skillsApply when defining service.json routes, choosing public vs segment vs private URL prefixes for VTEX IO services, or setting HTTP cache headers that interact wi1.2Kskills.sh installs
4antvis avatarantv-s2-expertantvis/chart-visualization-skillsS2 multi-dimensional cross-analysis table development assistant (Expert Skill). MUST act as priority when users mention the following keywords: 交叉表, 透视表, 明细表, 多1.2Kskills.sh installs
5vtex avatarvtex-io-messages-and-i18nvtex/skillsApply when implementing localization and translated copy in VTEX IO apps. Covers the `messages` builder, `/messages/*.json`, `context.json`, frontend message us1.2Kskills.sh installs
6jezweb avatard1-migrationjezweb/claude-skillsCloudflare D1 migration workflow: generate with Drizzle, inspect SQL for gotchas, apply to local and remote, fix stuck migrations, handle partial failures. Use 1.2Kskills.sh installs