Commit e646420
Optimize Claude Code Review workflow for efficiency and reliability (#16312)
* Optimize Claude Code Review workflow for efficiency and reliability
This change addresses two issues with the Claude Code Review workflow:
1. Reviews were not appearing on PRs (only in logs)
2. Excessive token usage from failed commands (~40-50% waste)
Changes:
- Instruct Claude to post its own review using gh pr comment
- Add GITHUB_TOKEN env var to enable gh CLI authentication
- Remove separate PR comment posting step (Claude does it directly)
- Embed review criteria directly in prompt instead of failed /docs-review
- Add CI efficiency guidelines to minimize token usage
- Streamline allowed tools to essentials (Read, Glob, Grep, gh commands)
- Reference .claude/commands/docs-review.md as source of truth
Token savings:
- Eliminates ~15K tokens from failed /docs-review slash command
- Prevents wasted attempts at make serve, make lint, make build
- Guides Claude to work from diffs before reading full files
- Estimated 40-50% reduction in tokens per review (33K → 16-20K)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* Clarify terminology in fix-issue documentation by updating "Root Cause Analysis" to "Analysis"
* Clarify analysis step in fix-issue documentation to specify desired outcome based on issue description
---------
Co-authored-by: Claude <[email protected]>1 parent 9eb88fb commit e646420
File tree
2 files changed
+29
-10
lines changed- .claude/commands
- .github/workflows
2 files changed
+29
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
47 | 65 | | |
48 | 66 | | |
49 | 67 | | |
50 | | - | |
| 68 | + | |
| 69 | + | |
51 | 70 | | |
0 commit comments