Home
cd ../playbooks
Developer ToolsIntermediate

CI/CD Pipeline Generator

Create production-ready CI/CD pipeline configurations for GitHub Actions, GitLab CI, CircleCI, and Jenkins with deployment to Vercel, Netlify, or AWS.

15 minutes
By AI LabsSource
#cicd#github-actions#gitlab#jenkins#devops#automation#deployment

Setting up CI/CD means hours of YAML debugging, cryptic error messages, and copying snippets from Stack Overflow that don't quite fit your stack. Your pipeline either doesn't exist or was cobbled together two years ago and nobody dares touch it.

Who it's for: developers setting up their first CI/CD pipeline, DevOps engineers standardizing across projects, teams migrating between CI platforms, startups shipping without deployment automation, solo developers who deploy manually

Example

"Set up GitHub Actions for our Next.js app deploying to Vercel" → Production-ready workflow with build, lint, test stages, caching for node_modules, preview deployments on PRs, and production deploy on merge to main

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

# CI/CD Pipeline Generator

## Your Role
You are my DevOps engineer specializing in CI/CD pipeline configuration. Help me create production-ready pipelines for various platforms and deployment targets.

## Supported Platforms
- **GitHub Actions**: Native GitHub integration
- **GitLab CI/CD**: Complex pipeline needs on GitLab
- **CircleCI**: Docker workflows with optimized builds
- **Jenkins**: Self-hosted, highly customizable

## Deployment Targets
- **Vercel**: Frontend and Next.js applications
- **Netlify**: Static sites and serverless functions
- **AWS**: S3 + CloudFront, ECS, Lambda

## Pipeline Architecture

### Standard Stages
1. **Install Dependencies**: Code checkout, runtime setup, caching
2. **Lint**: ESLint, TypeScript checks
3. **Test**: Unit/integration tests with coverage
4. **Build**: Production build and artifacts
5. **Deploy**: Environment-specific deployments

## Configuration Workflow

### Step 1: Gather Requirements
Ask about:
- CI/CD platform preference
- Project type (Next.js, React, Node.js, etc.)
- Deployment target
- Environment needs (staging, production)
- Special requirements (monorepo, scheduled runs)

### Step 2: Generate Configuration

#### GitHub Actions Example
```yaml
name: CI/CD Pipeline

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  install:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci

  lint:
    needs: install
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npm run lint
      - run: npm run type-check

  test:
    needs: install
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npm test -- --coverage

  build:
    needs: [lint, test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'
      - run: npm ci
      - run: npm run build

  deploy:
    needs: build
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'
    steps:
      - uses: actions/checkout@v4
      - uses: amondnet/vercel-action@v25
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          vercel-args: '--prod'
```

### Step 3: Configure Secrets
Provide list of required secrets:
- Deployment tokens (Vercel, Netlify, AWS)
- API keys for external services
- Environment-specific variables

### Step 4: Add Advanced Features

**Caching Strategy**
```yaml
- uses: actions/cache@v4
  with:
    path: ~/.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
```

**Matrix Testing**
```yaml
strategy:
  matrix:
    node-version: [18, 20, 22]
    os: [ubuntu-latest, macos-latest]
```

**Scheduled Runs**
```yaml
on:
  schedule:
    - cron: '0 0 * * *'  # Daily at midnight
```

## Best Practices

### Security
- Never hardcode secrets
- Use least-privilege tokens
- Rotate credentials regularly
- Audit access logs

### Performance
- Cache dependencies aggressively
- Parallelize independent jobs
- Use matrix builds wisely
- Fail fast on errors

### Reliability
- Pin Node.js versions
- Commit lockfiles
- Add retry logic for flaky steps
- Set appropriate timeouts

## Deployment Configurations

### Vercel
```yaml
- uses: amondnet/vercel-action@v25
  with:
    vercel-token: ${{ secrets.VERCEL_TOKEN }}
    vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
    vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
```

### Netlify
```yaml
- run: npm install -g netlify-cli
- run: netlify deploy --prod
  env:
    NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
    NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
```

### AWS S3 + CloudFront
```yaml
- uses: aws-actions/configure-aws-credentials@v4
  with:
    aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws-region: us-east-1
- run: aws s3 sync ./dist s3://${{ secrets.S3_BUCKET }}
- run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DIST_ID }} --paths "/*"
```

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

Generate production-ready CI/CD pipeline configurations for multiple platforms. Includes build, test, lint, and deployment stages with best practices for security, caching, and performance.


Quick Start

Step 1: Navigate to Your Project

cd ~/your-project

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Generate Your Pipeline

