mirror of
https://github.com/anthropics/claude-code.git
synced 2026-02-19 04:27:33 -08:00
Compare commits
2 Commits
bac22cb316
...
claude/sla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d76e1f538b | ||
|
|
5d95a9c67d |
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user