gitlab
Manage GitLab merge requests and pipelines with a Python CLI - Brought to you by microsoft/hve-core
Best use case
gitlab is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Manage GitLab merge requests and pipelines with a Python CLI - Brought to you by microsoft/hve-core
Teams using gitlab should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gitlab/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gitlab Compares
| Feature / Agent | gitlab | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Manage GitLab merge requests and pipelines with a Python CLI - Brought to you by microsoft/hve-core
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# GitLab Skill
## Overview
Use this skill to inspect and update GitLab merge requests, notes, pipelines,
and job logs against GitLab.com or self-managed GitLab instances.
This skill is the repository-local Python workflow for GitLab tasks. It is not
the official GitLab MCP server integration surface.
This first hve-core implementation is Python-only. Run the CLI through
`python scripts/gitlab.py` and prefer `--fields` for read operations to keep
output concise.
## Prerequisites
The skill requires Python 3.11 or later.
Set these environment variables before running any command:
| Variable | Required | Example | Purpose |
|------------------|----------|----------------------|-----------------------------------------------|
| `GITLAB_URL` | Yes | `https://gitlab.com` | GitLab instance URL |
| `GITLAB_TOKEN` | Yes | `glpat-...` | Personal access token sent as `PRIVATE-TOKEN` |
| `GITLAB_PROJECT` | No | `group/project` | Project path or numeric project ID |
If `GITLAB_PROJECT` is not set, the script attempts to detect the project from
`git remote get-url origin`. Set the variable explicitly when you are not in a
git repository or when you want to target a different project.
## Quick Start
Export your environment variables, then run a read command with `--fields`.
```bash
export GITLAB_URL="https://gitlab.com"
export GITLAB_TOKEN="glpat-..."
export GITLAB_PROJECT="group/project"
python scripts/gitlab.py mr-list opened --fields iid,title,author.name
```
Read pipeline jobs for a known pipeline:
```bash
python scripts/gitlab.py pipeline-jobs 12345 --fields id,name,status,stage
```
## Parameters Reference
### Common Option
| Parameter | Applies To | Example | Description |
|------------|------------------------------------------------------------------|----------------------------|-----------------------------------------------------------------------------------------|
| `--fields` | `mr-list`, `mr-get`, `mr-notes`, `pipeline-get`, `pipeline-jobs` | `--fields iid,title,state` | Extract specific fields with dot notation and print concise tabular or key-value output |
### Commands
| Command | Arguments | Description |
|-----------------|----------------------------|------------------------------------------------------------------------|
| `mr-list` | `[state] [max]` | List merge requests, defaulting to all states and 20 results |
| `mr-get` | `<mr-iid>` | Get one merge request by project-scoped IID |
| `mr-create` | `<json>` or stdin | Create a merge request from a JSON payload |
| `mr-update` | `<mr-iid> <json>` or stdin | Update merge request fields from a JSON payload |
| `mr-comment` | `<mr-iid> <body>` or stdin | Add a comment to a merge request |
| `mr-notes` | `<mr-iid> [max]` | List merge request notes, excluding system notes when using `--fields` |
| `pipeline-get` | `<pipeline-id>` | Get one pipeline by numeric ID |
| `pipeline-run` | `<branch-or-tag>` | Trigger a pipeline for a branch or tag |
| `pipeline-jobs` | `<pipeline-id>` | List jobs for a pipeline |
| `job-log` | `<job-id>` | Print raw log output for a job |
## Script Reference
List recent open merge requests:
```bash
python scripts/gitlab.py mr-list opened --fields iid,title,author.name,user_notes_count
```
Get one merge request:
```bash
python scripts/gitlab.py mr-get 42 --fields iid,title,state,source_branch,target_branch
```
Create a merge request from inline JSON:
```bash
python scripts/gitlab.py mr-create '{
"source_branch": "feature/add-auth",
"target_branch": "main",
"title": "feat(auth): add OAuth login"
}'
```
Add a merge request comment from standard input:
```bash
echo "CI passed. Ready for review." | python scripts/gitlab.py mr-comment 42
```
Inspect a failed pipeline:
```bash
python scripts/gitlab.py pipeline-get 12345 --fields id,status,web_url
python scripts/gitlab.py pipeline-jobs 12345 --fields id,name,status,stage
python scripts/gitlab.py job-log 67890
```
## Troubleshooting
| Symptom | Cause | Resolution |
|--------------------------------------------------|-----------------------------------------------|-------------------------------------------------------------|
| `GITLAB_URL is not set` | Required environment variable missing | Export `GITLAB_URL` before running the script |
| `GITLAB_TOKEN is not set` | Missing personal access token | Create a token with API access and export `GITLAB_TOKEN` |
| `cannot parse git remote URL` | Project autodetection failed | Set `GITLAB_PROJECT` explicitly |
| `HTTP 401` or `HTTP 403` | Token is invalid or lacks access | Verify token scope and project permissions |
| `HTTP 404` | Wrong project, MR IID, pipeline ID, or job ID | Verify `GITLAB_PROJECT` and confirm the numeric identifiers |
| `expected numeric ID` | Non-numeric value passed to an ID argument | Use project MR IID values and numeric pipeline or job IDs |
| `python3 is required` or syntax errors on launch | Unsupported interpreter | Run the script with Python 3.11 or later |
GitLab uses MR IIDs such as `!42` inside a project. This skill expects the
numeric IID, not the global merge request ID.
*🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.*Related Skills
pr-reference
Generates PR reference XML containing commit history and unified diffs between branches with extension and path filtering. Includes utilities to list changed files by type and read diff chunks. Use when creating pull request descriptions, preparing code reviews, analyzing branch changes, discovering work items from diffs, or generating structured diff summaries. - Brought to you by microsoft/hve-core
security-reviewer-formats
Format specifications and data contracts for the security reviewer orchestrator and its subagents - Brought to you by microsoft/hve-core.
owasp-top-10
OWASP Top 10 for Web Applications (2025) vulnerability knowledge base for identifying, assessing, and remediating security risks in web application environments - Brought to you by microsoft/hve-core.
owasp-llm
OWASP Top 10 for LLM Applications (2025) vulnerability knowledge base for identifying, assessing, and remediating security risks in large language model systems - Brought to you by microsoft/hve-core.
owasp-agentic
OWASP Agentic Security Top 10 vulnerability knowledge base for identifying, assessing, and remediating security risks in AI agent systems - Brought to you by microsoft/hve-core.
jira
Jira issue workflows for search, issue updates, transitions, comments, and field discovery via the Jira REST API. Use when you need to search with JQL, inspect an issue, create or update work items, move an issue between statuses, post comments, or discover required fields for issue creation. - Brought to you by microsoft/hve-core
hve-core-installer
Decision-driven installer for HVE-Core with 6 clone-based installation methods, extension quick-install, environment detection, and agent customization workflows - Brought to you by microsoft/hve-core
vscode-playwright
VS Code screenshot capture using Playwright MCP with serve-web for slide decks and documentation - Brought to you by microsoft/hve-core
video-to-gif
Video-to-GIF conversion skill with FFmpeg two-pass optimization - Brought to you by microsoft/hve-core
powerpoint
PowerPoint slide deck generation and management using python-pptx with YAML-driven content and styling - Brought to you by microsoft/hve-core
gitlab-ci-patterns
Comprehensive GitLab CI/CD pipeline patterns for automated testing, building, and deployment.
gitlab-automation
Automate GitLab project management, issues, merge requests, pipelines, branches, and user operations via Rube MCP (Composio). Always search tools first for current schemas.