gitlab-ci-patterns

Create GitLab CI/CD pipelines with multi-stage workflows, caching, and Kubernetes deployments.

Updated May 8, 2026
One-click install
npx skills add https://github.com/kiprotichgidii/agent-skills --skill gitlab-ci-patterns-kiprotichgidii
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gitlab-ci-patterns
Source: https://github.com/kiprotichgidii/agent-skills/tree/main/skills/gitlab-ci-patterns
Command: npx skills add https://github.com/kiprotichgidii/agent-skills --skill gitlab-ci-patterns-kiprotichgidii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing GitLab CI/CD configuration from scratch is error-prone and time-consuming, especially when coordinating multi-stage builds, caching, security scanning, and multi-environment deployments. ## Core Features & Use Cases - Multi-Stage Pipeline Templates: Ready-to-use YAML patterns for build, test, and deploy stages with artifacts and coverage reporting. - Deployment Patterns: Docker image builds with registry push, Kubernetes deployments to staging and production, and Terraform validate/plan/apply workflows. - Performance & Security: Caching strategies for dependencies, dynamic child pipelines, and SAST/dependency/container scanning with Trivy. - Use Case: You need to set up CI/CD for a Node.js app that builds a Docker image, runs tests with coverage, and deploys to Kubernetes production with a manual approval gate. ## Quick Start Ask the agent to create a GitLab CI pipeline that builds a Docker image, runs tests, and deploys to Kubernetes with a manual production gate.

Frequently Asked Questions about gitlab-ci-patterns

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

FAQPage Schema
How do I create a GitLab CI/CD pipeline with multiple stages?▼

Define a stages list (build, test, deploy) in .gitlab-ci.yml, then assign each job to a stage with the stage keyword. Jobs in the same stage run in parallel, and later stages only start after earlier ones succeed.

How to deploy to Kubernetes from GitLab CI?▼

Use a kubectl image like bitnami/kubectl, configure cluster access with KUBE_URL and KUBE_TOKEN CI/CD variables, then run kubectl apply and kubectl rollout status. Separate staging and production jobs with environment blocks and manual gates for production.

Does GitLab CI support caching node_modules between jobs?▼

Yes, use the cache keyword with a key like ${CI_COMMIT_REF_SLUG} and paths such as node_modules/. The pull-push policy restores cache before the job and updates it afterward, speeding up dependency installation.

How do I add security scanning to a GitLab pipeline?▼

Include GitLab's built-in templates for SAST, Dependency-Scanning, and Container-Scanning via the include keyword. You can also add a Trivy job to scan Docker images for HIGH and CRITICAL vulnerabilities.

When should I use dynamic child pipelines in GitLab?▼

Use child pipelines when pipeline configuration must be generated at runtime, such as monorepos with conditional jobs. A parent job generates a YAML artifact, and a trigger job includes that artifact with strategy: depend.