Compare commits

...

2 Commits

Author SHA1 Message Date
Claude
d76e1f538b feat(code-review): Make local-only output the default behavior
Change default to output review to terminal only. Users must now
pass --comment to post to GitHub PR. This is more convenient for
local development where posting to PRs is usually not desired.
2025-12-15 17:51:54 +00:00
Claude
5d95a9c67d feat(code-review): Add --no-comment option for local-only review
Add ability to run /code-review without posting to GitHub PR.
When --no-comment is passed, the review is output to the terminal
only. This is useful when running locally and users don't want to
clutter PRs with automated comments.
2025-12-15 17:37:11 +00:00
2 changed files with 19 additions and 6 deletions

View File

@@ -26,19 +26,24 @@ Performs automated code review on a pull request using multiple specialized agen
**Usage:** **Usage:**
```bash ```bash
/code-review /code-review [--comment]
``` ```
**Options:**
- `--comment`: Post the review as a PR comment on GitHub. By default, the review is output to the terminal only.
**Example workflow:** **Example workflow:**
```bash ```bash
# On a PR branch, run: # On a PR branch, run (outputs to terminal only):
/code-review /code-review
# Claude will: # Claude will:
# - Launch 4 review agents in parallel # - Launch 4 review agents in parallel
# - Score each issue for confidence # - Score each issue for confidence
# - Post comment with issues ≥80 confidence # - Output review with issues ≥80 confidence to terminal
# - Skip posting if no high-confidence issues found
# To post review as a GitHub PR comment:
/code-review --comment
``` ```
**Features:** **Features:**
@@ -49,6 +54,7 @@ Performs automated code review on a pull request using multiple specialized agen
- Historical context analysis via git blame - Historical context analysis via git blame
- Automatic skipping of closed, draft, or already-reviewed PRs - Automatic skipping of closed, draft, or already-reviewed PRs
- Links directly to code with full SHA and line ranges - Links directly to code with full SHA and line ranges
- Local-only output by default; use `--comment` flag to post to GitHub PR
**Review comment format:** **Review comment format:**
```markdown ```markdown
@@ -196,6 +202,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 - **Iterate on guidelines**: Update CLAUDE.md based on patterns
- **Review automatically**: Set up as part of PR workflow - **Review automatically**: Set up as part of PR workflow
- **Trust the filtering**: Threshold prevents noise - **Trust the filtering**: Threshold prevents noise
- **Use `--comment` for CI/CD**: Post review to PR when running in automated workflows
## Configuration ## Configuration

View File

@@ -5,6 +5,9 @@ description: Code review a pull request
Provide a code review for the given pull request. Provide a code review for the given pull request.
**Arguments:**
- `--comment`: Post the review as a PR comment on GitHub. By default, the review is output to the terminal only.
To do this, follow these steps precisely: To do this, follow these steps precisely:
1. Launch a haiku agent to check if any of the following are true: 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. 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. 7. Finally, output the review:
When writing your comment, follow these guidelines: - If `--comment` was passed as an argument, post the review as a comment on the pull request using `gh pr comment`
- Otherwise, output the review directly to the terminal (do NOT post to GitHub)
When writing your review, follow these guidelines:
a. Keep your output brief a. Keep your output brief
b. Avoid emojis b. Avoid emojis
c. Link and cite relevant code, files, and URLs for each issue c. Link and cite relevant code, files, and URLs for each issue