gitlab-ci
gitlab-ci is an engineering AI skill with a core value of Configure GitLab CI/CD pipelines and runners for automated building, testing, and deployment. It
helps developers solve real-world problems in the engineering domain, boosting
efficiency, automating repetitive tasks, and optimizing workflows.
Configure GitLab CI/CD pipelines and runners for automated building, testing, and deployment.
Quick Facts
mkdir -p ./skills/gitlab-ci && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/gitlab-ci/SKILL.md -o ./skills/gitlab-ci/SKILL.md Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).
Skill Content
# GitLab CI/CD
Automate your software delivery pipeline with GitLab's integrated CI/CD system.
When to Use This Skill
Use this skill when:
- Setting up CI/CD pipelines in GitLab
- Configuring GitLab runners (shared or self-hosted)
- Creating multi-stage deployment pipelines
- Implementing GitLab Auto DevOps
- Managing CI/CD variables and secrets
Prerequisites
- GitLab repository (gitlab.com or self-hosted)
- Basic understanding of YAML
- For self-hosted runners: Linux server or Kubernetes cluster
Pipeline Configuration
Create `.gitlab-ci.yml` in repository root:
stages:
- build
- test
- deploy
variables:
NODE_VERSION: "20"
build:
stage: build
image: node:${NODE_VERSION}
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 hour
test:
stage: test
image: node:${NODE_VERSION}
script:
- npm ci
- npm test
coverage: '/Coverage: \d+\.\d+%/'
deploy:
stage: deploy
script:
- ./deploy.sh
environment:
name: production
url: https://example.com
only:
- mainJob Configuration
Rules-Based Execution
deploy:
script: ./deploy.sh
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manual
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- when: on_successParallel Jobs
test:
stage: test
parallel: 3
script:
- npm test -- --shard=$CI_NODE_INDEX/$CI_NODE_TOTALMatrix Builds
test:
stage: test
parallel:
matrix:
- NODE_VERSION: ["18", "20", "22"]
OS: ["alpine", "slim"]
image: node:${NODE_VERSION}-${OS}
script:
- npm testCaching
cache:
key:
files:
- package-lock.json
paths:
- node_modules/
policy: pull-push
build:
cache:
key: build-cache
paths:
- .cache/
policy: pullArtifacts
build:
artifacts:
paths:
- dist/
- coverage/
reports:
junit: junit.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura.xml
expire_in: 1 week
when: alwaysEnvironments and Deployments
deploy_staging:
stage: deploy
script:
- deploy --env staging
environment:
name: staging
url: https://staging.example.com
on_stop: stop_staging
stop_staging:
stage: deploy
script:
- undeploy --env staging
environment:
name: staging
action: stop
when: manualDocker Builds
build_image:
stage: build
image: docker:24
services:
- docker:24-dind
variables:
DOCKER_TLS_CERTDIR: "/certs"
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHAGitLab Runners
Install Runner
# Download and install
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt install gitlab-runner
# Register runner
sudo gitlab-runner register \
--url https://gitlab.com/ \
--registration-token TOKEN \
--executor docker \
--docker-image alpine:latestRunner Configuration
# /etc/gitlab-runner/config.toml
[[runners]]
name = "docker-runner"
url = "https://gitlab.com/"
token = "TOKEN"
executor = "docker"
[runners.docker]
image = "alpine:latest"
privileged = true
volumes = ["/cache", "/var/run/docker.sock:/var/run/docker.sock"]Runner Tags
build:
tags:
- docker
- linux
script:
- make buildCI/CD Variables
Protected Variables
Define in Settings > CI/CD > Variables:
- `AWS_ACCESS_KEY_ID` (protected, masked)
- `AWS_SECRET_ACCESS_KEY` (protected, masked)
Using Variables
deploy:
script:
- aws s3 sync dist/ s3://$S3_BUCKET
variables:
AWS_DEFAULT_REGION: us-east-1Include and Extend
Include Templates
``
🎯 Best For
- QA engineers
- Developers writing unit tests
- UI designers
- Product designers
- Claude users
💡 Use Cases
- Generating test cases for edge conditions
- Writing integration test suites
- Generating component mockups
- Creating design system tokens
📖 How to Use This Skill
- 1
Install the Skill
Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.
- 2
Load into Your AI Assistant
Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.
- 3
Apply gitlab-ci to Your Work
Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.
- 4
Review and Refine
Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.
❓ Frequently Asked Questions
Does this generate test mocks?
Many testing skills include mock generation. Check the install command and skill content for details.
Does this work with Figma?
Some design skills integrate with Figma plugins. Check the Works With section for supported tools.
How do I install gitlab-ci?
Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/gitlab-ci/SKILL.md, ready to use.
Can I customize this skill for my team?
Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.
⚠️ Common Mistakes to Avoid
Not testing edge cases
AI tends to generate happy-path tests. Manually review for boundary conditions.
Skipping usability testing
AI-generated designs should be validated with real users before development.
Not reading the full skill
Skills contain important context and edge cases beyond the quick start.