| name | glab-ci |
| description | Manage GitLab CI/CD pipelines using the glab CLI. Use this skill whenever the user mentions pipelines, CI jobs, build status, pipeline logs, triggering a pipeline, retrying a failed pipeline, or validating .gitlab-ci.yml. Trigger on phrases like "check pipeline status", "why did the build fail", "trigger a pipeline", "watch CI logs", "lint the CI config", or anything related to GitLab CI/CD. |
GitLab CI/CD Pipeline Management
Use glab CLI to manage GitLab CI/CD pipelines and jobs.
List Pipelines
glab ci list
glab ci list -r <branch>
glab ci list -s <status>
glab ci list --source push
glab ci list -O json
View Pipeline (Interactive)
glab ci view
glab ci view <pipeline-id>
The interactive view lets you navigate jobs, see status, and trigger retries.
Pipeline Status
glab ci status
glab ci status -r <branch>
Trigger a Pipeline
glab ci run
glab ci run -b <branch>
glab ci run -v KEY=value
glab ci run -v ENV=staging -v DEBUG=1
Retry a Failed Pipeline
glab ci retry <pipeline-id>
Cancel a Pipeline
glab ci cancel <pipeline-id>
View Job Logs (Live Trace)
glab ci trace
glab ci trace <job-id>
Use trace to stream live logs — useful for debugging long-running jobs.
Validate CI Config
glab ci lint
glab ci lint <file>
Delete a Pipeline
glab ci delete <pipeline-id>
Behavior Guidelines
- Debugging failures: When a pipeline fails, use
glab ci view to identify the failed jobs, then glab ci trace <job-id> to stream the logs.
- Default branch: Most commands default to the current branch — specify
-r <branch> when working on a different branch.
- Lint before push: Suggest
glab ci lint whenever the user edits .gitlab-ci.yml.
- Status check: For a quick "is CI green?" question, use
glab ci status rather than the full view.
- JSON output: Use
-O json and pipe through jq when the user needs to script pipeline queries.