@@ -36,19 +36,59 @@ jobs:
36
36
uses : anthropics/claude-code-action@v1
37
37
with :
38
38
claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39
+ track_progress : true
40
+ use_sticky_comment : true
39
41
prompt : |
40
- Please review this pull request and provide feedback on:
41
- - Code quality and best practices
42
- - Potential bugs or issues
43
- - Performance considerations
44
- - Security concerns
45
- - Test coverage
42
+ Perform a comprehensive code review with the following focus areas:
43
+
44
+ 1. **Code Quality & Architecture**
45
+ - Verify adherence to idiomatic Go style (effective-go, golangci-lint compliance, naming conventions).
46
+ - Assess package structure for clarity and modularity (avoid cyclic dependencies, promote clean boundaries).
47
+ - Ensure interfaces are used appropriately — not over-abstracted but testable.
48
+ - Review concurrency patterns (goroutines, channels, sync primitives) for correctness and deadlock safety.
49
+ - Check configuration management (flags, environment variables, config files) for clarity and consistency.
50
+ - Validate that logging, error propagation, and context handling (context.Context) are consistent and properly implemented.
51
+
52
+ 2. **Error Handling & Resilience**
53
+ - Verify consistent error wrapping and context (use of %w, errors.Join, or fmt.Errorf).
54
+ - Ensure external dependencies (network, file I/O, DB connections) have proper retry, timeout, and cancellation logic.
55
+ - Confirm panics are avoided or safely recovered from in long-running goroutines.
56
+ - Assess logging for meaningful messages while avoiding sensitive data exposure.
57
+
58
+ 3. **Security**
59
+ - Review authentication/authorization logic and credential management.
60
+ - Check input validation and sanitization for APIs, CLI, or device message payloads.
61
+ - Ensure secrets are not hard-coded or logged.
62
+ - Confirm secure handling of TLS, tokens, and crypto functions where applicable.
63
+ - Validate dependencies for known vulnerabilities and verify minimal privilege access patterns.
64
+
65
+ 4. **Performance & Resource Efficiency**
66
+ - Inspect hot paths for unnecessary allocations or blocking operations.
67
+ - Check for proper use of connection pools, goroutine lifecycle management, and cleanup.
68
+ - Review memory and CPU usage in concurrent loops, background workers, and I/O pipelines.
69
+ - Evaluate database or cache query efficiency and connection reuse.
46
70
47
- Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
48
71
49
- Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
72
+ 5. **Testing & Reliability**
73
+ - Verify presence and adequacy of unit, integration, and end-to-end tests.
74
+ - Check test naming, isolation, and reproducibility.
75
+ - Ensure key edge cases (timeouts, partial failures, concurrent access) are covered.
76
+ - Review use of mocks/fakes for external dependencies.
77
+ - Confirm go test and CI workflows run cleanly and consistently.
78
+
79
+
80
+ 6. **Documentation & Developer Experience**
81
+ - Confirm code comments and docstrings clearly describe public APIs, exported structs, and interfaces.
82
+ - Review README.md, setup scripts, and examples for developer onboarding.
83
+ - Ensure configuration and runtime parameters are documented.
84
+ - Check generated API documentation (if applicable) for completeness and alignment with implementation.
85
+
86
+
87
+ Feedback Guidelines
88
+ • Use inline comments for file- or line-specific issues and improvements.
89
+ • Use top-level comments for architectural observations, general patterns, or praise.
90
+ • Prioritize clarity, robustness, and production readiness in all feedback.
50
91
51
92
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
52
93
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
53
94
claude_args : ' --allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
54
- use_sticky_comment : true
0 commit comments