devops-gitlab-ci
Use when the user asks about GitLab CI, .gitlab-ci.yml, stages and needs, rules, parent-child or multi-project pipelines, include templates, CI/CD components…
от j4flmao★ 47 звёзд на GitHub
Установить devops-gitlab-ci в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
GitLab CI/CD
Purpose
Design, implement, and optimize GitLab CI/CD pipelines for automated build, test, security scanning, and deployment workflows.
Agent Protocol
Trigger
Exact user phrases: "GitLab CI", ".gitlab-ci.yml", "GitLab pipeline", "GitLab runner", "GitLab CI/CD", "CI pipeline", "GitLab security scanning", "SAST", "DAST", "child pipeline", "multi-project pipeline".
Input Context
- GitLab version (self-managed or SaaS) and CI/CD feature flags.
- Runner configuration: shared, group, or specific runners.
- Build method: Docker-in-Docker, Kaniko, or shell executor.
- Deployment target: Kubernetes, ECS, SSH, or serverless.
Output Artifact
Writes to .gitlab-ci.yml, template YAML files in ci/ directory, and GitLab CI configuration.
Response Format
YAML configuration with GitLab CI keywords, ready to commit.
No preamble. No postamble. No explanations.
Completion Criteria
- Pipeline structure defined with appropriate stages.
- Jobs configured with proper caching, artifacts, and dependencies.
- Security scanning stages (SAST, DAST, dependency check) configured.
- Rules and conditions for branch/tag-based execution.
- Runner configuration matches team requirements.
Architecture / Decision Trees
Pipeline Structure Decision Tree
- Small project, single app: Single pipeline with stages (build -> test -> deploy).
- Monorepo with multiple apps: Child/parent pipelines per component.
- Multi-project dependencies: Multi-project pipelines with trigger jobs.
- Compliance requirements: Security scanning stages (SAST, DAST, container scanning).
- Large monorepo: Cached dependencies + parallel jobs + needs DAG.
Runner Selection
| Runner Type | Use Case | Pros | Cons |
|---|---|---|---|
| Shared (SaaS) | Small projects, quick start | No maintenance, auto-scaled | Limited concurrency, no custom HW |
| Group runner | Team-level standardization | Shared across projects, custom config | Team manages |
| Specific runner | Single project, custom HW | Full control, GPU/dedicated | Per-project maintenance |
| Auto-scaling (Docker Machine) | Variable load | Cost efficient, elastic | Complex setup |
| Auto-scaling (Kubernetes) | K8s-native, containerized | Native K8s, efficient | Requires K8s cluster |
Build Method Decision Tree
- Docker-in-Docker (DIND): Most common, full Docker access, requires privileged mode.
- Buildah (or rootless BuildKit): daemonless, no privileged mode, recommended for K8s executors.
- Kaniko: daemonless, but the upstream project was archived in June 2025; only use a maintained fork.
- Shell executor: Direct host builds, no container isolation, not recommended.
Security Scanning Integration
| Scan Type | GitLab Template | When to Run | Best For |
|---|---|---|---|
| SAST | Jobs/SAST.gitlab-ci.yml | Every PR | Source code vulnerabilities |
| Secret Detection | Jobs/Secret-Detection.gitlab-ci.yml | Every push | Hardcoded credentials |
| Dependency Scanning | Jobs/Dependency-Scanning.gitlab-ci.yml | Every PR | Known CVEs in deps |
| Container Scanning | Jobs/Container-Scanning.gitlab-ci.yml | After image build | Image vulnerabilities |
| DAST | Jobs/DAST.gitlab-ci.yml | Deploy to review app | Runtime vulnerabilities |
| API Fuzzing | Jobs/API-Fuzzing.gitlab-ci.yml | Deploy to staging | API security testing |
| License Scanning | Jobs/License-Scanning.gitlab-ci.yml | Every PR | License compliance |
Core Workflow
Step 1: Basic Pipeline Structure
stages:
- build
- test
- security
- package
- deploy
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
DEPLOY_ENV: $CI_COMMIT_BRANCH
REGISTRY: $CI_REGISTRY_IMAGE
TAG: $CI_COMMIT_SHORT_SHA
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .npm/
build-app:
stage: build
image: node:22-alpine
script:
- npm ci --cache .npm --prefer-offline
- npm run build
artifacts:
paths:
- dist/
- node_modules/
expire_in: 1 hour
unit-test:
stage: test
image: node:22-alpine
script:
- npm ci --cache .npm --prefer-offline
- npm run test:ci
artifacts:
when: always
reports:
junit: test-results/junit.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
Step 2: Security Scanning
include:
- template: Jobs/SAST.gitlab-ci.yml
- template: Jobs/Secret-Detection.gitlab-ci.yml
- template: Jobs/Dependency-Scanning.gitlab-ci.yml
sast:
stage: security
variables:
SAST_EXCLUDED_PATHS: node_modules, tests, vendor
SEARCH_MAX_DEPTH: 10
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == "main"
secret_detection:
stage: security
rules:
- if: $CI_COMMIT_BRANCH == "main"
dependency_scanning:
stage: security
variables:
DS_DEFAULT_ANALYZERS: node
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
Step 3: Container Build and Push
container-build:
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/advanced-patterns.md
- references/container-integration.md
- references/gitlab-ci-advanced.md
- references/gitlab-ci-fundamentals.md
- references/gitlab-runners.md
- references/pipeline-structure.md
- references/security-scanning.md
FAQ
Что делает скилл devops-gitlab-ci?
Use when the user asks about GitLab CI, .gitlab-ci.yml, stages and needs, rules, parent-child or multi-project pipelines, include templates, CI/CD components, GitLab runners, container builds, or GitLab SAST/DAST scanning. Produces GitLab pipeline configs. Not for GitHub Actions (use github-actions) or Jenkins (use jenkins).
Как установить скилл devops-gitlab-ci?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл devops-gitlab-ci запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
AnthropicThe scan that the plugin's GitHub Action runs.
azure-static-web-apps
GitHubHelps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
ai-ready
GitHubMake any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
aws-cdk-python-setup
GitHubSetup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…