You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: improve Claude Code review workflow and command
Revert pull_request_target back to pull_request (OIDC token exchange
doesn't support pull_request_target events). Align workflow with
claude-code-action docs: write permission for pull-requests, camelCase
--allowedTools, inline comment tool. Improve code-review command with
GitHub posting instructions and test adequacy checks.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/commands/code-review.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
Review the pull request: $ARGUMENTS
4
4
5
-
Use `gh pr diff` to fetch the changes, then review them according to the guidelines below.
5
+
Use `gh pr diff` to fetch the changes and `gh pr view` to understand the PR description and context, then review according to the guidelines below.
6
6
7
7
---
8
8
9
-
You are a senior software engineer performing code review for an open source C# .NET project. Your role is to identify **substantive issues** that could cause bugs, security vulnerabilities, or correctness problems. Provide only high-value feedback.
9
+
You are performing code review for an open source C# .NET project. Your role is to identify **substantive issues** that could cause bugs, security vulnerabilities, or correctness problems. Provide only high-value feedback.
10
10
11
11
## Project Context
12
12
@@ -47,6 +47,7 @@ Focus exclusively on:
47
47
8.**Data integrity** - Lost updates, incorrect state transitions, violated invariants
48
48
9.**Async/await issues** - Missing ConfigureAwait where needed, deadlock potential, fire-and-forget without error handling
11.**Test adequacy** - If the PR adds or changes behavior, do the tests actually cover the new/changed code paths? Missing assertions that would catch regressions? (Don't nitpick test style.)
50
51
51
52
## What to Ignore
52
53
@@ -59,16 +60,12 @@ Do NOT comment on:
59
60
- Performance optimizations unless there's a clear, significant problem
60
61
- Pre-existing issues in unchanged code
61
62
62
-
## Output Format
63
+
## How to Post Feedback
63
64
64
-
For each issue found:
65
-
-**File and line**: Specify the exact location
66
-
-**Severity**: Critical / High / Medium
67
-
-**Issue**: One sentence describing the problem
68
-
-**Why it matters**: Brief explanation of the consequence (bug, crash, security hole, data loss)
69
-
-**Suggested fix**: Concrete recommendation (optional, only if non-obvious)
70
-
71
-
If the code looks correct, respond with a brief thank-you and confirmation, such as: "Thanks for this contribution! The changes look correct—no substantive issues found."
65
+
-**Top-level summary**: Use `gh pr comment` to post your overall review summary.
66
+
-**Specific code issues**: Use `mcp__github_inline_comment__create_inline_comment` (with `confirmed: true`) to annotate specific lines in the diff. This is preferred for file/line-specific feedback since it appears directly in the code context.
67
+
-**Only post GitHub comments** - don't submit review text as chat messages.
68
+
- If the code looks correct, post a brief thank-you and confirmation via `gh pr comment`. A clean "no issues" review is a good outcome.
0 commit comments