About gitlab-ci
A skill for writing and debugging GitLab CI pipelines and configuring runners, jobs, artifacts, variables, environments, and deployment automation. It provides workflow guidance and practices for organizing pipeline dependencies and handling sensitive values.
Key features
- 01Define stages and jobs in YAML
- 02Configure runners and tags
- 03Use artifacts and cache
- 04Set environments and deployment rules
- 05Manage dependencies with needs
- 06Keep secrets in CI/CD variables
Use cases
- 01Create or debug a .gitlab-ci.yml pipeline
- 02Configure GitLab Runner and job execution
- 03Automate testing, builds, or deployments
- 04Pass artifacts between pipeline jobs
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ full-stack-skills/ devops-skills --skill gitlab-ciAfter installing, type/gitlab-ciin Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlLICENSE.txt
Details
From the project READMEWhen to use this skill
Use this skill whenever the user wants to:
- 编写或调试 GitLab CI 流水线 (
.gitlab-ci.yml) - 配置 GitLab Runner、stages、jobs、artifacts
- 设置 GitLab CI/CD 变量、secrets、environments
- 集成测试、构建、部署自动化
How to use this skill
- 流水线结构:YAML 中定义
stages、jobs;每个 job 属于某个 stage。 - Runner 配置:shared runner、specific runner、tags 选择。
- Artifacts 与缓存:在 jobs 间传递构建产物,使用 cache 加速。
- 环境与部署:使用
environment定义部署目标,配置only/except规则。
Best Practices
- 用
stages明确构建顺序,job 并行执行。 - 敏感信息用 CI/CD 变量(Settings → CI/CD → Variables),不在 yaml 中硬编码。
- 用
needs实现复杂依赖图,避免不必要的等待。 - 失败 job 加
artifacts保留日志和产物。
Keywords
gitlab ci, gitlab-ci, pipeline, runner, ci/cd, 流水线, 自动化部署, gitlab runner
Comments
Markdown supported