How to use Claude Code with GitHub Actions and GitLab CI/CD for automated workflows. Use when user asks about CI/CD integration, GitHub Actions, GitLab pipelines, or automated development workflows.
View on GitHubreggiechan74/claude-plugins
claude-code-metaskill
plugins/claude-code-metaskill/skills/ci-cd/SKILL.md
January 21, 2026
Select agents to install to:
npx add-skill https://github.com/reggiechan74/claude-plugins/blob/main/plugins/claude-code-metaskill/skills/ci-cd/SKILL.md -a claude-code --skill ci-cdInstallation paths:
.claude/skills/ci-cd/# Claude Code CI/CD Integration
## Overview
Claude Code integrates with CI/CD platforms to enable AI-powered automation within development workflows. By mentioning `@claude` in pull requests, merge requests, or issues, you can leverage Claude to analyze code, create PRs/MRs, implement features, and fix bugs while adhering to project standards.
## GitHub Actions
### Key Capabilities
**Core Features:**
- Instant PR creation with complete code changes from descriptions
- Automated issue-to-code implementation
- Adherence to project guidelines via `CLAUDE.md` files
- Secure execution on GitHub runners
### Setup Methods
**Quick Installation:**
Run `/install-github-app` in Claude Code for guided setup and secret configuration. This approach is limited to direct Claude API users.
**Manual Setup Requirements:**
1. Install the Claude GitHub app with read/write permissions for Contents, Issues, and Pull Requests
2. Add `ANTHROPIC_API_KEY` to repository secrets
3. Copy the workflow file from official examples into `.github/workflows/`
### Configuration
**Example Workflow:**
```yaml
- uses: anthropics/claude-code-action@v1
with:
prompt: "Your instructions"
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
claude_args: "--max-turns 5"
```
**Version Migration (v1.0):**
- Replace `mode` configuration (now auto-detected)
- Change `direct_prompt` to `prompt`
- Move CLI options into `claude_args` parameter
### Common Use Cases
**In comments:**
```
@claude implement this feature
@claude fix the TypeError in the dashboard
@claude how should I handle authentication?
```
### Best Practices
**Project Guidelines:** Create a `CLAUDE.md` file defining coding standards and review criteria that Claude will follow.
**Security:** Always use GitHub Secrets rather than hardcoding credentials. Store API keys as `ANTHROPIC_API_KEY`.
**Cost Management:** Configure `--max-turns` limits and use specific commands to minimize unnecessary API calls.
### Enterprise Deploym