claude

Then ask: "Create a GitHub Actions pipeline for my Next.js app deploying to Vercel"


Supported Platforms

Platform Best For
GitHub Actions GitHub-hosted projects
GitLab CI/CD Complex pipelines on GitLab
CircleCI Docker workflows with optimized build times
Jenkins Self-hosted, highly customizable

Deployment Targets

Target Configuration
Vercel Uses amondnet/vercel-action
Netlify Uses netlify-cli
AWS S3 + CloudFront Uses AWS Actions

Standard Pipeline Architecture

Install Dependencies → Lint → Test → Build → Deploy

Stage Details

  1. Install: Code checkout, runtime setup, dependency caching
  2. Lint: ESLint, TypeScript type checking
  3. Test: Unit/integration tests with coverage
  4. Build: Production build, artifact storage
  5. Deploy: Environment-specific deployments

Example Prompts

  • "Create a GitHub Actions pipeline for a React app"
  • "Set up GitLab CI with staging and production deployments"
  • "Generate a CircleCI config with parallel test jobs"
  • "Create a Jenkins pipeline with Docker builds"

Best Practices Included

Security

  • Secret management via environment variables
  • Least-privilege tokens
  • No hardcoded credentials

Performance

  • Aggressive dependency caching
  • Job parallelization
  • Matrix testing
  • Fail-fast execution

Reliability

  • Pinned Node.js versions
  • Committed lockfiles
  • Retry logic
  • Timeout configuration

Advanced Features

  • Monorepo Support: Path-based triggers
  • Scheduled Runs: Cron expressions
  • Notifications: Slack/Discord/Email alerts
  • Security Scanning: npm audit, Snyk integration

$Related Playbooks

Developer Tools

Claude Code Project Architecture

A setup guide for structuring a Claude Code project's full toolkit — layered CLAUDE.md context, slash commands, sub-agents, skills, hooks, and plugins — each used for what it's actually good at instead of one mechanism for everything.

20 minutes
Intermediate
Developer Tools

Claude Model Migration Assistant

Migrate code and prompts between Claude models — update model strings, remove incompatible beta headers, and adjust prompts only for reported behavioral differences.

5 minutes
Beginner
Developer Tools

Claude Code Plugin Builder

End-to-end guided workflow for building Claude Code plugins — structure, commands, agents, skills, hooks, and MCP integration — with a validation checklist before you distribute.

15 minutes
Advanced
Developer Tools

CLAUDE.md Progressive Disclosurer

Slim down and restructure a bloated CLAUDE.md (or AGENTS.md) using progressive disclosure — move low-frequency detail to Level 2 references while keeping Level 1 lean, with zero information loss.

15 minutes
Intermediate
Developer Tools

Claude Usage Analyst

Analyze Claude Code token usage, cost, quota burn, model mix, and cache read/write using ccusage evidence — and explain in human terms why your quota got exhausted.

10 minutes
Beginner
Developer Tools

CLI Demo Generator

Generate professional animated CLI demos as GIFs using VHS terminal recordings — with self-bootstrapping setup, output filtering, and frame-level verification.

15 minutes
Intermediate
Developer Tools

Cloudflare Troubleshooting

Investigate and resolve Cloudflare issues with API-driven evidence — ERR_TOO_MANY_REDIRECTS, SSL mode mismatches, DNS, and proxy problems — instead of guessing.

15 minutes
Intermediate
Developer Tools

Codebase Documenter

Create comprehensive, beginner-friendly documentation for codebases including READMEs, architecture guides, API docs, and code comments.

10 minutes
Beginner
Developer Tools

Designer's Figma-to-Production Workflow

A structured discuss-plan-execute-verify loop that takes a designer from a Figma file to a deployed, pixel-perfect production site — using Claude Code plus the GSD meta-prompting system, no traditional coding required.

20 minutes
Intermediate
Developer Tools

Continue Claude Work

Recover actionable context from local .claude session artifacts and continue interrupted work — without running claude --resume — by inspecting history first.

10 minutes
Intermediate
Developer Tools

Composio SDK with Claude Code: Connect 250+ APIs in Minutes

Connect Claude Code to 250+ APIs using Composio SDK. Build AI agents that send emails, create GitHub issues, and post to Slack — not just generate text.

15 minutes
Advanced
Developer Tools

Distinctive Frontend Design

Design lead guidance for building frontends that don't read as AI-generated — deliberate palette, typography, and layout choices grounded in the actual subject, with a built-in self-critique pass before you write code.

5 minutes
Intermediate

Browse all Developer Tools playbooks →