A GitHub Action that runs Claude Code on PRs and issues to answer questions, review changes, and implement code.
anthropics/claude-code-base-action
A GitHub Action that runs Claude Code inside GitHub Actions workflows so you can build custom automation on top of it.
- Stars
- 1,015
- Forks
- 603
- Open issues
- 14
- Last commit
- 9 hours ago
What is it?
Claude Code Base Action is a thin GitHub Actions wrapper that installs and runs Claude Code with the prompt and options you supply. It is meant for building custom workflows on top of Claude Code, rather than the out-of-the-box @claude mention experience offered by the separate claude-code-action.
The action accepts a prompt inline or from a file, passes extra CLI arguments such as allowed tools, turn limits, system prompts and model choices, and supports Claude settings and MCP configuration as JSON. Authentication can use an Anthropic API key, an OAuth token, workload identity federation, or OIDC with Amazon Bedrock, Google Vertex AI or Microsoft Foundry. Outputs include a conclusion status, an execution log file, a session ID for resuming, and structured output when a JSON schema is supplied.
Because the action runs Claude Code with whatever working directory and prompt it receives, the caller is responsible for trust decisions. The project notes that workflows handling untrusted input such as external issues or fork pull requests should use the main claude-code-action instead.
Key features
- 01Runs Claude Code in any GitHub Actions workflow with a direct prompt or prompt file.
- 02Passes custom CLI arguments such as allowed tools, max turns and system prompts.
- 03Supports Anthropic API key, OAuth token and workload identity federation authentication.
- 04Offers OIDC-based access to Amazon Bedrock, Google Vertex AI and Microsoft Foundry.
- 05Outputs execution status, a log file path, a resumable session ID and optional structured output.
Use cases
- Building a custom scheduled code review job that comments on pull requests.
- Running automated refactoring or dependency update tasks on a repository.
- Generating reports or documentation as part of a CI pipeline.
- Calling Claude Code from workflows that use cloud provider credentials such as Bedrock or Vertex AI.
Quick start
- 1
Add the action to a GitHub Actions workflow file with your prompt and API key secret
- 2
Store your Anthropic API key as the ANTHROPIC_API_KEY repository secret and reference it in the workflow
Things to know
- It is a mirror; issues and pull requests must go to the main claude-code-action repository.
- It does not enforce trust boundaries, so untrusted input like fork PRs needs the main claude-code-action instead.
- Running it requires an Anthropic API key or OAuth token, or a federation setup.
Topics
FAQ
- What is claude-code-base-action?
- A GitHub Action that runs Claude Code inside GitHub Actions workflows so you can build custom automation on top of it. Claude Code Base Action is a thin GitHub Actions wrapper that installs and runs Claude Code with the prompt and options you supply. It is meant for building custom workflows on top of Claude Code, rather than the out-of-the-box @claude mention experience offered by the separate claude-code-action.
- Is claude-code-base-action free to use? What license does it have?
- claude-code-base-action is open source under the MIT license. Check the license terms before using it in commercial products.
- Is claude-code-base-action still maintained?
- Actively maintained. The last commit to claude-code-base-action was on Oct 22, 2026.
- What can I use claude-code-base-action for?
- Building a custom scheduled code review job that comments on pull requests. Running automated refactoring or dependency update tasks on a repository. Generating reports or documentation as part of a CI pipeline. Calling Claude Code from workflows that use cloud provider credentials such as Bedrock or Vertex AI.
- How do I install claude-code-base-action?
- Add the action to a GitHub Actions workflow file with your prompt and API key secret Store your Anthropic API key as the ANTHROPIC_API_KEY repository secret and reference it in the workflow
- Where can I get claude-code-base-action?
- The source code and installation instructions are on GitHub: https://github.com/anthropics/claude-code-base-action
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
GitHub CLI extension that lets you write AI-powered repository automation as Markdown and runs it securely through GitHub Actions.
A GitHub Action that runs commands on remote servers over SSH from your CI/CD workflows.
GitHub's official MCP server that lets AI assistants read repositories, manage issues and pull requests, and work with GitHub Actions.
A GitHub Action that runs the Gemini CLI inside your repository to review pull requests, triage issues, and handle @gemini-cli requests.
Open-source IaC orchestration that runs Terraform and OpenTofu inside your existing CI pipeline, with plan and apply driven from pull request comments.