Agent skill

gitlab-ci

Provides comprehensive guidance for GitLab CI/CD including pipeline configuration, runners, artifacts, environments, and deployment automation. Use when the user asks about GitLab CI, needs to create pipelines, configure runners, or automate builds and deployments.

Stars 254
Forks 41

Install this agent skill to your Project

npx add-skill https://github.com/partme-ai/full-stack-skills/tree/main/skills/devops-skills/gitlab-ci

SKILL.md

When to use this skill

Use this skill whenever the user wants to:

  • Write or debug GitLab CI pipelines (.gitlab-ci.yml)
  • Configure GitLab Runner, stages, jobs, and artifacts
  • Set up CI/CD variables, secrets, and environments
  • Integrate testing, building, and deployment automation
  • Use needs for complex dependency graphs between jobs

How to use this skill

Workflow

  1. Define stages — declare the pipeline execution order
  2. Write jobs — assign each job to a stage with scripts and rules
  3. Configure artifacts and cache — pass build outputs between jobs
  4. Set up environments — define deployment targets with rules

Quick Start Example

yaml
# .gitlab-ci.yml
stages:
  - test
  - build
  - deploy

variables:
  NODE_VERSION: "20"

test:
  stage: test
  image: node:${NODE_VERSION}
  cache:
    key: ${CI_COMMIT_REF_SLUG}
    paths:
      - node_modules/
  script:
    - npm ci
    - npm test
  artifacts:
    when: on_failure
    paths:
      - test-reports/
    expire_in: 7 days

build:
  stage: build
  image: node:${NODE_VERSION}
  needs: [test]
  script:
    - npm ci
    - npm run build
  artifacts:
    paths:
      - dist/

deploy_production:
  stage: deploy
  needs: [build]
  environment:
    name: production
    url: https://myapp.example.com
  script:
    - ./scripts/deploy.sh
  rules:
    - if: $CI_COMMIT_BRANCH == "main"

Key Concepts

Feature Purpose
stages Define execution order
needs Create DAG dependencies (skip stage waiting)
artifacts Pass files between jobs
cache Speed up repeated installs
rules Control when jobs run
environment Track deployment targets

Best Practices

  • Use stages to define clear build order; jobs within a stage run in parallel
  • Store sensitive values in CI/CD Variables (Settings > CI/CD > Variables) — never hardcode in YAML
  • Use needs to create complex dependency graphs and avoid unnecessary waiting
  • Preserve logs and artifacts on failure with artifacts: when: on_failure
  • Use rules instead of deprecated only/except for conditional job execution

Troubleshooting

  • Job stuck pending: Check runner tags match and runners are available
  • Artifact not found: Verify the producing job completed and artifact paths are correct
  • Cache not restoring: Ensure cache key is consistent; check runner cache configuration
  • Pipeline not triggered: Verify rules conditions match the event (push, merge request, etc.)

Keywords

gitlab ci, gitlab-ci, pipeline, runner, ci/cd, artifacts, cache, environments, deployment automation

Expand your agent's capabilities with these related and highly-rated skills.

partme-ai/full-stack-skills

ocrmypdf-batch

OCRmyPDF batch processing skill — process multiple PDFs, Docker automation, shell scripting, and CI/CD integration. Use when the user needs to OCR many PDFs, set up automated OCR pipelines, or integrate OCR into workflows.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-optimize

OCRmyPDF optimization skill — compress PDFs, configure PDF/A output, JBIG2 encoding, and lossless optimization. Use when the user needs to reduce PDF file size, create archival PDF/A files, or optimize OCR output.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-image

OCRmyPDF image processing skill — deskew, rotate, clean, despeckle, remove border from scanned documents. Use when the user needs to improve scanned PDF quality, fix skewed pages, remove noise, or clean up scanned documents before OCR.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf-api

OCRmyPDF Python API and plugin skill — use OCRmyPDF programmatically from Python, integrate with applications, and extend with plugins (EasyOCR, PaddleOCR, AppleOCR). Use when the user needs to call OCRmyPDF from Python code, build OCR pipelines, or use alternative OCR engines.

254 41
Explore
partme-ai/full-stack-skills

ocrmypdf

OCRmyPDF core skill — add searchable OCR text layer to scanned PDFs, convert images to searchable PDFs, support 100+ languages via Tesseract. Use when the user needs to OCR a PDF, make a scanned PDF searchable, or extract text from scanned documents.

254 41
Explore
partme-ai/full-stack-skills

svelte

Guides Svelte and SvelteKit development including reactive components, stores, transitions, lifecycle hooks, SSR, file-based routing, and deployment. Use when the user needs to build Svelte components, create SvelteKit applications, implement reactivity patterns, or configure Svelte with Vite.

254 41
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results