Claude Code in CI — GitHub and GitLab
Running Claude Code inside your pipeline to review pull requests, triage issues and automate repetitive repository work.
Last verified August 21, 2026 · 4 sources
Claude Code in CI is where the agent stops being an interactive tool and becomes infrastructure. Three distinct documented paths:
| Path | What it does |
|---|---|
| GitHub Actions | General-purpose: run Claude Code as a workflow step |
| GitHub Code Review | Automatic review on every pull request |
| GitLab CI/CD | The GitLab equivalent |
GitHub Enterprise Server has its own setup page, and there is separate documentation for using Actions with cloud providers (Bedrock, Google Cloud, Foundry) as the model backend.
Permissions matter more here than anywhere
An agent in CI runs unattended, with repository credentials, on code that may have come from a fork. Three specifics:
- Untrusted input. Pull request titles, descriptions and diffs are attacker-controlled on public repositories. Prompt injection through a PR body is the obvious attack.
- Least privilege. Scope the token to what the job actually needs.
- No interactive approval. Nothing will prompt. Permissions are the whole control surface.
Routines overlap with this
Routines can also be triggered by GitHub events, and run in Anthropic’s cloud rather than your CI. If you want repository automation without a workflow file, that is the other option.
What this page does not claim
Workflow syntax, required secrets and action versions are documented upstream and change; they are deliberately not copied here.
Plan availability
Anything left blank is not documented publicly, not a claim that it is unavailable. Compare every feature at once in the availability matrix.
- FreeNot available
- ProIncluded
- MaxIncluded
- TeamIncluded
- EnterpriseIncluded
- APIIncluded
Sources
- 01Claude Code GitHub ActionsOfficialcode.claude.com
- 02Claude Code GitLab CI/CDOfficialcode.claude.com
- 03Code Review — Claude Code docsOfficialcode.claude.com
- 04Claude Code with GitHub Enterprise ServerOfficialcode.claude.com
Page changelog
- VerifiedConfirmed GitHub Actions, GitLab CI/CD, GitHub Code Review and GitHub Enterprise Server are separately documented.