Reusable GitHub Actions workflows for integrating Claude Code into your repositories.
| Workflow | Description |
|---|---|
claude.yml |
General-purpose Claude Code agent for issue/PR comments |
issue-triage.yml |
Automated issue triage with Linear integration |
code-review.yml |
Code review (manual /review or automatic on PR open) |
Set these secrets in your repository or organization:
| Secret | Required | Description |
|---|---|---|
CLAUDE_CODE_OAUTH_TOKEN |
Yes | Claude Code OAuth token |
LINEAR_API_KEY |
No | Required only if using Linear integration |
Note:
GITHUB_TOKENis automatically available in all workflows - no need to pass it.
If this repository is private, enable access for other repositories:
- Go to Settings > Actions > General
- Under "Access", select "Accessible from repositories in the organization"
- Choose which repositories can access these workflows
Create .github/workflows/claude.yml in your repository:
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review:
types: [submitted]
jobs:
claude:
uses: zaks-io/claude-code-action/.github/workflows/claude.yml@main
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}Trigger issue triage from Linear webhooks via repository dispatch:
name: Linear Issue Triage
on:
repository_dispatch:
types: [linear-triage]
jobs:
triage:
uses: zaks-io/claude-code-action/.github/workflows/issue-triage.yml@main
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
linear_api_token: ${{ secrets.LINEAR_API_KEY }}To trigger, send a POST request to GitHub's repository dispatch API:
curl -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/OWNER/REPO/dispatches \
-d '{
"event_type": "linear-triage",
"client_payload": {
"issue_id": "PROJ-123",
"url": "https://linear.app/team/issue/PROJ-123",
"title": "Issue title"
}
}'Triggered by /review comment on a PR:
name: Claude Code
on:
issue_comment:
types: [created]
jobs:
review:
if: |
github.event.issue.pull_request &&
contains(github.event.comment.body, '/review')
uses: zaks-io/claude-code-action/.github/workflows/code-review.yml@main
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}Triggered automatically on PR open/ready (use in CI pipeline):
name: CI
on:
pull_request:
types: [opened, ready_for_review]
jobs:
# ... your other CI jobs ...
code-review:
needs: [lint, test, build]
if: |
github.event.pull_request.draft == false &&
github.event.pull_request.auto_merge == null
uses: zaks-io/claude-code-action/.github/workflows/code-review.yml@main
with:
trigger_type: auto
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}General-purpose Claude Code agent for responding to comments.
| Input | Type | Default | Description |
|---|---|---|---|
allowed_tools |
string | Edit,Write,Read,Glob,Grep,LS,Bash(git:*),Bash(bun:*),Bash(npm:*),Bash(npx:*),Bash(gh:*) |
Comma-separated list of allowed tools |
prompt |
string | '' |
Custom prompt to append |
| Secret | Required | Description |
|---|---|---|
claude_code_oauth_token |
Yes | Claude Code OAuth token |
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: readAutomated Linear issue triage via repository dispatch.
repository_dispatchwith typelinear-triageworkflow_callfor reusable workflow usage
| Input | Type | Default | Description |
|---|---|---|---|
allowed_tools |
string | Read,Grep,Glob,LS,Bash(gh issue:*),Bash(gh label:*),mcp__linear__* |
Comma-separated list of tools |
prompt |
string | '' |
Custom prompt (overrides default) |
| Field | Required | Description |
|---|---|---|
issue_id |
Yes | Linear issue ID (e.g., PROJ-123) |
url |
Yes | Linear issue URL |
title |
Yes | Linear issue title |
prompt |
No | Custom prompt override |
| Secret | Required | Description |
|---|---|---|
claude_code_oauth_token |
Yes | Claude Code OAuth token |
linear_api_token |
Yes | Linear API token |
permissions:
contents: read
pull-requests: read
issues: write
id-token: writeWhen no custom prompt is provided, the workflow:
- Fetches full issue details from Linear via MCP
- Researches related code in the repository
- Updates the Linear ticket with analysis (files involved, complexity, implementation suggestions)
- Moves the ticket from Triage to the appropriate status
Code review workflow supporting both manual (/review comment) and automatic
(PR open) triggers.
| Input | Type | Default | Description |
|---|---|---|---|
trigger_type |
string | comment |
comment for /review command, auto for PR open/ready |
allowed_tools |
string | mcp__github_inline_comment__create_inline_comment,Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr comment:*) |
Comma-separated list of allowed tools |
prompt |
string | '' |
Custom prompt (overrides default) |
| Secret | Required | Description |
|---|---|---|
claude_code_oauth_token |
Yes | Claude Code OAuth token |
permissions:
contents: read
pull-requests: write
checks: write
id-token: write
actions: readWhen no custom prompt is provided, the review is diff-focused and flags only:
- Bugs and logic errors
- Security issues (injection, auth, secrets, unsafe input handling)
- Broken or missing error handling
- Test gaps for the changed code
Comments are posted inline on specific lines via
mcp__github_inline_comment__create_inline_comment, with a single top-level
summary. Nitpicks, style, and praise are skipped.
When trigger_type: comment (default):
- Creates a "Code Review" check run
- Reacts with π emoji on start
- Gathers PR context (workflow runs, check runs)
- Reacts with π (success) or π (failure)
When trigger_type: auto:
- Runs a streamlined review without comment reactions or check runs
A full workflow using all three reusable workflows:
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
pull_request_review:
types: [submitted]
repository_dispatch:
types: [linear-triage]
jobs:
# General Claude agent for comments
claude:
if: |
github.event_name != 'repository_dispatch' &&
!contains(github.event.comment.body, '/review')
uses: zaks-io/claude-code-action/.github/workflows/claude.yml@main
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# Issue triage via repository dispatch (triggered by Linear webhook)
triage:
if: github.event_name == 'repository_dispatch'
uses: zaks-io/claude-code-action/.github/workflows/issue-triage.yml@main
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
linear_api_token: ${{ secrets.LINEAR_API_KEY }}
# Manual code review via /review comment
review:
if: |
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/review')
uses: zaks-io/claude-code-action/.github/workflows/code-review.yml@main
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}All workflows support custom prompts to override default behavior:
jobs:
triage:
uses: zaks-io/claude-code-action/.github/workflows/issue-triage.yml@main
with:
prompt: |
You are a helpful assistant. Analyze this issue and:
1. Categorize it as bug, feature, or question
2. Suggest relevant labels
3. Estimate complexity (S/M/L)
secrets:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
linear_api_token: ${{ secrets.LINEAR_API_KEY }}Install pre-commit hooks:
pip install pre-commit
pre-commit installFormat files manually:
npx prettier --write "**/*.{yml,yaml,md}"Run actionlint locally:
actionlintMIT