From 2a61cb364c9aaba5ec3f558512cd1818eb02de1e Mon Sep 17 00:00:00 2001 From: Franklin Volcic Date: Wed, 17 Dec 2025 15:20:12 -0800 Subject: [PATCH] Add inline comments with suggestions to code-review plugin --- plugins/code-review/commands/code-review.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/plugins/code-review/commands/code-review.md b/plugins/code-review/commands/code-review.md index 5029e4fc..a23b3d31 100644 --- a/plugins/code-review/commands/code-review.md +++ b/plugins/code-review/commands/code-review.md @@ -1,5 +1,5 @@ --- -allowed-tools: Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*), Bash(gh pr list:*) +allowed-tools: Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh pr comment:*), Bash(gh pr diff:*), Bash(gh pr view:*), Bash(gh pr list:*), mcp__github_inline_comment__create_inline_comment description: Code review a pull request --- @@ -11,7 +11,7 @@ To do this, follow these steps precisely: - The pull request is closed - The pull request is a draft - The pull request does not need code review (e.g. automated PR, trivial change that is obviously correct) - - You have already submitted a code review on this pull request + - Claude has already commented on this PR (check `gh pr view --comments` for comments left by claude) If any condition is true, stop and do not proceed. @@ -61,6 +61,17 @@ Note: Still review Claude generated PR's. c. Link and cite relevant code, files, and URLs for each issue d. When citing CLAUDE.md violations, you MUST quote the exact text from CLAUDE.md that is being violated (e.g., CLAUDE.md says: "Use snake_case for variable names") +8. Post inline comments for each issue using `mcp__github_inline_comment__create_inline_comment`: + - `path`: the file path + - `line` (and `startLine` for ranges): select the buggy lines so the user sees them + - `body`: Brief description of the issue. For small fixes (1-3 lines), include a committable suggestion: + ```suggestion + corrected code here + ``` + For larger fixes, describe the solution approach instead of providing code. + + **IMPORTANT: Only post ONE comment per unique issue. Do not post duplicate comments.** + Use this list when evaluating issues in Steps 4 and 5 (these are false positives, do NOT flag): - Pre-existing issues