Skip to content

Add Claude Code GitHub Workflow#4292

Open
squadgazzz wants to merge 6 commits intomainfrom
add-claude-github-actions-1774374364835
Open

Add Claude Code GitHub Workflow#4292
squadgazzz wants to merge 6 commits intomainfrom
add-claude-github-actions-1774374364835

Conversation

@squadgazzz
Copy link
Contributor

@squadgazzz squadgazzz commented Mar 24, 2026

Summary

Adds Claude Code GitHub integration with two workflows, review guidelines, and Rust tooling.

Workflows

  1. claude.yml — Responds to @claude mentions in PR/issue comments. Claude analyzes the context and executes the request.

  2. claude-code-review.yml — Automatic code review when a PR is marked ready for review. Uses the official code-review plugin with multi-agent verification. Does not run on drafts, pushes, or reopens. Includes rust-analyzer-lsp plugin for real Rust code intelligence (type checking, diagnostics, go-to-definition) during reviews.

Review guidelines (REVIEW.md)

Controls what Claude flags during reviews:

  • Prioritizes correctness, safety, security over style
  • Domain-specific checks: token amount conversions, error code mapping, settlement compatibility
  • Explicit false-positive exclusion list (no style nits, no pre-existing issues, no theoretical concerns)
  • Severity levels aligned with the code-review plugin's standard categories (Normal, Nit)
  • Strict output format: file/line, what's wrong, why it matters, suggested fix

Security

  • API key stored as GitHub Actions secret
  • Only repo write-access users can trigger workflows
  • All runs visible in GitHub Actions history

Test plan

  • Merge and verify @claude mention triggers in a test PR comment
  • Verify auto-review triggers when a PR is marked ready for review
  • Verify auto-review does NOT trigger on draft PRs or pushes

squadgazzz and others added 5 commits March 24, 2026 17:46
Configures the automated code review to focus on real bugs and
correctness issues, with explicit severity levels and a false-positive
exclusion list tailored to this Rust/Web3 codebase.
Gives Claude real Rust code intelligence (type checking, diagnostics,
go-to-definition) during PR reviews.
@squadgazzz squadgazzz marked this pull request as ready for review March 24, 2026 18:52
@squadgazzz squadgazzz requested a review from a team as a code owner March 24, 2026 18:52
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new REVIEW.md file, which establishes comprehensive code review guidelines for the repository. The guidelines cover review priorities, specific checks, items to ignore, severity classifications, and formatting for review comments. A review comment suggests an improvement to the newly added REVIEW.md by recommending that the defined severity levels (Bug, Nit, Question) be updated to align with standard GitHub API severity levels (Critical, High, Medium, Low) for better consistency and interpretation.

REVIEW.md Outdated
Comment on lines +48 to +55
## Severity

- **Bug** — will cause incorrect behavior; must fix before merge
- **Nit** — minor improvement, not blocking
- **Question** — unclear intent, needs author clarification

If unsure whether something is a real issue, mark it as a **Question** rather
than asserting a bug.
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The severity levels (Bug, Nit, Question) in this document are inconsistent with the standard GitHub API severity levels (critical, high, medium, low). This mismatch can lead to miscategorization or misinterpretation of review findings by the system.

Suggested change
## Severity
- **Bug** — will cause incorrect behavior; must fix before merge
- **Nit** — minor improvement, not blocking
- **Question** — unclear intent, needs author clarification
If unsure whether something is a real issue, mark it as a **Question** rather
than asserting a bug.
## Severity\n\n- **Critical** — will cause incorrect behavior; must fix before merge\n- **High** — significant issue that should be addressed soon\n- **Medium** — improvement that should be considered for future work\n- **Low** — minor improvement or stylistic suggestion\n\nIf unsure whether something is a real issue, mark it as **Low** or **Medium** rather\nthan asserting a critical or high severity bug.

drops valid quotes
- New `async` code does not block the Tokio runtime (no blocking I/O, no
`std::thread::sleep`, no heavy computation without `spawn_blocking`)
- Database queries include appropriate indexes and won't degrade at scale
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that these operations require actual review of the DB query and planning, maybe. it should first request the DB plan from before and after so it can perform an actually useful review

Comment on lines +8 to +9
Review in this order. Stop at the first category that has findings — do not
bury critical bugs under a wall of style nits.
Copy link
Contributor

Choose a reason for hiding this comment

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

I get the idea about stopping at the first issues, but it might lead to a bunch of back and forth

- File path and line number
- What is wrong (one sentence)
- Why it matters (one sentence)
- Suggested fix (code snippet if non-obvious)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sometimes the fix is kind of retarded. I'm not sure how to improve it but maybe the suggestion should be optional

- Suggested fix (code snippet if non-obvious)

Do not summarize the PR. Do not list what looks correct. Only report findings.
If there are no issues, say so in one sentence.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe using an example:

* If you do not find issues, simply comment: LGTM 🤖

https://github.com/anthropics/claude-plugins-official.git
plugins: |
code-review@claude-code-plugins
rust-analyzer-lsp@claude-plugins-official
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you double check that this is runnable given the possible lack of the right rust version in the runner?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants