Skip to content

Conversation

@squadgazzz
Copy link
Contributor

🤖 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

How it works

Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.

Important Notes

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

There's more information in the Claude Code action repo.

After merging this PR, let's try mentioning @claude in a comment on any PR to get started!

PART 2 - CODE REVIEW:

REVIEW FOCUS (issues only, no positive feedback):
1. **Bugs & Logic Errors**: Race conditions, off-by-one errors, incorrect error handling, panic risks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add possible deadlocks (such as holding a regular mutex over an await), unexpected drops (like the request id issue)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think deadlocks as a category would be helpful.

REVIEW FOCUS (issues only, no positive feedback):
1. **Bugs & Logic Errors**: Race conditions, off-by-one errors, incorrect error handling, panic risks
2. **Non-Idiomatic Rust**: Unnecessary clones, missing iterators, improper lifetimes, unwrap() abuse
3. **Style Deviations**: Check CLAUDE.md for project conventions (alloy vs ethcontract patterns, RPC batching, quote system)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw alloy has a "base" prompt, should we add it or something?

1. **Bugs & Logic Errors**: Race conditions, off-by-one errors, incorrect error handling, panic risks
2. **Non-Idiomatic Rust**: Unnecessary clones, missing iterators, improper lifetimes, unwrap() abuse
3. **Style Deviations**: Check CLAUDE.md for project conventions (alloy vs ethcontract patterns, RPC batching, quote system)
4. **Test Coverage**: Missing tests for new functionality, edge cases not covered
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe tell him to suggest tests too instead of just flagging

PR AUTHOR: ${{ github.event.pull_request.user.login }}
PR TITLE: ${{ github.event.pull_request.title }}

You are a Rust code reviewer for the CoW Protocol services codebase.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the "experience Rust code reviewer with background in ..." still help?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should. Reassuring AI agents leads to measurably better results.


TASK:
1. Generate a PR description if the PR body is empty
2. Review the PR diff and leave inline comments on problematic code
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had success telling him to review and sumarize first, do a todo list and then start working, could that be helpful here?


jobs:
claude-review:
if: github.event.pull_request.user.login == 'squadgazzz'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed to allow everyone's PR to be reviewed

[How these changes should be tested. If no new tests were added, write "Existing tests"]

## Related issues
<!-- Link related issues here, e.g., Fixes #123 -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we allow gh pr list and gh issue list, for Claude to access other PR's so they can be referenced here more easily?

@squadgazzz
Copy link
Contributor Author

@m-sz @jmg-duarte let's avoid wasting anyone's time by reviewing draft PRs. This one is not even close to being ready for review.

@github-actions
Copy link

This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed.

@github-actions github-actions bot added the stale label Oct 14, 2025
@github-actions github-actions bot closed this Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants