* docs: Update documentation for v1.0 release - Integrate breaking changes naturally without alarming users - Replace deprecated inputs (direct_prompt, custom_instructions, mode) with new unified approach - Update all examples to use prompt and claude_args instead of deprecated inputs - Add migration guides to help users transition from v0.x to v1.0 - Emphasize automatic mode detection as a key feature - Update all workflow examples to @v1 from @beta - Document how claude_args provides direct CLI control - Update FAQ with automatic mode detection explanation - Convert all tool configuration to use claude_args format * fix: Apply prettier formatting to documentation files * fix: Update all Claude model versions to latest and improve documentation accuracy - Update all model references to claude-4-0-sonnet-20250805 (latest Sonnet 4) - Update Bedrock models to anthropic.claude-4-0-sonnet-20250805-v1:0 - Update Vertex models to claude-4-0-sonnet@20250805 - Fix cloud-providers.md to use claude_args instead of deprecated model input - Ensure all examples use @v1 instead of @beta - Keep claude-opus-4-1-20250805 in examples where Opus is demonstrated - Align all documentation with v1.0 patterns consistently * feat: Add dedicated migration guide as requested in PR feedback - Create comprehensive migration-guide.md with step-by-step instructions - Add prominent links to migration guide in README.md - Update usage.md to reference the separate migration guide - Include before/after examples for all common scenarios - Add checklist for systematic migration - Address Ashwin's feedback about having a separate, clearly linked migration guide
4.3 KiB
Experimental Features
Note: Experimental features are considered unstable and not supported for production use. They may change or be removed at any time.
Automatic Mode Detection
The action intelligently detects the appropriate execution mode based on your workflow context, eliminating the need for manual mode configuration.
Interactive Mode (Tag Mode)
Activated when Claude detects @mentions, issue assignments, or labels—without an explicit prompt.
- Triggers:
@claudementions in comments, issue assignment to claude user, label application - Features: Creates tracking comments with progress checkboxes, full implementation capabilities
- Use case: Interactive code assistance, Q&A, and implementation requests
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# No prompt needed - responds to @claude mentions
Automation Mode (Agent Mode)
Automatically activated when you provide a prompt input.
- Triggers: Any GitHub event when
promptinput is provided - Features: Direct execution without requiring @claude mentions, streamlined for automation
- Use case: Automated PR reviews, scheduled tasks, workflow automation
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Check for outdated dependencies and create an issue if any are found.
# Automatically runs in agent mode when prompt is provided
How It Works
The action uses this logic to determine the mode:
- If
promptis provided → Runs in agent mode for automation - If no
promptbut @claude is mentioned → Runs in tag mode for interaction - If neither → No action is taken
This automatic detection ensures your workflows are simpler and more intuitive, without needing to understand or configure different modes.
Advanced Mode Control
For specialized use cases, you can fine-tune behavior using claude_args:
- uses: anthropics/claude-code-action@v1
with:
prompt: "Review this PR"
claude_args: |
--max-turns 20
--system-prompt "You are a code review specialist"
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
Network Restrictions
For enhanced security, you can restrict Claude's network access to specific domains only. This feature is particularly useful for:
- Enterprise environments with strict security policies
- Preventing access to external services
- Limiting Claude to only your internal APIs and services
When experimental_allowed_domains is set, Claude can only access the domains you explicitly list. You'll need to include the appropriate provider domains based on your authentication method.
Provider-Specific Examples
If using Anthropic API or subscription
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# Or: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
experimental_allowed_domains: |
.anthropic.com
If using AWS Bedrock
- uses: anthropics/claude-code-action@v1
with:
use_bedrock: "true"
experimental_allowed_domains: |
bedrock.*.amazonaws.com
bedrock-runtime.*.amazonaws.com
If using Google Vertex AI
- uses: anthropics/claude-code-action@v1
with:
use_vertex: "true"
experimental_allowed_domains: |
*.googleapis.com
vertexai.googleapis.com
Common GitHub Domains
In addition to your provider domains, you may need to include GitHub-related domains. For GitHub.com users, common domains include:
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
experimental_allowed_domains: |
.anthropic.com # For Anthropic API
.github.com
.githubusercontent.com
ghcr.io
.blob.core.windows.net
For GitHub Enterprise users, replace the GitHub.com domains above with your enterprise domains (e.g., .github.company.com, packages.company.com, etc.).
To determine which domains your workflow needs, you can temporarily run without restrictions and monitor the network requests, or check your GitHub Enterprise configuration for the specific services you use.