cicd-pipeline

Designs CI/CD pipelines that run Claude Code headlessly for automated review, triage, and deployment gating.

4|2|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/Arete-Consortium/ai-skills --skill cicd-pipeline-arete-consortium
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cicd-pipeline
Source: https://github.com/Arete-Consortium/ai-skills/tree/main/personas/claude-code/cicd-pipeline
Command: npx skills add https://github.com/Arete-Consortium/ai-skills --skill cicd-pipeline-arete-consortium

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @anthropic-ai/claude-code.

What problem does it solve? Integrating AI into CI/CD pipelines is error-prone: interactive CLI sessions hang in CI runners, API keys leak into YAML, and uncontrolled autonomous runs rack up costs or make destructive changes. This Skill provides proven patterns for running Claude Code non-interactively in GitHub Actions and GitLab CI with correct permission modes, timeouts, and cost controls. ## Core Features & Use Cases - Headless Mode Patterns: Complete guidance on claude -p flags, permission modes (plan, default, acceptEdits, bypassPermissions), and structured output via --output-format stream-json. - Ready-to-Adapt Workflows: Full GitHub Actions YAML for PR review bots, test failure analysis, deployment safety gates, and PR triage/labeling. - Cost & Safety Controls: Token estimation, model selection guidance (Sonnet for triage, Opus for deep review), timeout guards, and secrets management rules. - Use Case: You want every pull request automatically reviewed by Claude. Use the PR Review Bot workflow to pipe the diff into claude -p, format the review as markdown, and post it as a PR comment via github-script. ## Quick Start Ask Claude to set up a GitHub Actions workflow that reviews pull requests using Claude Code in headless mode.

Frequently Asked Questions about cicd-pipeline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Claude Code in a GitHub Actions workflow?▼

Install Claude Code with npm install -g @anthropic-ai/claude-code, set ANTHROPIC_API_KEY as a secret, then invoke claude -p with your prompt. Use --output-format stream-json when you need structured output for downstream steps.

How to build an automated PR review bot with Claude Code?▼

Trigger a workflow on pull_request events, generate the diff with git diff, pipe it into claude -p with a review prompt, and post the output as a comment using actions/github-script. Set a timeout of around 10 minutes and use pull-requests: write permission.

Which permission mode should Claude Code use in CI pipelines?▼

Use plan mode for read-only analysis like review and triage, acceptEdits for auto-fix workflows, and avoid bypassPermissions unless the team explicitly approves fully autonomous execution. Interactive prompting never works in CI, so the mode must be chosen upfront.

Why does Claude Code hang when run in a CI pipeline?▼

Hanging happens when Claude Code runs in interactive mode, which waits for terminal input that never arrives in CI. Always use the -p (print/headless) flag and add timeout-minutes guards of 10-15 minutes to every job.

How much does Claude Code cost per automated PR review?▼

A typical review uses roughly 2,000-5,000 input tokens and 500-2,000 output tokens, costing about $0.01-0.03 with Sonnet or $0.05-0.15 with Opus. Use Sonnet or Haiku for triage tasks and reserve Opus for deep reviews to control spend.

When should I not use Claude Code headless mode in CI?▼

Do not use it for local development lifecycle hooks, MCP server development, or plugin packaging, since those are separate concerns. Also avoid giving CI pipelines bypassPermissions or letting Claude make destructive changes without a human approval gate.