Alison Aquinas logoAlison's LLM Plugins

gitlab-ci

Included in pluginci-cdView on GitHub ↗

Files

SKILL.mdagentsreferences

Install

Install the containing plugin
/plugin install ci-cd@llm-skills
Invoke this skill after installation
/ci-cd:gitlab-ci
Download gitlab-ci-skill.zip
This skill is bundled inside ci-cd. Install the plugin once, then Claude Code can use any of its included skills. Browse the full plugin repository at github.com/alisonaquinas/llm-ci-dev.

SKILL.md


name: gitlab-ci description: > Write and maintain GitLab CI pipelines in .gitlab-ci.yml with jobs, stages, testing, caching, runners, variables, and secrets.

GitLab CI

Write and maintain GitLab CI pipelines to automate testing, building, and deployment workflows. This skill covers .gitlab-ci.yml structure, job anatomy, runners, caching, testing strategies, and secrets management.


Intent Router

Load reference files for depth on specific topics:

TopicFileLoad when...
Pipeline Basicsreferences/pipeline-basics.mdStructuring .gitlab-ci.yml, jobs, stages, dependencies, rules, extends, include, parallel, trigger, MR pipelines
Runners & Cachingreferences/runners-and-caching.mdRunner types, executor selection, tags, cache key design, artifacts, Docker-in-Docker, service containers
Testing & Qualityreferences/testing-and-quality.mdJUnit reports, code coverage, SAST/DAST/dependency scanning, merge request tests, matrix testing
Variables & Secretsreferences/variables-and-secrets.mdPredefined variables, custom variables, protected+masked, vault integration, dotenv, CI_JOB_TOKEN, OIDC

Quick Start

Minimal Pipeline Structure

A .gitlab-ci.yml file at the repository root defines all pipeline stages and jobs:

stages:
  - build
  - test
  - deploy

build:
  stage: build
  script:
    - make build

test:
  stage: test
  script:
    - make test

deploy:
  stage: deploy
  script:
    - make deploy

Common Keywords

KeywordPurpose
stagesDefine pipeline order (executed sequentially)
scriptCommands to execute in the job
stageWhich stage this job belongs to
needsExplicit job dependencies; allows parallel jobs in same stage
rulesConditional execution (if/when/variables)
cachePersist data between jobs (e.g., dependencies, build artifacts)
artifactsPreserve build outputs for download or downstream jobs
before_scriptRun before job commands
after_scriptRun after job commands (even if job fails)
extendsReuse job templates from local or included YAML
includeImport external .gitlab-ci.yml files
retryRetry job on failure
timeoutJob execution timeout
tagsSelect runner by tag
variablesJob-level or global environment variables
only/exceptLegacy conditional execution (use rules instead)

File Placement

.gitlab-ci.yml must be at the repository root to be automatically detected. Additional configuration files can be included via include keyword.

YAML Validation

Validate .gitlab-ci.yml locally before pushing:

# Using gitlab-runner (if installed)
gitlab-runner verify

# Using yamllint (with custom config)
yamllint -d relaxed .gitlab-ci.yml

# Using curl to GitLab API (requires authentication)
curl --header "PRIVATE-TOKEN: $CI_JOB_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"dry_run": true, "ref": "main"}' \
  https://gitlab.example.com/api/v4/projects/:id/ci/lint

Related References

  • Load Pipeline Basics to design job dependencies, use extends, and structure stages
  • Load Runners & Caching for executor selection and performance optimization
  • Load Testing & Quality to integrate testing reports and code scanning
  • Load Variables & Secrets to manage CI/CD secrets safely

Cross-References

Related skills in this collection:

  • ci-architecture — High-level CI/CD pipeline design patterns
  • gitlab-docs — GitLab API and web UI reference
  • yaml-linting — Validate .gitlab-ci.yml syntax and style
  • yaml-lsp — YAML editor integration for .gitlab-ci.yml
← Back to marketplace