Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a claude-code
Open on GitHub

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

How to install attach-review-to-pr

1Skills CLI (Vercel)

npx skills add NeoLabHQ/context-engineering-kit --skill attach-review-to-pr -a claude-code

2Manually: put the files in place

~/.claude/skills/attach-review-to-pr/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/attach-review-to-pr/

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.

Similar skills

Everything for Code review and refactoring →

From the same set55

load-issues The skill pulls every open issue from the current repository with gh and writes each one to its own markdown file. Handy when you want tasks outside GitHub. CX Codex +1 1,200installs propose-hypotheses Runs the whole First Principles Framework cycle: generates competing hypotheses, verifies logic, validates evidence and produces a decision record. CX Codex +1 1,200installs create-command Interactive helper for drafting custom slash commands. Configures frontmatter, argument handling, and pre-run bash context. CX Codex +1 1,200installs setup-arxiv-mcp Sets up an academic paper search MCP server through Docker MCP and records its tools in CLAUDE.md. Use it when an agent needs to search or read research papers. CX Codex +1 1,200installs git-worktrees Teaches your AI coding assistant to manage multiple linked Git working trees. Helpful for handling hotfixes, PR reviews, and parallel builds without stashing changes. CX Codex +1 1,200installs actualize Checks an FPF knowledge base against Git changes and flags evidence or decisions that may need review. Use it before new work or after repository changes. CX Codex +1 1,200installs create-hook The skill scans your project and suggests hooks for your stack: type checks, formatting, linting, tests. Then it writes the script and tests it. CX Codex +1 1,200installs create-pr Opens draft pull requests through the GitHub CLI using repository templates. It checks for uncommitted changes and formats PR titles with emojis. CX Codex +1 1,200installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor