Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/repo--claude-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Claude Code
# https://docs.anthropic.com/en/docs/claude-code/github-actions

on:
issue_comment:
types: [created]

jobs:
claude:
if: (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
steps:
- name: Fetch owner/repo of pull request
uses: alessbell/pull-request-comment-branch@v2.1.0
id: comment-branch
- name: Checkout repository
uses: actions/checkout@v6
with:
# SECURITY: Pin to exact commit at comment time to prevent TOCTOU attacks
ref: ${{ steps.comment-branch.outputs.head_sha }}
repository: ${{ steps.comment-branch.outputs.head_owner }}/${{ steps.comment-branch.outputs.head_repo }}
# Fetch more history for better git operations
fetch-depth: 0
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
track_progress: true
prompt: |
Perform a comprehensive code review of the changes in this pull request.

Use top-level comments for the review. Leave out sections that have no relevance, for example if it is a documentation change testing may be irrelevant.
Be constructive and helpful in your feedback. Don't be overly polite or verbose, be direct.
# Tools for comprehensive PR review
claude_args: |
--allowedTools "
mcp__github_inline_comment__create_inline_comment,
Bash(gh pr comment:*),
Bash(gh pr diff:*),
Bash(gh pr view:*),
Bash(pnpm install --ignore-scripts),
Bash(pnpm test:*),
Bash(pnpm fmt:sol),
Bash(pnpm snapshot:*),
Bash(pnpm compile:*),
Bash(pnpm layout:*),
Bash(cat *),
Bash(find *),
Bash(grep *),
Bash(ls *),
WebFetch(domain:docs.anthropic.com)
"
use_sticky_comment: true