diff --git a/plugins/code-review/README.md b/plugins/code-review/README.md index b0962f09a..42554ff82 100644 --- a/plugins/code-review/README.md +++ b/plugins/code-review/README.md @@ -26,9 +26,12 @@ Performs automated code review on a pull request using multiple specialized agen **Usage:** ```bash -/code-review +/code-review [--no-comment] ``` +**Options:** +- `--no-comment`: Skip posting the review to GitHub. Output the review to the terminal only. Useful for local review without creating PR comments. + **Example workflow:** ```bash # On a PR branch, run: @@ -39,6 +42,9 @@ Performs automated code review on a pull request using multiple specialized agen # - Score each issue for confidence # - Post comment with issues ≥80 confidence # - Skip posting if no high-confidence issues found + +# For local-only review (no GitHub comment): +/code-review --no-comment ``` **Features:** @@ -49,6 +55,7 @@ Performs automated code review on a pull request using multiple specialized agen - Historical context analysis via git blame - Automatic skipping of closed, draft, or already-reviewed PRs - Links directly to code with full SHA and line ranges +- Optional `--no-comment` flag for local-only review without posting to GitHub **Review comment format:** ```markdown @@ -196,6 +203,7 @@ https://github.com/owner/repo/blob/[full-sha]/path/file.ext#L[start]-L[end] - **Iterate on guidelines**: Update CLAUDE.md based on patterns - **Review automatically**: Set up as part of PR workflow - **Trust the filtering**: Threshold prevents noise +- **Use `--no-comment` for local development**: Get review feedback without cluttering the PR ## Configuration diff --git a/plugins/code-review/commands/code-review.md b/plugins/code-review/commands/code-review.md index 88260b25f..ce0518f70 100644 --- a/plugins/code-review/commands/code-review.md +++ b/plugins/code-review/commands/code-review.md @@ -5,6 +5,9 @@ description: Code review a pull request Provide a code review for the given pull request. +**Arguments:** +- `--no-comment`: Skip posting the review as a PR comment. Instead, output the review to the terminal only. This is useful when running locally and you don't want to post to GitHub. + To do this, follow these steps precisely: 1. Launch a haiku agent to check if any of the following are true: @@ -52,8 +55,11 @@ Note: Still review Claude generated PR's. 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. -7. Finally, comment on the pull request. - When writing your comment, follow these guidelines: +7. Finally, output the review: + - If `--no-comment` was passed as an argument, output the review directly to the terminal (do NOT post to GitHub) + - Otherwise, post the review as a comment on the pull request using `gh pr comment` + + When writing your review, follow these guidelines: a. Keep your output brief b. Avoid emojis c. Link and cite relevant code, files, and URLs for each issue