mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
* chore: remove experimental allowed domains feature Remove the experimental_allowed_domains feature which was used to restrict network access via a Squid proxy. This removes: - The input definition from action.yml - The Network Restrictions workflow step - The setup-network-restrictions.sh script - Documentation from experimental.md, usage.md, and related files - The input default from collect-inputs.ts * chore: fix formatting with prettier Co-authored-by: Ashwin Bhat <ashwin-ant@users.noreply.github.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Ashwin Bhat <ashwin-ant@users.noreply.github.com>
64 lines
2.2 KiB
Markdown
64 lines
2.2 KiB
Markdown
# 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**: `@claude` mentions 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
|
|
|
|
```yaml
|
|
- 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 `prompt` input is provided
|
|
- **Features**: Direct execution without requiring @claude mentions, streamlined for automation
|
|
- **Use case**: Automated PR reviews, scheduled tasks, workflow automation
|
|
|
|
```yaml
|
|
- 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:
|
|
|
|
1. **If `prompt` is provided** → Runs in **agent mode** for automation
|
|
2. **If no `prompt` but @claude is mentioned** → Runs in **tag mode** for interaction
|
|
3. **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`:
|
|
|
|
```yaml
|
|
- 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 }}
|
|
```
|