Configure the anthropics/claude-code-action GitHub Action correctly. Use when setting up Claude Code workflows, troubleshooting GitHub Action configuration, or passing CLI flags via claude_args.
View on GitHubfirstloophq/claude-code-plugins
core
plugins/core/skills/gh-action-config/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/firstloophq/claude-code-plugins/blob/main/plugins/core/skills/gh-action-config/SKILL.md -a claude-code --skill gh-action-configInstallation paths:
.claude/skills/gh-action-config/# Claude Code GitHub Action Configuration Guide
This skill helps you properly configure the `anthropics/claude-code-action` GitHub Action, avoiding common pitfalls with inputs and CLI flags.
## Key Concept: Action Inputs vs CLI Flags
The most common mistake is confusing **action inputs** with **CLI flags**. They are NOT interchangeable.
- **Action inputs**: Defined in workflow YAML directly under `with:`
- **CLI flags**: Must be passed through the `claude_args` input
## Common Mistake: Invalid Direct Inputs
These parameters look like they should work as action inputs, but they will be **ignored with warnings**:
```yaml
# ❌ WRONG - These are NOT valid action inputs
- uses: anthropics/claude-code-action@v1
with:
model: claude-opus-4-5-20251101 # ❌ Ignored
allowed_tools: "Bash(bun *)" # ❌ Ignored
append_system_prompt: "Your prompt" # ❌ Ignored
```
## Correct Approach: Use claude_args
Pass CLI flags through the `claude_args` input:
```yaml
# ✅ CORRECT - Pass CLI flags via claude_args
- uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
claude_args: >-
--model claude-opus-4-5-20251101
--allowedTools "Bash(bun *)"
--append-system-prompt "After making code changes, run tests."
--debug
```
## Complete Working Example
```yaml
name: Claude Code
on:
issue_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review_comment:
types: [created]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'issues' && (github.event.action == 'assigned' || github.event.action == 'labeled')) ||
github.event_name == 'pull_request_review_comment'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
actions: read
steps:
- nam