From 7b955db7a3785e4fa43f2b7930bb53746ce6af16 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 11 Mar 2026 16:53:45 +0000 Subject: [PATCH] Add claude code reviewing We can tweak the prompt as we get experience, for now its just the one copied https://github.com/anthropics/claude-code-action/blob/main/docs/solutions.md --- .github/workflows/claude-review.yml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/claude-review.yml diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml new file mode 100644 index 00000000000..c6c326dc2a1 --- /dev/null +++ b/.github/workflows/claude-review.yml @@ -0,0 +1,38 @@ +name: Claude Auto Review +on: + pull_request: + types: [opened, synchronize] + +jobs: + review: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + id-token: write + steps: + - uses: actions/checkout@v6 + with: + fetch-depth: 1 + + - uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number }} + + Please review this pull request with a focus on: + - Code quality and best practices + - Potential bugs or issues + - Security implications + - Performance considerations + + Note: The PR branch is already checked out in the current working directory. + + Use `gh pr comment` for top-level feedback. + Use `mcp__github_inline_comment__create_inline_comment` to highlight specific code issues. + Only post GitHub comments - don't submit review text as messages. + + claude_args: | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"