Skip to content

Comments

code-review: Use inline review comments with suggested changes#424

Closed
projectdelta6 wants to merge 1 commit intoanthropics:mainfrom
projectdelta6:feature/inline-review-suggestions
Closed

code-review: Use inline review comments with suggested changes#424
projectdelta6 wants to merge 1 commit intoanthropics:mainfrom
projectdelta6:feature/inline-review-suggestions

Conversation

@projectdelta6
Copy link

Summary

  • Updates the code-review skill to post inline review comments with GitHub's suggestion syntax instead of regular PR comments
  • PR authors get an "Apply suggestion" button in the GitHub UI to directly commit fixes with one click

Changes

  • Added Bash(gh api:*) to allowed-tools to enable the GitHub Reviews API
  • Updated step 8 to use gh api repos/{owner}/{repo}/pulls/{number}/reviews with a comments array for inline comments
  • Added documentation for the Reviews API call format, including line number semantics and indentation handling
  • Updated the output format to reference inline comments

Motivation

Currently the skill posts a single regular comment on the PR with links to the relevant code. The reviewer has to manually navigate to each file and make changes themselves. With inline review comments using suggestion blocks, each issue appears directly on the relevant lines of code with a one-click "Apply suggestion" button.

Closes #423

Test plan

  • Run /code-review on a PR with known issues and verify inline comments appear on the correct lines
  • Verify the "Apply suggestion" button appears and produces the correct code when clicked
  • Verify issues without a concrete fix appear in the review body instead

🤖 Generated with Claude Code

Instead of posting a single regular PR comment, use the GitHub Reviews
API to post inline comments with ```suggestion blocks on the exact
lines of code. This gives PR authors an "Apply suggestion" button in
the GitHub UI to directly commit fixes.

Changes:
- Add Bash(gh api:*) to allowed-tools for Reviews API access
- Update step 8 to use gh api for inline review comments
- Add documentation for the Reviews API call format
- Update output format to reference inline comments

Closes anthropics#423

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

Thanks for your interest! This repo only accepts contributions from Anthropic team members. If you'd like to submit a plugin to the marketplace, please submit your plugin here.

@github-actions github-actions bot closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

code-review: Use inline review comments with suggested changes instead of regular PR comments

1 participant