Claude auto PR review
Copied from the official Solutions Guide basic example (prompt shortened).
pull_request: opened, synchronize
Est. cost per run~$0.18Checked Oct 16, 2026
Not executedJust shippedOur pick for the best security, implementation, and planning skills.Best skills for each job.See the picks →
Mention @claude in an issue, a PR comment or a review and Claude responds or makes the requested change. This is Firezone's production setup.
issue_comment / pull_request_review_comment containing @claude (+ issues: opened; reviews)
How it works
Setup
.github/workflows/firezone-claude.ymlCLAUDE_CODE_OAUTH_TOKEN. The file reads it as secrets.NAME. Do not paste the key into the YAML.Let your agent do it
Paste it into your coding agent in this repo. It does the setup and asks before anything leaves your machine.
Runs the same job in your agent session, on the plan you are signed in with. No API key, no Action.
Do the job of the "Firezone: @claude assistant on issues, PR comments and reviews" workflow from AgentFlows (https://agentflows.sh/flows/firezone-claude) right here, in this session, using the plan I'm signed in with. No API key and no GitHub Action. What it does: Mention @claude in an issue, a PR comment or a review and Claude responds or makes the requested change. This is Firezone's production setup. The workflow normally runs on: issue_comment / pull_request_review_comment containing @claude (+ issues: opened; reviews). Instead, ask me which pull request, issue, or branch to work on, then follow these instructions: ```text Mention @claude in an issue, a PR comment or a review and Claude responds or makes the requested change. This is Firezone's production setup. ``` Use the gh CLI for anything on GitHub, and show me what you plan to post or change before you do it.
The file
Copy the file as-is. The notes beside each block explain it.
.github/workflows/firezone-claude.yml
Name
The name GitHub shows in the Actions tab. The file path is under Where to paste this.
name: Claude CodeTrigger
GitHub starts a run when someone comments on a pull request review, someone comments on an issue, or an issue is opened.
on: issue_comment: types: [created] pull_request_review_comment: types: [created] issues: types: [opened] pull_request_review: types: [submitted]Permissions
This token may read Actions logs. Anything not listed is not granted.
permissions: contents: write # push commits to PR branches pull-requests: write # create/update PRs and post comments issues: write # comment on and close issues id-token: write # OIDC auth actions: readJobs
Each job is one runner. The steps inside it run top to bottom.
jobs: claude: if: | (github.event_name == 'issue_comment' && (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR') && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review_comment' && (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'COLLABORATOR') && contains(github.event.comment.body, '@claude')) || (github.event_name == 'pull_request_review' && (github.event.review.author_association == 'OWNER' || github.event.review.author_association == 'MEMBER' || github.event.review.author_association == 'COLLABORATOR') && contains(github.event.review.body, '@claude')) || (github.event_name == 'issues' && (github.event.issue.author_association == 'OWNER' || github.event.issue.author_association == 'MEMBER' || github.event.issue.author_association == 'COLLABORATOR') && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) runs-on: ubuntu-latestPermissions
This token may read Actions logs. Anything not listed is not granted.
permissions: contents: write # push commits to PR branches pull-requests: write # create/update PRs and post comments issues: write # comment on and close issues id-token: write # OIDC auth actions: readSteps
These steps run in order on that job.
steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 1 - name: Run Claude Code id: claudeAgent
Runs Claude Code with anthropics/claude-code-action@a874e9ecd7bb36efdad65429c6b35815f5a08f10. Inputs: claude_code_oauth_token; custom_instructions.
uses: anthropics/claude-code-action@a874e9ecd7bb36efdad65429c6b35815f5a08f10 # v1.0.210 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} custom_instructions: "Read CLAUDE.md for project-specific guidelines before starting any task."Keep going
Copied from the official Solutions Guide basic example (prompt shortened).
pull_request: opened, synchronize
Est. cost per run~$0.18Checked Oct 16, 2026
Not executed`track_progress: true` posts a checkbox tracking comment (per Solutions Guide).
pull_request: opened, synchronize, ready_for_review, reopened
Est. cost per run~$0.22Checked Oct 16, 2026
Not executedNo `prompt` → the action runs in tag/interactive mode and responds to the comment. `trigger_phrase` default is `@claude` (usage.md).
issue_comment / pull_request_review_comment containing @claude
Est. cost per run~$0.27Checked Oct 16, 2026
Not executed· 1 caveat