gitlab-cicd-pipeline — Claude Code skill for GitLab CI/CD pipelines
A skill that steers your agent through writing .gitlab-ci.yml: stages, jobs, caching, artifacts, Kubernetes deploys. Useful when a pipeline needs building or reworking.
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a claude-codeWhat gitlab-cicd-pipeline does
The skill hands the agent a working shape for a GitLab CI/CD pipeline: stages from lint to production, dependency caching keyed on the branch, artifacts for test reports, conditional runs with only and except, and job ordering through needs:. It ships a minimal .gitlab-ci.yml example plus a references/ folder covering full pipeline configuration, GitLab Runner setup, Docker layer caching, multi-project pipelines, and Kubernetes deployment.
There is also a do-and-don't list. The agent will push back on running tests serially when they can be parallel, suggest expire_in to stop artifacts piling up, and flag secrets sitting in config files. A security scanning stage is part of the set.
The skill does not register runners or wire up registry credentials for you, and that is outside its scope. If no GitLab Runner is available to the repository, the pipeline never starts — check that first.
What it helps with
- write a
.gitlab-ci.ymlwith build, test and deploy stages - cache dependencies per branch so jobs stop refetching packages
- move test reports into artifacts with a bounded lifetime
- chain jobs with
needs:to cut idle waiting - add a security scanning stage to the pipeline
Example prompts for the agent
- Write a
.gitlab-ci.ymlfor a Node project with lint, test and build stages, cachingnode_modulesper branch - Split the test suite into parallel jobs and wire them with
needs:so the pipeline finishes sooner - Add a Kubernetes deploy stage and a review app for merge requests
How to install gitlab-cicd-pipeline
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a claude-code2Manually: put the files in place
~/.claude/skills/gitlab-cicd-pipeline/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/gitlab-cicd-pipeline/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a codex2Manually: put the files in place
.agents/skills/gitlab-cicd-pipeline/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a cursor2Manually: put the files in place
.cursor/skills/gitlab-cicd-pipeline/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts gitlab-cicd-pipeline2Manually: put the files in place
.github/skills/gitlab-cicd-pipeline/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/gitlab-cicd-pipelineManually: put the files in place
.devin/skills/gitlab-cicd-pipeline/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about gitlab-cicd-pipeline
How do I install gitlab-cicd-pipeline in Claude?
Run npx skills add aj-geddes/useful-ai-prompts --skill gitlab-cicd-pipeline -a claude-code. The skill lands at ~/.claude/skills/gitlab-cicd-pipeline/SKILL.md.
What does gitlab-cicd-pipeline do?
It helps the agent design GitLab CI/CD pipelines: stages, jobs, caching, artifacts, Docker integration and deployment strategies. The package includes a config example and reference guides on runners, layer caching and Kubernetes.
Which platforms does it support?
Beyond Claude, it installs into Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
Source text
SKILL.md · MIT
---
name: gitlab-cicd-pipeline
description: >
Design and implement GitLab CI/CD pipelines with stages, jobs, artifacts, and
caching. Configure runners, Docker integration, and deployment strategies.
---
# GitLab CI/CD Pipeline
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## Overview
Create comprehensive GitLab CI/CD pipelines that automate building, testing, and deployment using GitLab Runner infrastructure and container execution.
## When to Use
- GitLab repository CI/CD setup
- Multi-stage build pipelines
- Docker registry integration
- Kubernetes deployment
- Review app deployment
- Cache optimization
- Dependency management
## Quick Start
Minimal working example:
```yaml
# .gitlab-ci.yml
image: node:18-alpine
variables:
DOCKER_DRIVER: overlay2
FF_USE_FASTZIP: "true"
stages:
- lint
- test
- build
- security
- deploy-review
- deploy-prod
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .npm/
lint:
stage: lint
script:
- npm install
// ... (see reference guides for full implementation)
```
## Reference Guides
Detailed implementations in the `references/` directory:
| Guide | Contents |
|---|---|
| [Complete Pipeline Configuration](references/complete-pipeline-configuration.md) | Complete Pipeline Configuration |
| [GitLab Runner Configuration](references/gitlab-runner-configuration.md) | GitLab Runner Configuration |
| [Docker Layer Caching Optimization](references/docker-layer-caching-optimization.md) | Docker Layer Caching Optimization |
| [Multi-Project Pipeline](references/multi-project-pipeline.md) | Multi-Project Pipeline |
| [Kubernetes Deployment](references/kubernetes-deployment.md) | Kubernetes Deployment, Performance Testing Stage, Release Pipeline with Semantic Versioning |
## Best Practices
### ✅ DO
- Use stages to organize pipeline flow
- Implement caching for dependencies
- Use artifacts for test reports
- Set appropriate cache keys
- Implement conditional execution with `only` and `except`
- Use `needs:` for job dependencies
- Clean up artifacts with `expire_in`
- Use Docker for consistent environments
- Implement security scanning stages
- Set resource limits for jobs
- Use merge request pipelines
### ❌ DON'T
- Run tests serially when parallelizable
- Cache everything unnecessarily
- Leave large artifacts indefinitely
- Store secrets in configuration files
- Run privileged Docker without necessity
- Skip security scanning
- Ignore pipeline failures
- Use `only: [main]` without proper controls
© aj-geddes · MIT · aj-geddes/useful-ai-prompts