Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Design & UI

cicd

CI/CD pipeline design. GitHub Actions, GitLab CI, CircleCI, Jenkins, stage optimization, caching strategies, artifact management, matrix builds, pipeline templating.

arbazkhan971 · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add arbazkhan971/godmode --skill cicd

About this skill


name: cicd description: CI/CD pipeline design. GitHub Actions, GitLab CI, CircleCI, Jenkins, stage optimization, caching strategies, artifact management, matrix builds, pipeline templating.

CICD — CI/CD Pipeline Design

Activate When

  • User invokes /godmode:cicd
  • User says "create pipeline", "ci/cd pipeline", "ci cd pipeline", "set up CI/CD", "add GitHub Actions"
  • User says "optimize CI", "pipeline is slow", "fix failing pipeline", "build pipeline tuning", "release pipeline"
  • User says "add deployment stage", "set up matrix builds"
  • Project has no CI/CD configuration
  • Shipping workflow requires automated pipeline
  • Pipeline performance needs improvement

Workflow

Step 1: Discover Pipeline Context

Identify the project's CI/CD requirements and existing configuration:

PIPELINE CONTEXT:
  Platform: <GitHub Actions | GitLab CI | CircleCI |
  Jenkins | None detected>
  Language: <detected language/framework>
  Package Manager: <npm | pip | go mod | maven | etc.>
  Test Framework: <jest | pytest | go test | junit | etc.>
  Linter: <eslint | ruff | golangci-lint | etc.>
  Container: <Dockerfile present? Y/N>
  Deploy Target: <K8s | ECS | Lambda | Vercel | etc.>
  Existing Pipeline: <path to config or "none">
  Branch Strategy: <trunk-based | gitflow | github flow>

If no pipeline exists: "No CI/CD configuration found. Shall I create one? Specify your preferred platform (GitHub Actions, GitLab CI, CircleCI, Jenkins)."

Step 2: Pipeline Architecture Design

Design the pipeline stages based on project needs:

PIPELINE ARCHITECTURE:
┌─────────┐    ┌─────────┐    ┌─────────┐    ┌─────────┐    ┌─────────┐
| Lint | -> | Test | -> | Build | -> | Security | -> | Deploy |
│         │    │         │    │         │    │         │    │         │
| Format |  | Unit |  | Docker |  | SAST |  | Staging |
|--|--|--|--|--|--|--|--|--|
| Lint |  | Integ. |  | Assets |  | Deps |  | Prod |
| Types |  | E2E |  | Publish |  | Secrets |  | Verify |
└─────────┘    └─────────┘    └─────────┘    └─────────┘    └─────────┘
     |              |              |              |              |
   ~30s          ~2-5m          ~1-3m          ~1-2m          ~2-5m
                                                         (manual gate

Step 3: Generate Pipeline Configuration

GitHub Actions

name: CI/CD Pipeline

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

GitLab CI

stages:
  - lint
  - test
  - build
  - security
  - deploy

CACHING STRATEGY:

Cache TypeKeySavings
Dependencieslockfile hash30-90s
(node_modules,(package-lock.json
.venv, vendor)Pipfile.lock)
Build cachesource hash60-180s
------
(Docker layers,(Dockerfile +
compiled assets)source files)
Test cachetest file hash10-30s
------
(jest cache,
pytest cache)
Tool cacheversion string20-60s
------
(Go, Node, Python
runtime install)

Total estimated savings: 2-6 minutes per pipeline run


#### Docker Layer Caching
Multi-stage Dockerfile: deps layer (cached on lockfile hash) -> build layer (cached on source hash). Copy
lockfile first, `npm ci`, then copy source.

### Step 5: Pipeline Optimization
Analyze and improve pipeline performance:

PIPELINE PERFORMANCE ANALYSIS:

StageCurrentOptimizedSavings
Checkout15s8sShallow clone
Install deps90s5sCache hit
Lint30s30s—
Type check45s45s—
Unit tests180s65s3x sharding
Integration120s120sParallel with unit
Build image180s45sLayer caching
Security scan60s60s—
Deploy staging120s90sParallel verify
TOTAL14m 0s7m 48s-44%
Serial path14m 0s5m 30sWith parallelism

#### Optimization Techniques

OPTIMIZATION CHECKLIST:

  • Shallow clone (--depth 1) for CI builds
  • Dependency caching with lockfile hash key
  • Docker layer caching (BuildKit, GitHub cache)
  • Test sharding (split tests across parallel workers)
  • Parallel stages (lint + type check concurrently)
  • Conditional stages (skip deploy on PRs)
  • Incremental builds (only rebuild changed packages)
  • Concurrency limits (cancel redundant runs)
  • Timeout enforcement (prevent hung builds)
  • Artifact size limits (don't upload unnecessary files)
  • Matrix builds for multi-version testing
  • Self-hosted runners for heavy workloads

### Step 6: Matrix Builds
Configure multi-version and multi-platform testing:

```yaml
# GitHub Actions matrix example
strategy:
  fail-fast: false
  matrix:
    os: [ubuntu-latest, macos-latest]
    node-version: [18, 20, 22]
MATRIX EXECUTION:
| Combination | Status | Duration | Result |
|--|--|--|--|
| ubuntu / node-18 | PASS | 2m 15s | 42/42 |
| ubuntu / node-20 | PASS | 2m 08s | 42/42 |
| ubuntu / node-22 | PASS | 2m 22s | 42/42 |
| macos / node-20 | PASS | 3m 01s | 42/42 |
| macos / node-22 | PASS | 3m 12s | 42/42 |
  Total: 5/5 passing (all combinations green)

Step 7: Pipeline Templating

Create reusable pipeline components:

GitHub Actions — Composite Action

# .github/actions/setup/action.yml
name: 'Project Setup'
description: 'Install dependencies with caching'
inputs:
  node-version:
    description: 'Node.js version'

GitHub Actions — Reusable Workflow

# .github/workflows/reusable-deploy.yml
name: Deploy
on:
  workflow_call:
    inputs:
      environment:

Step 8: Artifact Management

Handle build outputs, test results, and deployment packages:

ARTIFACT STRATEGY:
| Artifact | Retention | Size Limit | Purpose |
|--|--|--|--|
| Test results (JUnit) | 30 days | 10 MB | PR checks |
| Coverage reports | 30 days | 50 MB | Tracking |
| Docker images | 90 days | — | Deployment |
| Build logs | 90 days | — | Debugging |
| SBOM | 365 days | 5 MB | Com
Read the complete source ↗