git:attach-review-to-pr
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
While gh pr review provides basic review functionality (approve, request changes, general comments), it does not support line-specific comments directly. To add comments on specific lines of code, you must use the lower-level gh api command to call GitHub's REST API directly.
Prerequisites
More from neolabhq/context-engineering-kit
sdd:plan
Refine, parallelize, and verify a draft task specification into a fully planned implementation-ready task
550sdd:implement
Implement a task with automated LLM-as-Judge verification for critical steps
525customaize-agent:prompt-engineering
Use this skill when you writing commands, hooks, skills for Agent, or prompts for sub agents or any other LLM interaction, including optimizing prompts, improving LLM outputs, or designing production prompt templates.
512code-review:review-local-changes
Comprehensive review of local uncommitted changes using specialized agents with code improvement suggestions
511sdd:brainstorm
Use when creating or developing, before writing code or implementation plans - refines rough ideas into fully-formed designs through collaborative questioning, alternative exploration, and incremental validation. Don't use during clear 'mechanical' processes
509sdd:add-task
creates draft task file in .specs/tasks/draft/ with original user intent
503