Skip to content

Commit a491aee

Browse files
authored
chore: make the prompt go oriented (#2739)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> -->
1 parent 528081b commit a491aee

File tree

1 file changed

+49
-9
lines changed

1 file changed

+49
-9
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,59 @@ jobs:
3636
uses: anthropics/claude-code-action@v1
3737
with:
3838
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
track_progress: true
40+
use_sticky_comment: true
3941
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.
4670
47-
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
4871
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.
5091
5192
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
5293
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
5394
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

Comments
 (0)