Skip to content
Open
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
52 changes: 52 additions & 0 deletions .github/workflows/claude-worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: claude-worker

on:
pull_request:
paths:
- ".github/workflows/claude-worker.yml"
workflow_dispatch:
inputs:
prompt:
required: true
type: string
description: "The task prompt for Claude."
model:
required: false
type: string
default: "claude-sonnet-4-6-20250514"
description: "Anthropic model to use."
max_turns:
required: false
type: number
default: 10
description: "Maximum agent turns."
allowed_tools:
required: false
type: string
default: "Read,Edit,Write,Grep,Glob,Bash"
description: "Comma-separated tools the agent may use."

concurrency:
group: claude-worker-${{ github.ref }}
cancel-in-progress: false

jobs:
worker:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 1

- name: Run Claude agent
uses: anthropics/claude-code-action/base-action@7ada98c10deffc4c13fe5079693edf312888ff3b # v1
env:
ANTHROPIC_MODEL: ${{ inputs.model || 'claude-sonnet-4-6-20250514' }}
with:
prompt: ${{ inputs.prompt || 'List the files in this repository and write a one-paragraph summary of what it does.' }}
anthropic_api_key: ${{ secrets.ANTHROPIC_CODE_REVIEW_KEY }}
show_full_output: "true"
claude_args: --max-turns ${{ inputs.max_turns || 5 }} --allowedTools '${{ inputs.allowed_tools || 'Read,Glob,Grep' }}'
Loading