spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

Skip summary comment when posting inline commentsBrowse files
Only post a summary comment when no issues are found. When issues
exist, post inline comments directly without a redundant summary block.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Franklin Volcic authored on Dec 18, 2025 parent b31e2fd · commit 9fd556d94719
1 changed file+7 -35compared with b31e2fd
Mplugins/code-review/commands/code-review.md
@@ -52,18 +52,12 @@
5252
5353 6. Filter out any issues that were not validated in step 5. This step will give us our list of high signal issues for our review.
5454
55-7. Post summary comment FIRST using `gh pr comment` (if `--comment` argument is provided):
56- - Total number of issues found
57- - Brief one-line summary of each issue (no "Bug:" prefix)
58- - Or if no issues: "No issues found. Checked for bugs and CLAUDE.md compliance."
55+7. If issues were found, skip to step 8 to post inline comments directly.
5956
60- When writing your comment, follow these guidelines:
61- a. Keep your output brief
62- b. Avoid emojis
63- c. Link and cite relevant code, files, and URLs for each issue
64- 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")
57+ If NO issues were found, post a summary comment using `gh pr comment` (if `--comment` argument is provided):
58+ "No issues found. Checked for bugs and CLAUDE.md compliance."
6559
66-8. THEN post inline comments for each issue using `mcp__github_inline_comment__create_inline_comment`:
60+8. Post inline comments for each issue using `mcp__github_inline_comment__create_inline_comment`:
6761 - `path`: the file path
6862 - `line` (and `startLine` for ranges): select the buggy lines so the user sees them
6963 - `body`: Brief description of the issue (no "Bug:" prefix). For small fixes (up to 5 lines changed), include a committable suggestion:
@@ -93,40 +87,18 @@
9387
9488 - Use gh CLI to interact with GitHub (e.g., fetch pull requests, create comments). Do not use web fetch.
9589 - Create a todo list before starting.
96-- You must cite and link each issue (e.g., if referring to a CLAUDE.md, include a link to it).
97-- For your final comment, follow the following format precisely (assuming for this example that you found 3 issues):
90+- You must cite and link each issue in inline comments (e.g., if referring to a CLAUDE.md, include a link to it).
91+- If no issues are found, post a comment with the following format:
9892
9993 ---
10094
10195 ## Code review
10296
103-Found 3 issues:
104-
105-1. <brief description of bug> (CLAUDE.md says: "<exact quote from CLAUDE.md>")
106-
107-<link to file and line with full sha1 + line range for context, eg. https://github.com/anthropics/claude-code/blob/1d54823877c4de72b2316a64032a54afc404e619/README.md#L13-L17>
108-
109-2. <brief description of bug> (some/other/CLAUDE.md says: "<exact quote from CLAUDE.md>")
110-
111-<link to file and line with full sha1 + line range for context>
112-
113-3. <brief description of bug> (bug due to <file and code snippet>)
114-
115-<link to file and line with full sha1 + line range for context>
116-
117----
118-
119-- Or, if you found no issues:
120-
121----
122-
123-## Auto code review
124-
12597 No issues found. Checked for bugs and CLAUDE.md compliance.
12698
12799 ---
128100
129-- When linking to code, follow the following format precisely, otherwise the Markdown preview won't render correctly: https://github.com/anthropics/claude-code/blob/c21d3c10bc8e898b7ac1a2d745bdc9bc4e423afe/package.json#L10-L15
101+- When linking to code in inline comments, follow the following format precisely, otherwise the Markdown preview won't render correctly: https://github.com/anthropics/claude-code/blob/c21d3c10bc8e898b7ac1a2d745bdc9bc4e423afe/package.json#L10-L15
130102 - Requires full git sha
131103 - You must provide the full sha. Commands like `https://github.com/owner/repo/blob/$(git rev-parse HEAD)/foo/bar` will not work, since your comment will be directly rendered in Markdown.
132104 - Repo name must match the repo you're code reviewing