Skip to content
Development
Command

/xpipeline

Advanced CI/CD pipeline configuration, build automation, deployment orchestration, and optimization

From plugin
claude-code
11045 skills45 commands29 hooks

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/xpipeline

Context preview

What this command does when you run it.

Advanced CI/CD pipeline configuration, build automation, deployment orchestration, and optimization

Command definition

xpipeline.md
description: Advanced CI/CD pipeline configuration, build automation, deployment orchestration, and optimization
tags: [pipeline, cicd, automation, deployment, orchestration, optimization, artifacts]

Configure and manage CI/CD pipelines based on the arguments provided in $ARGUMENTS.

Usage Examples

**Analyze current pipeline:**

/xpipeline

**Initialize GitHub Actions pipeline:**

/xpipeline --init github

**Initialize GitLab CI pipeline:**

/xpipeline --init gitlab

**Initialize platform-agnostic pipeline:**

/xpipeline --init generic

**Validate pipeline best practices:**

/xpipeline --validate

**Configure deployment stage:**

/xpipeline --deploy staging

**Monitor pipeline health and DORA metrics:**

/xpipeline --monitor

**Rollback a deployment:**

/xpipeline --rollback staging

**Help and options:**

/xpipeline --help

Implementation

If $ARGUMENTS contains "help" or "--help": Display this usage information and exit.

First, examine the current pipeline configuration and environment: !find . -name "*.yml" -o -name "*.yaml" | grep -E "(pipeline|workflow|ci|cd)" | head -10 !ls -la .github/workflows/ .gitlab-ci.yml Jenkinsfile azure-pipelines.yml buildspec.yml 2>/dev/null || echo "No CI/CD configurations found" !git branch --show-current 2>/dev/null || echo "No git repository"

Based on $ARGUMENTS, perform the appropriate pipeline operation:

1. Pipeline Initialization (--init)

If initializing pipeline (--init github): !mkdir -p .github/workflows !mkdir -p config/environments Create GitHub Actions workflow with configuration-driven stages:

  • **Source Stage**: Checkout with secure authentication
  • **Pre-commit Validation**: Fast feedback (< 5 minutes)
  • **Build Stage**: Compile, unit tests, security scans, artifact generation
  • **Test Stage**: Integration tests in isolated environment (< 30 minutes)
  • **Security Stage**: SAST, secrets detection, dependency scanning
  • **Deploy Stage**: Configuration-driven deployment to any environment

If initializing GitLab CI (--init gitlab): !mkdir -p config/environments Create .gitlab-ci.yml with configuration-driven deployment:

  • source, build, test, security, deploy stages
  • Environment-specific configuration files
  • Parallel execution where possible for fast feedback

If initializing platform-agnostic pipeline (--init generic): !mkdir -p config/environments !mkdir -p scripts/ci Create configuration templates that work with any CI/CD platform:

  • Environment configuration files (staging.json, production.json)
  • Unified deployment script with environment parameter
  • Security scanning configuration
  • Testing configuration

Detect project type and language: !find . -name "package.json" -o -name "requirements.txt" -o -name "pom.xml" -o -name "go.mod" | head -3 !which docker 2>/dev/null || echo "Docker not available" !git remote -v 2>/dev/null || echo "No git remotes configured"

2. Pipeline Validation (--validate)

If validating pipeline (--validate): !yamllint .github/workflows/*.yml 2>/dev/null || echo "No GitHub workflows found" !yamllint .gitlab-ci.yml 2>/dev/null || echo "No GitLab CI config found" !find config/environments -name "*.json" -exec jq . {} \; 2>/dev/null || echo "No environment configs found"

Validate pipeline best practices compliance:

  • **Required stages present**: source, build, test, security, deploy
  • **Fast feedback**: Build + test stages complete within 30 minutes
  • **Security controls**: Secrets detection, SAST, dependency scanning
  • **Configuration-driven deployment**: Environment configs present and valid
  • **Trunk-based development**: Main branch protection and merge requirements
  • **Secret management**: No hardcoded secrets, proper environment variables
  • **Rollback capabilities**: Configuration-driven rollback mechanisms

3. Stage Configuration (--stage, --build, --test-stage)

If configuring stages: !find . -name "*.yml" -o -name "*.yaml" | xargs grep -l "stage\|job\|step" 2>/dev/null | head -5

Configure pipeline stages:

  • Define stage dependencies and execution order
  • Configure parallel execution for independent stages
  • Set up conditional stage execution criteria
  • Implement manual approval gates
  • Configure stage timeout and retry policies

4. Build and Compilation (--build, --compile)

If configuring build: !find . -name "Dockerfile" -o -name "docker-compose.yml" | head -3 !find . -name "Makefile" -o -name "build.gradle" -o -name "webpack.config.js" | head -3 !ls -la package.json setup.py pyproject.toml 2>/dev/null || echo "No build configuration files"

Configure build automation:

  • Set up compilation and build processes
  • Configure build caching strategies
  • Implement build matrix for multiple variants
  • Optimize build performance and parallelization
  • Configure artifact packaging and versioning
  • Generate Software Bill of Materials (SBOM)

5. Testing Integration (--test-stage, --coverage)

If configuring testing: !find . -name "*test*" -type d | head -5 !find . -name "*.test.js" -o -name "test_*.py" | wc -l

Integrate comprehensive testing:

  • Configure unit, integration, and end-to-end tests
  • Set up code coverage requirements and reporting
  • Implement test parallelization and optimization
  • Configure test environment setup and teardown
  • Integrate security and performance testing

6. Configuration-Driven Deployment (--deploy [environment])

If deploying to environment (--deploy): !find . -name "*.yml" -o -name "*.yaml" | xargs grep -l "deploy\|release" 2>/dev/null | head -3 !kubectl version --client 2>/dev/null || docker --version 2>/dev/null || echo "No deployment tools detected"

Check deployment prerequisites:

  • **All tests passing** (unit, integration, performance)
  • **Security scans clean** (SAST, secrets, dependencies)
  • **Artifacts generated** and validated
  • **Environment configuration** exists and valid
  • **Rollback plan** prepared and tested

Configure deployment automation:

  • Set up environment-specifi
Read more
Ships withclaude-code

Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!

Get the whole plugin

Other commands on claude-code.