
Claude Code Base Action
https://github.com/anthropics/claude-code-base-action- Category
- AI Agents
- Rank
- No. 336Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- anthropics
- GitHub
- 972 stars
- Latest release
- v0.0.63
- Date
About
GitHub Action that runs Claude Code on PRs and issues. The low-level action that powers Anthropic's claude-code-action.
What it does
A configurable automation layer that prepares a prompt, installs optional plugins, validates credentials, and invokes Claude through its agent SDK. Workflows can control tools, models, turn limits, system instructions, settings, and structured JSON output.
Why it's ranked here
Its flexibility is useful for teams building controlled, trusted automation rather than canned issue handling. Credential validation, sanitized logs, execution records, and strict success checks support serious CI use. The missing trust boundary is decisive: callers must secure prompts and working directories themselves.
What's good
It supports direct credentials, OAuth, cloud providers, and short-lived GitHub identity tokens. Tool permissions from multiple inputs are merged instead of silently overwritten. Full message output stays hidden by default, while results still expose status, session continuity, execution logs, and optional structured data.
Tradeoffs
This is infrastructure for custom workflows, not a safe default for public interaction. Project configuration is read from the working directory, and the action enables all project MCP servers. Full output can expose secrets, especially because debug mode enables it automatically. Plugin installation also expands what executes during the job.
How to use it well
Use it for trusted repositories where engineers want precise control over Claude prompts, tools, models, plugins, and machine-readable results. Keep permissions narrow, prefer short-lived identity credentials, and treat settings plus repository configuration as executable trust inputs. For untrusted issues, fork pull requests, or external comments, use the higher-level action with actor checks.
Technical notes+
The Bun and TypeScript entry point in src/index.ts coordinates workload identity, environment validation, settings, plugin installation, prompt preparation, SDK execution, and GitHub outputs. src/parse-sdk-options.ts preserves shell metacharacters in tool rules, merges repeated permissions and MCP configuration, strips GitHub OIDC minting variables from the child environment, and maps CLI-style arguments into SDK options. src/run-claude-sdk.ts sanitizes normal logs, writes the complete message stream through src/execution-file.ts, extracts session and structured output, explicitly stops after the result message, and rejects misleading success states. src/workload-identity.ts refreshes file-backed OIDC tokens, isolates credential caches by configuration fingerprint, and removes token material when the step ends. src/install-plugins.ts validates plugin names and marketplace inputs before spawning the CLI. Bun tests appear in test/retry.test.ts and test/readme.test.ts.
Observed
- Primary language
- TypeScript
- Packaging
- Private package named @anthropic-ai/claude-code-base-action with Bun scripts
- Interface
- GitHub Action that invokes Claude through the Claude Agent SDK
- Authentication
- Supports Anthropic API keys, Claude Code OAuth, GitHub workload identity federation, Amazon Bedrock, Google Vertex AI, and Microsoft Foundry
- Outputs
- Provides conclusion, execution log path, structured JSON output, and session identifier
- Tests
- Repository text includes Bun tests for retry behavior and README input coverage
- Repository status
- Automated mirror of the base-action directory; contributions are directed to the main repository
Read from README.md, package.json, src/index.ts, src/retry.ts, src/run-claude.ts, src/validate-env.ts, src/execution-file.ts, src/prepare-prompt.ts, src/run-claude-sdk.ts, src/install-plugins.ts, src/parse-sdk-options.ts, src/workload-identity.ts, src/setup-claude-code-settings.ts, test/retry.test.ts, test/readme.test.ts.
What it can do
Analyze pull request code changes
Pull request with code modifications → Code review comments and suggestions
Review GitHub issues for code-related problems
GitHub issue describing a problem or feature request → Analysis and potential code solutions
Generate automated code suggestions
Code repository and context → Specific code improvement recommendations
Perform automated code quality checks
Source code files in pull request → Code quality assessment and feedback
Execute as GitHub Action workflow
GitHub repository with workflow configuration → Automated Claude analysis triggered on PR/issue events
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.