Back to skills
SKILL.md
Aio Gitlab
ASecurityRead and manage GitLab merge requests, CI/CD pipelines, branches, and jobs via gitlab-mcp (auto-installs if missing). Use when the user mentions a GitLab URL, asks to open or review an MR, debug a failing pipeline, retry a CI job, protect a branch, trigger a pipeline run, or run any GitLab operation programmatically via glab or the MCP server. Supports gitflow commands (create feature, finish release, hotfix) and self-hosted GitLab instances.
- 4 stars
- 0 votes
- 0 copies
- 3 views
- Added November 20, 2026
Works with
Security analysis
100/100npx -y skills add aiocean/claude-plugins --skill aio-gitlab --agent claude-codeAre you the author of Aio Gitlab?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/aiocean-aio-gitlab)---
name: aio-gitlab
description: |
Read and manage GitLab merge requests, CI/CD pipelines, branches, and jobs via gitlab-mcp (auto-installs if missing). Use when the user mentions a GitLab URL, asks to open or review an MR, debug a failing pipeline, retry a CI job, protect a branch, trigger a pipeline run, or run any GitLab operation programmatically via glab or the MCP server. Supports gitflow commands (create feature, finish release, hotfix) and self-hosted GitLab instances.
when_to_use: create MR, accept MR, review MR, MR review, merge request, trigger pipeline, pipeline trigger, retry job, pipeline debugging, cancel job, gitlab, gitlab CI, gitlab-ci, CI/CD, pipeline status, branch, branch protection, branch protect, glab, gitlab-mcp, MR pipeline, gitflow, self-hosted gitlab
argument-hint: "MR ID, pipeline ID, or action"
effort: low
---
# GitLab Skill
GitLab operations via [nguyenvanduocit/gitlab-mcp](https://github.com/nguyenvanduocit/gitlab-mcp).
## Environment
- Go: !`which go 2>/dev/null || echo "NOT INSTALLED"`
- gitlab-mcp: !`which gitlab-mcp 2>/dev/null || echo "NOT INSTALLED"`
- gitlab-cli: !`which gitlab-cli 2>/dev/null || echo "NOT INSTALLED"`
- GITLAB_TOKEN: !`[ -n "$GITLAB_TOKEN" ] && echo "SET" || echo "NOT SET"`
- GITLAB_URL: !`echo ${GITLAB_URL:-NOT SET}`
- MCP configured: !`cat .mcp.json 2>/dev/null | grep -q gitlab && echo "YES" || echo "NO"`
## Install (skip if already installed above)
```bash
go install github.com/nguyenvanduocit/gitlab-mcp@latest
go install github.com/nguyenvanduocit/gitlab-mcp/cmd/gitlab-cli@latest
```
Add to `.mcp.json`:
```json
{
"mcpServers": {
"gitlab": {
"command": "gitlab-mcp",
"env": {
"GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
"GITLAB_URL": "https://gitlab.com"
}
}
}
}
```
Values needed: `GITLAB_TOKEN` from GitLab > Settings > Access Tokens, `GITLAB_URL` (e.g. `https://gitlab.com`). Restart Claude Code after configuring.
## MCP Tools (prefix: `gitlab_`)
### Project Operations
```
gitlab_list_projects()
gitlab_get_project(project_id: "group/project")
```
### Merge Request Management
| Tool | Usage |
|------|-------|
| `gitlab_list_mrs` | `(project_id, state: "opened")` |
| `gitlab_get_mr` | `(project_id, mr_iid: 42)` |
| `gitlab_create_mr` | `(project_id, title, source_branch, target_branch, description)` |
| `gitlab_accept_mr` | `(project_id, mr_iid: 42)` |
| `gitlab_rebase_mr` | `(project_id, mr_iid: 42)` |
| `gitlab_list_mr_comments` | `(project_id, mr_iid: 42)` |
| `gitlab_comment_mr` | `(project_id, mr_iid: 42, body: "LGTM")` |
| `gitlab_list_mr_pipelines` | `(project_id, mr_iid: 42)` |
| `gitlab_get_mr_commits` | `(project_id, mr_iid: 42)` |
### Repository Operations
```
gitlab_get_file(project_id: "group/project", file_path: "src/main.go", ref: "main")
gitlab_list_commits(project_id: "group/project", ref_name: "main")
gitlab_get_commit(project_id: "group/project", sha: "abc123")
```
### Pipeline & Jobs
```
gitlab_list_pipelines(project_id: "group/project", ref: "main")
gitlab_get_pipeline(project_id: "group/project", pipeline_id: 100)
gitlab_trigger_pipeline(project_id: "group/project", ref: "main")
gitlab_list_jobs(project_id: "group/project", pipeline_id: 100)
gitlab_get_job(project_id: "group/project", job_id: 200)
gitlab_cancel_job(project_id: "group/project", job_id: 200)
gitlab_retry_job(project_id: "group/project", job_id: 200)
```
### Branch Protection
```
gitlab_manage_branch_protection(project_id: "group/project", branch: "main", push_access_level: 40, merge_access_level: 30)
```
### Git Flow
```
gitlab_create_feature(project_id: "group/project", name: "user-auth")
gitlab_finish_feature(project_id: "group/project", name: "user-auth")
gitlab_create_release(project_id: "group/project", name: "1.2.0")
gitlab_finish_release(project_id: "group/project", name: "1.2.0")
gitlab_create_hotfix(project_id: "group/project", name: "fix-login")
gitlab_finish_hotfix(project_id: "group/project", name: "fix-login")
```
## CLI (fallback if MCP not configured)
```bash
gitlab-cli list-projects --env .env
gitlab-cli list-mrs --project-id group/project --state opened --env .env
gitlab-cli create-mr --project-id group/project --title "Feature" --source feature-x --target main --env .env
gitlab-cli accept-mr --project-id group/project --mr-iid 42 --env .env
gitlab-cli list-pipelines --project-id group/project --env .env
gitlab-cli trigger-pipeline --project-id group/project --ref main --env .env
gitlab-cli retry-job --project-id group/project --job-id 200 --env .env
gitlab-cli create-feature --project-id group/project --name user-auth --env .env
gitlab-cli finish-feature --project-id group/project --name user-auth --env .env
```
Flag: `--env` path to .env file with credentials.
## Workflows
### MR Review & Merge
1. `gitlab_list_mrs(project_id: "group/project", state: "opened")`
2. `gitlab_get_mr(project_id: "group/project", mr_iid: 42)`
3. `gitlab_list_mr_pipelines(project_id: "group/project", mr_iid: 42)` — verify CI passed
4. `gitlab_comment_mr(project_id: "group/project", mr_iid: 42, body: "Approved")`
5. `gitlab_accept_mr(project_id: "group/project", mr_iid: 42)`
### Pipeline Debugging
1. `gitlab_list_pipelines(project_id: "group/project")` — find failed pipeline
2. `gitlab_list_jobs(project_id: "group/project", pipeline_id: 100)` — find failed job
3. `gitlab_get_job(project_id: "group/project", job_id: 200)` — check logs
4. `gitlab_retry_job(project_id: "group/project", job_id: 200)` — retry
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.